blob: 15eb65ad320dcf1bb7e15601c5696b8c33c88b86 [file] [log] [blame]
Patrick Williamsb48b7b42016-08-17 15:04:38 -05001SUMMARY = "OpenFlow communications protocol"
2DESCRIPTION = "\
3Open standard that enables researchers to run experimental protocols in \
4contained networks. OpenFlow is a communications interface between \
5control and forwarding planes of a software-defined networking architecture.\
6"
7HOMEPAGE = "http://www.openflow.org"
8
9SECTION = "net"
Andrew Geissler9aee5002022-03-30 16:27:02 +000010LICENSE = "GPL-2.0-only"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050011
12LIC_FILES_CHKSUM = "file://COPYING;md5=e870c934e2c3d6ccf085fd7cf0a1e2e2"
13
Andrew Geissler595f6302022-01-24 19:11:47 +000014SRC_URI = "git://gitosis.stanford.edu/openflow.git;protocol=git;branch=master"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050015
16DEPENDS = "virtual/libc"
17
Andrew Geisslereff27472021-10-29 15:35:00 -050018PACKAGECONFIG ??= ""
Brad Bishop6e60e8b2018-02-01 10:27:11 -050019PACKAGECONFIG[openssl] = "--enable-ssl,--disable-ssl, openssl openssl-native, libssl"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050020
21EXTRA_OECONF += " \
22 KARCH=${TARGET_ARCH} \
Patrick Williamsddad1a12017-02-23 20:36:32 -060023 ${@bb.utils.contains('PACKAGECONFIG', 'openssl', 'SSL_LIBS="-lssl -lcrypto"', '', d)} \
Patrick Williamsb48b7b42016-08-17 15:04:38 -050024 "
25
26S = "${WORKDIR}/git"
27
Brad Bishop6e60e8b2018-02-01 10:27:11 -050028inherit autotools-brokensep pkgconfig
Patrick Williamsb48b7b42016-08-17 15:04:38 -050029
Patrick Williams213cb262021-08-07 19:21:33 -050030do_configure:prepend() {
Patrick Williamsb48b7b42016-08-17 15:04:38 -050031 ./boot.sh
Patrick Williamsb48b7b42016-08-17 15:04:38 -050032}
33
Patrick Williams213cb262021-08-07 19:21:33 -050034do_install:append() {
Patrick Williamsb48b7b42016-08-17 15:04:38 -050035 # Remove /var/run as it is created on startup
36 rm -rf ${D}${localstatedir}/run
Andrew Geissler595f6302022-01-24 19:11:47 +000037
38 # /var/log/openflow needs to be created in runtime. Use rmdir to catch if
39 # upstream stops creating /var/log/openflow, or adds something else in
40 # /var/log.
41 rmdir ${D}${localstatedir}/log/${BPN} ${D}${localstatedir}/log
42 rmdir --ignore-fail-on-non-empty ${D}${localstatedir}
43
44 # Create /var/log/openflow in runtime.
45 if [ "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" ]; then
46 install -d ${D}${nonarch_libdir}/tmpfiles.d
47 echo "d ${localstatedir}/log/${BPN} - - - -" > ${D}${nonarch_libdir}/tmpfiles.d/${BPN}.conf
48 fi
49 if [ "${@bb.utils.filter('DISTRO_FEATURES', 'sysvinit', d)}" ]; then
50 install -d ${D}${sysconfdir}/default/volatiles
51 echo "d root root 0755 ${localstatedir}/log/${BPN} none" > ${D}${sysconfdir}/default/volatiles/99_${BPN}
52 fi
Patrick Williamsb48b7b42016-08-17 15:04:38 -050053}
Andrew Geissler595f6302022-01-24 19:11:47 +000054
55FILES:${PN} += "${nonarch_libdir}/tmpfiles.d"