Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [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" |
| 8 | LIC_FILES_CHKSUM = "file://LICENSE;md5=91ac00c6b9f5c106e89291e196fe0234" |
| 9 | |
| 10 | inherit autotools gettext pkgconfig systemd |
| 11 | |
| 12 | DEPENDS += "iptables net-tools util-linux libmnl libnetfilter-conntrack" |
| 13 | |
| 14 | SRC_URI = "http://miniupnp.tuxfamily.org/files/download.php?file=${P}.tar.gz;downloadfilename=${P}.tar.gz \ |
| 15 | file://miniupnpd.service" |
| 16 | |
| 17 | SRC_URI[md5sum] = "b4c7c938915edeee6ca4c65dd021f212" |
| 18 | SRC_URI[sha256sum] = "860c15f2f8340fd69546b01cffe4c7fcff3e63a7bdfe5a2af6b2346f0e074bb6" |
| 19 | |
| 20 | IPV6 = "${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', '--ipv6', '', d)}" |
| 21 | |
| 22 | do_compile() { |
| 23 | cd ${S} |
| 24 | CONFIG_OPTIONS="${IPV6} --leasefile --vendorcfg" oe_runmake -f Makefile.linux |
| 25 | } |
| 26 | |
| 27 | do_install() { |
| 28 | install -d ${D}/${sbindir} |
| 29 | install ${S}/miniupnpd ${D}/${sbindir} |
| 30 | install -d ${D}/${sysconfdir}/${BPN} |
| 31 | install ${S}/netfilter/iptables_init.sh ${D}/${sysconfdir}/${BPN} |
| 32 | install ${S}/netfilter/iptables_removeall.sh ${D}/${sysconfdir}/${BPN} |
| 33 | install ${S}/netfilter/ip6tables_init.sh ${D}/${sysconfdir}/${BPN} |
| 34 | install ${S}/netfilter/ip6tables_removeall.sh ${D}/${sysconfdir}/${BPN} |
| 35 | install -m 0644 -b ${S}/miniupnpd.conf ${D}/${sysconfdir}/${BPN} |
| 36 | install -d ${D}/${sysconfdir}/init.d |
| 37 | install ${S}/linux/miniupnpd.init.d.script ${D}/${sysconfdir}/init.d/miniupnpd |
| 38 | |
| 39 | install -d ${D}${systemd_unitdir}/system |
| 40 | install -m 0644 ${WORKDIR}/miniupnpd.service ${D}${systemd_unitdir}/system/ |
| 41 | } |
| 42 | |
| 43 | SYSTEMD_SERVICE_${PN} = "miniupnpd.service" |