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_LICENSE
:=BSD-3-Clause
20 include $(INCLUDE_DIR
)/package.mk
22 define Package
/miniupnpd
25 DEPENDS
:=+iptables
+libip4tc
+IPV6
:libip6tc
+IPV6
:ip6tables
+libuuid
26 TITLE
:=Lightweight UPnP IGD
, NAT-PMP
& PCP daemon
28 URL
:=http
://miniupnp.free.fr
/
31 define Package
/miniupnpd
/config
32 config MINIUPNPD_IGDv2
38 define Package
/miniupnpd
/conffiles
42 define Package
/miniupnpd
/postinst
45 if
[ -z
"$$IPKG_INSTROOT" ]; then
46 ( .
/etc
/uci-defaults
/99-miniupnpd
)
47 rm -f
/etc
/uci-defaults
/99-miniupnpd
54 $(call Build
/Prepare
/Default
)
55 echo
"OpenWrt" | tr \
(\
)\ _
>$(PKG_BUILD_DIR
)/os.openwrt
59 TARGET_OPENWRT
=1 TEST
=0 \
61 CC
="$(TARGET_CC) -DIPTABLES_143 \
62 -lip4tc $(if $(CONFIG_IPV6),-lip6tc) -luuid" \
63 CONFIG_OPTIONS
="--portinuse --leasefile \
64 $(if $(CONFIG_IPV6),--ipv6) \
65 $(if $(CONFIG_MINIUPNPD_IGDv2),--igd2)" \
70 define Package
/miniupnpd
/install
71 $(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
72 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/miniupnpd
$(1)/usr
/sbin
/miniupnpd
73 $(INSTALL_BIN
) .
/files
/miniupnpd.init
$(1)/etc
/init.d
/miniupnpd
74 $(INSTALL_CONF
) .
/files
/upnpd.config
$(1)/etc
/config
/upnpd
75 $(INSTALL_DATA
) .
/files
/miniupnpd.hotplug
$(1)/etc
/hotplug.d
/iface
/50-miniupnpd
76 $(INSTALL_DATA
) .
/files
/miniupnpd.defaults
$(1)/etc
/uci-defaults
/99-miniupnpd
77 $(INSTALL_DATA
) .
/files
/firewall.
include $(1)/usr
/share
/miniupnpd
/firewall.
include
80 $(eval
$(call BuildPackage
,miniupnpd
))