blob: 6b8fdca4c3b2f5428b08439aa7753851b7728ec1 [file] [log] [blame]
Brad Bishop19323692019-04-05 15:28:33 -04001SUMMARY = "Lightweight UPnP IGD daemon"
2DESCRIPTION = "The miniUPnP daemon is an UPnP IGD (internet gateway device) \
3which provide NAT traversal services to any UPnP enabled client on \
4the network."
5
6SECTION = "networking"
7LICENSE = "BSD-3-Clause"
Brad Bishop26bdd442019-08-16 17:08:17 -04008LIC_FILES_CHKSUM = "file://LICENSE;md5=a1ed15843ce66639bcf9f109cf247870"
Brad Bishop19323692019-04-05 15:28:33 -04009
10inherit autotools gettext pkgconfig systemd
11
12DEPENDS += "iptables net-tools util-linux libmnl libnetfilter-conntrack"
13
Brad Bishopc342db32019-05-15 21:57:59 -040014SRC_URI = "http://miniupnp.tuxfamily.org/files/download.php?file=${BP}.tar.gz;downloadfilename=${BP}.tar.gz \
Brad Bishop19323692019-04-05 15:28:33 -040015 file://miniupnpd.service \
16 file://0001-Add-OpenEmbedded-cross-compile-case.patch \
17 "
Brad Bishop26bdd442019-08-16 17:08:17 -040018SRC_URI[md5sum] = "394e676f555d8047be69730d9c4d23a5"
19SRC_URI[sha256sum] = "29f49fe6868597d041ee29f511fa7b65781b9e4e85ef2569a2381c2079e1743e"
Brad Bishop19323692019-04-05 15:28:33 -040020
21IPV6 = "${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', '--ipv6', '', d)}"
22
23do_configure_prepend() {
24 echo "${@d.getVar('DISTRO_VERSION')}" > ${S}/os.openembedded
25}
26
27do_compile() {
28 cd ${S}
29 CONFIG_OPTIONS="${IPV6} --leasefile --vendorcfg" oe_runmake -f Makefile.linux
30}
31
32do_install() {
33 install -d ${D}/${sbindir}
34 install ${S}/miniupnpd ${D}/${sbindir}
35 install -d ${D}/${sysconfdir}/${BPN}
36 install ${S}/netfilter/iptables_init.sh ${D}/${sysconfdir}/${BPN}
37 install ${S}/netfilter/iptables_removeall.sh ${D}/${sysconfdir}/${BPN}
38 install ${S}/netfilter/ip6tables_init.sh ${D}/${sysconfdir}/${BPN}
39 install ${S}/netfilter/ip6tables_removeall.sh ${D}/${sysconfdir}/${BPN}
40 install -m 0644 -b ${S}/miniupnpd.conf ${D}/${sysconfdir}/${BPN}
41 install -d ${D}/${sysconfdir}/init.d
42 install ${S}/linux/miniupnpd.init.d.script ${D}/${sysconfdir}/init.d/miniupnpd
43
44 install -d ${D}${systemd_unitdir}/system
45 install -m 0644 ${WORKDIR}/miniupnpd.service ${D}${systemd_unitdir}/system/
46}
47
48SYSTEMD_SERVICE_${PN} = "miniupnpd.service"