Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 1 | SUMMARY = "Lightweight UPnP IGD daemon" |
| 2 | DESCRIPTION = "The miniUPnP daemon is an UPnP IGD (internet gateway device) \ |
| 3 | which provide NAT traversal services to any UPnP enabled client on \ |
| 4 | the network." |
| 5 | |
| 6 | SECTION = "networking" |
| 7 | LICENSE = "BSD-3-Clause" |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 8 | LIC_FILES_CHKSUM = "file://LICENSE;md5=a1ed15843ce66639bcf9f109cf247870" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 9 | |
| 10 | inherit autotools gettext pkgconfig systemd |
| 11 | |
| 12 | DEPENDS += "iptables net-tools util-linux libmnl libnetfilter-conntrack" |
| 13 | |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 14 | SRC_URI = "http://miniupnp.tuxfamily.org/files/download.php?file=${BP}.tar.gz;downloadfilename=${BP}.tar.gz \ |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 15 | file://miniupnpd.service \ |
| 16 | file://0001-Add-OpenEmbedded-cross-compile-case.patch \ |
| 17 | " |
Brad Bishop | 868407c | 2019-11-04 13:24:47 -0500 | [diff] [blame] | 18 | SRC_URI[md5sum] = "340789edd49c113afe37834cc901a1e8" |
| 19 | SRC_URI[sha256sum] = "218fad7af31f3c22fb4c9db28a55a2a8b5067d41f5b38f52008a057a00d2206d" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 20 | |
| 21 | IPV6 = "${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', '--ipv6', '', d)}" |
| 22 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 23 | do_configure:prepend() { |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 24 | echo "${@d.getVar('DISTRO_VERSION')}" > ${S}/os.openembedded |
| 25 | } |
| 26 | |
| 27 | do_compile() { |
| 28 | cd ${S} |
Brad Bishop | 868407c | 2019-11-04 13:24:47 -0500 | [diff] [blame] | 29 | CONFIG_OPTIONS="${IPV6} --leasefile --vendorcfg" oe_runmake -f Makefile.linux config.h |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 30 | CONFIG_OPTIONS="${IPV6} --leasefile --vendorcfg" oe_runmake -f Makefile.linux |
| 31 | } |
| 32 | |
| 33 | do_install() { |
| 34 | install -d ${D}/${sbindir} |
| 35 | install ${S}/miniupnpd ${D}/${sbindir} |
| 36 | install -d ${D}/${sysconfdir}/${BPN} |
| 37 | install ${S}/netfilter/iptables_init.sh ${D}/${sysconfdir}/${BPN} |
| 38 | install ${S}/netfilter/iptables_removeall.sh ${D}/${sysconfdir}/${BPN} |
| 39 | install ${S}/netfilter/ip6tables_init.sh ${D}/${sysconfdir}/${BPN} |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 40 | install ${S}/netfilter/miniupnpd_functions.sh ${D}/${sysconfdir}/${BPN} |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 41 | install ${S}/netfilter/ip6tables_removeall.sh ${D}/${sysconfdir}/${BPN} |
| 42 | install -m 0644 -b ${S}/miniupnpd.conf ${D}/${sysconfdir}/${BPN} |
| 43 | install -d ${D}/${sysconfdir}/init.d |
| 44 | install ${S}/linux/miniupnpd.init.d.script ${D}/${sysconfdir}/init.d/miniupnpd |
| 45 | |
| 46 | install -d ${D}${systemd_unitdir}/system |
| 47 | install -m 0644 ${WORKDIR}/miniupnpd.service ${D}${systemd_unitdir}/system/ |
| 48 | } |
| 49 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 50 | SYSTEMD_SERVICE:${PN} = "miniupnpd.service" |