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.1.20190408
14 PKG_SOURCE_URL
:=https
://miniupnp.tuxfamily.org
/files
15 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
16 PKG_HASH
:=4175d588f600e2877503c781c5d75320dfce572669fcab7604434b07ec5c0d5d
18 PKG_LICENSE
:=BSD-3-Clause
19 PKG_LICENSE_FILES
:=LICENSE
21 include $(INCLUDE_DIR
)/package.mk
22 include $(INCLUDE_DIR
)/version.mk
24 define Package
/miniupnpd
27 DEPENDS
:=+iptables
+libip4tc
+IPV6
:libip6tc
+IPV6
:ip6tables
+libuuid
28 TITLE
:=Lightweight UPnP IGD
, NAT-PMP
& PCP daemon
30 URL
:=https
://miniupnp.tuxfamily.org
/
33 define Package
/miniupnpd
/conffiles
38 $(call Build
/Prepare
/Default
)
39 echo
"$(VERSION_NUMBER)" | tr
'() ' '_' >$(PKG_BUILD_DIR
)/os.openwrt
42 TARGET_CFLAGS
+= $(FPIC
) -flto
43 TARGET_LDFLAGS
+= -Wl
,--gc-sections
,--as-needed
46 TARGET_OPENWRT
=1 TEST
=0 LIBS
="" \
47 CC
="$(TARGET_CC) -DIPTABLES_143 -lip4tc -luuid \
48 $(if $(CONFIG_IPV6),-lip6tc)" \
49 CONFIG_OPTIONS
="--portinuse --leasefile --igd2 \
50 $(if $(CONFIG_IPV6),--ipv6)" \
51 -f Makefile.linux miniupnpd
53 define Package
/miniupnpd
/install
54 $(INSTALL_DIR
) $(1)/usr
/sbin
55 $(INSTALL_DIR
) $(1)/etc
/init.d
56 $(INSTALL_DIR
) $(1)/etc
/config
57 $(INSTALL_DIR
) $(1)/etc
/hotplug.d
/iface
58 $(INSTALL_DIR
) $(1)/etc
/uci-defaults
59 $(INSTALL_DIR
) $(1)/usr
/share
/miniupnpd
61 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/miniupnpd
$(1)/usr
/sbin
/miniupnpd
62 $(INSTALL_BIN
) .
/files
/miniupnpd.init
$(1)/etc
/init.d
/miniupnpd
63 $(INSTALL_CONF
) .
/files
/upnpd.config
$(1)/etc
/config
/upnpd
64 $(INSTALL_DATA
) .
/files
/miniupnpd.hotplug
$(1)/etc
/hotplug.d
/iface
/50-miniupnpd
65 $(INSTALL_BIN
) .
/files
/miniupnpd.defaults
$(1)/etc
/uci-defaults
/99-miniupnpd
66 $(INSTALL_DATA
) .
/files
/firewall.
include $(1)/usr
/share
/miniupnpd
/firewall.
include
69 $(eval
$(call BuildPackage
,miniupnpd
))