2 # Copyright (C) 2006-2014 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
11 PKG_VERSION
:=2.0.20170421
14 PKG_SOURCE_URL
:=http
://miniupnp.free.fr
/files
15 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
16 PKG_HASH
:=9677aeccadf73b4bf8bb9d832c32b5da8266b4d58eed888f3fd43d7656405643
18 PKG_MAINTAINER
:=Markus Stenberg
<fingon@iki.fi
>
19 PKG_LICENSE
:=BSD-3-Clause
21 include $(INCLUDE_DIR
)/package.mk
23 define Package
/miniupnpd
26 DEPENDS
:=+iptables
+libip4tc
+IPV6
:libip6tc
+IPV6
:ip6tables
+libuuid
27 TITLE
:=Lightweight UPnP IGD
, NAT-PMP
& PCP daemon
29 URL
:=http
://miniupnp.free.fr
/
32 define Package
/miniupnpd
/config
33 config MINIUPNPD_IGDv2
39 define Package
/miniupnpd
/conffiles
43 define Package
/miniupnpd
/postinst
46 if
[ -z
"$$IPKG_INSTROOT" ]; then
47 ( .
/etc
/uci-defaults
/99-miniupnpd
)
48 rm -f
/etc
/uci-defaults
/99-miniupnpd
55 $(call Build
/Prepare
/Default
)
56 echo
"OpenWrt" | tr \
(\
)\ _
>$(PKG_BUILD_DIR
)/os.openwrt
60 TARGET_OPENWRT
=1 TEST
=0 \
62 CC
="$(TARGET_CC) -DIPTABLES_143 \
63 -lip4tc $(if $(CONFIG_IPV6),-lip6tc) -luuid" \
64 CONFIG_OPTIONS
="--portinuse --leasefile \
65 $(if $(CONFIG_IPV6),--ipv6) \
66 $(if $(CONFIG_MINIUPNPD_IGDv2),--igd2)" \
71 define Package
/miniupnpd
/install
72 $(INSTALL_DIR
) $(1)/usr
/sbin
$(1)/etc
/init.d
$(1)/etc
/config
$(1)/etc
/uci-defaults
$(1)/etc
/hotplug.d
/iface
$(1)/usr
/share
/miniupnpd
73 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/miniupnpd
$(1)/usr
/sbin
/miniupnpd
74 $(INSTALL_BIN
) .
/files
/miniupnpd.init
$(1)/etc
/init.d
/miniupnpd
75 $(INSTALL_CONF
) .
/files
/upnpd.config
$(1)/etc
/config
/upnpd
76 $(INSTALL_DATA
) .
/files
/miniupnpd.hotplug
$(1)/etc
/hotplug.d
/iface
/50-miniupnpd
77 $(INSTALL_DATA
) .
/files
/miniupnpd.defaults
$(1)/etc
/uci-defaults
/99-miniupnpd
78 $(INSTALL_DATA
) .
/files
/firewall.
include $(1)/usr
/share
/miniupnpd
/firewall.
include
81 $(eval
$(call BuildPackage
,miniupnpd
))