@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME := miniupnpd
PKG_NAME := miniupnpd
PKG_VERSION := 2.2.3
PKG_VERSION := 2.2.3
PKG_RELEASE := 1
PKG_RELEASE := 2
PKG_SOURCE_URL := https://miniupnp.tuxfamily.org/files
PKG_SOURCE_URL := https://miniupnp.tuxfamily.org/files
PKG_SOURCE := $( PKG_NAME) -$( PKG_VERSION) .tar.gz
PKG_SOURCE := $( PKG_NAME) -$( PKG_VERSION) .tar.gz
@ -26,27 +26,47 @@ PKG_BUILD_PARALLEL:=1
i n c l u d e $( INCLUDE_DIR ) / p a c k a g e . m k
i n c l u d e $( INCLUDE_DIR ) / p a c k a g e . m k
i n c l u d e $( INCLUDE_DIR ) / v e r s i o n . m k
i n c l u d e $( INCLUDE_DIR ) / v e r s i o n . m k
d e f i n e P a c k a g e / m i n i u p n p d
d e f i n e P a c k a g e / m i n i u p n p d / D e f a u l t
SECTION:= net
SECTION:= net
CATEGORY:= Network
CATEGORY:= Network
DEPENDS:= \
DEPENDS:= \
+IPV6:ip6tables \
+IPV6:libip6tc \
+iptables \
+libcap-ng \
+libcap-ng \
+libip4tc \
+libmnl \
+libmnl \
+libnetfilter-conntrack \
+libuuid
+libuuid
PROVIDES:= miniupnpd
TITLE:= Lightweight UPnP IGD, NAT-PMP & PCP daemon
TITLE:= Lightweight UPnP IGD, NAT-PMP & PCP daemon
SUBMENU:= Firewall
SUBMENU:= Firewall
URL:= https://miniupnp.tuxfamily.org/
URL:= https://miniupnp.tuxfamily.org/
e n d e f
e n d e f
d e f i n e P a c k a g e / m i n i u p n p d / c o n f f i l e s
d e f i n e P a c k a g e / m i n i u p n p d - i p t a b l e s
$( call Package/miniupnpd/Default)
CONFLICTS:= miniupnpd-nftables
DEPENDS += \
+IPV6:ip6tables \
+IPV6:libip6tc \
+iptables \
+libip4tc \
+libnetfilter-conntrack
TITLE += ( iptables)
VARIANT:= iptables
e n d e f
d e f i n e P a c k a g e / m i n i u p n p d - n f t a b l e s
$( call Package/miniupnpd/Default)
DEPENDS += \
+libnftnl
TITLE += ( nftables)
VARIANT:= nftables
e n d e f
d e f i n e P a c k a g e / m i n i u p n p d / c o n f f i l e s / D e f a u l t
/ e t c / c o n f i g / u p n p d
/ e t c / c o n f i g / u p n p d
e n d e f
e n d e f
P a c k a g e / m i n i u p n p d - i p t a b l e s / conffiles = $( Package/miniupnpd/conffiles/Default)
P a c k a g e / m i n i u p n p d - n f t a b l e s / conffiles = $( Package/miniupnpd/conffiles/Default)
d e f i n e B u i l d / P r e p a r e
d e f i n e B u i l d / P r e p a r e
$( call Build/Prepare/Default)
$( call Build/Prepare/Default)
echo " $( VERSION_NUMBER) " | tr '() ' '_' >$( PKG_BUILD_DIR) /os.openwrt
echo " $( VERSION_NUMBER) " | tr '() ' '_' >$( PKG_BUILD_DIR) /os.openwrt
@ -57,26 +77,38 @@ CONFIGURE_ARGS = \
--igd2 \
--igd2 \
--leasefile \
--leasefile \
--portinuse \
--portinuse \
--firewall= iptables \
--firewall= $( BUILD_VARIANT) \
--disable-fork
--disable-fork
TARGET_CFLAGS += $( FPIC) -flto
TARGET_CFLAGS += $( FPIC)
TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
d e f i n e P a c k a g e / m i n i u p n p d / i n s t a l l
i f e q ( $( BUILD_VARIANT ) , i p t a b l e s )
TARGET_CFLAGS += -flto
e n d i f
d e f i n e P a c k a g e / m i n i u p n p d / i n s t a l l / D e f a u l t
$( INSTALL_DIR) $( 1) /usr/sbin
$( INSTALL_DIR) $( 1) /usr/sbin
$( INSTALL_DIR) $( 1) /etc/init.d
$( INSTALL_DIR) $( 1) /etc/init.d
$( INSTALL_DIR) $( 1) /etc/config
$( INSTALL_DIR) $( 1) /etc/config
$( INSTALL_DIR) $( 1) /etc/hotplug.d/iface
$( INSTALL_DIR) $( 1) /etc/hotplug.d/iface
$( INSTALL_DIR) $( 1) /etc/uci-defaults
$( INSTALL_DIR) $( 1) /usr/share/miniupnpd
$( INSTALL_BIN) $( PKG_INSTALL_DIR) /usr/sbin/miniupnpd $( 1) /usr/sbin/miniupnpd
$( INSTALL_BIN) $( PKG_INSTALL_DIR) /usr/sbin/miniupnpd $( 1) /usr/sbin/miniupnpd
$( INSTALL_BIN) ./files/miniupnpd.init $( 1) /etc/init.d/miniupnpd
$( INSTALL_BIN) ./files/miniupnpd.init $( 1) /etc/init.d/miniupnpd
$( INSTALL_CONF) ./files/upnpd.config $( 1) /etc/config/upnpd
$( INSTALL_CONF) ./files/upnpd.config $( 1) /etc/config/upnpd
$( INSTALL_DATA) ./files/miniupnpd.hotplug $( 1) /etc/hotplug.d/iface/50-miniupnpd
$( INSTALL_DATA) ./files/miniupnpd.hotplug $( 1) /etc/hotplug.d/iface/50-miniupnpd
$( INSTALL_BIN) ./files/miniupnpd.defaults $( 1) /etc/uci-defaults/99-miniupnpd
$( INSTALL_DATA) ./files/firewall.include $( 1) /usr/share/miniupnpd/firewall.include
e n d e f
e n d e f
$( eval $ ( call BuildPackage ,miniupnpd ) )
d e f i n e P a c k a g e / m i n i u p n p d - i p t a b l e s / i n s t a l l
$( call Package/miniupnpd/install/Default,$1 )
$( INSTALL_DIR) $( 1) /etc/uci-defaults
$( INSTALL_DIR) $( 1) /usr/share/miniupnpd
$( INSTALL_BIN) ./files/miniupnpd.defaults.iptables $( 1) /etc/uci-defaults/99-miniupnpd
$( INSTALL_DATA) ./files/firewall3.include $( 1) /usr/share/miniupnpd/firewall.include
e n d e f
d e f i n e P a c k a g e / m i n i u p n p d - n f t a b l e s / i n s t a l l
$( call Package/miniupnpd/install/Default,$1 )
e n d e f
$( eval $ ( call BuildPackage ,miniupnpd -iptables ) )
$( eval $ ( call BuildPackage ,miniupnpd -nftables ) )