jow 9170d59796 miniupnpd: rework and simplify firewall integration by taking advantage of the new fw3 functions
git-svn-id: svn://svn.openwrt.org/openwrt/packages@36011 3c298f89-4303-0410-b956-a3cf2f4a3e73
2013-03-14 15:30:58 +00:00

68 lines
1.9 KiB
Makefile

#
# Copyright (C) 2006-2013 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=miniupnpd
PKG_VERSION:=1.8
PKG_RELEASE:=2
PKG_SOURCE_URL:=http://miniupnp.free.fr/files
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_MD5SUM:=0d8a8e936d5a0012cb260a3b972acbf3
include $(INCLUDE_DIR)/package.mk
define Package/miniupnpd
SECTION:=net
CATEGORY:=Network
DEPENDS:=+iptables +libip4tc +IPV6:libip6tc +libnfnetlink
TITLE:=Lightweight UPnP daemon
SUBMENU:=Firewall
URL:=http://miniupnp.free.fr/
MAINTAINER:=Daniel Dickinson <openwrt@cshore.neomailbox.net>
endef
define Package/miniupnpd/conffiles
/etc/config/upnpd
endef
define Package/miniupnpd/postinst
#!/bin/sh
if [ -z "$$IPKG_INSTROOT" ]; then
. /etc/uci-defaults/99-miniupnpd
rm -f /etc/uci-defaults/99-miniupnpd
fi
exit 0
endef
define Build/Prepare
$(call Build/Prepare/Default)
echo "OpenWrt/$(OPENWRTVERSION)" | tr \(\)\ _ >$(PKG_BUILD_DIR)/os.openwrt
endef
MAKE_FLAGS += \
LIBS="" \
CC="$(TARGET_CC) -DIPTABLES_143 -lnfnetlink -lip4tc $(if $(CONFIG_IPV6),-lip6tc)" \
CONFIG_OPTIONS="$(if $(CONFIG_IPV6),--ipv6) --leasefile" \
-f Makefile.linux \
miniupnpd
define Package/miniupnpd/install
$(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
$(INSTALL_BIN) $(PKG_BUILD_DIR)/miniupnpd $(1)/usr/sbin/miniupnpd
$(INSTALL_BIN) ./files/miniupnpd.init $(1)/etc/init.d/miniupnpd
$(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.defaults $(1)/etc/uci-defaults/99-miniupnpd
$(INSTALL_DATA) ./files/firewall.include $(1)/usr/share/miniupnpd/firewall.include
endef
$(eval $(call BuildPackage,miniupnpd))