jow b838faf06b [packages] miniupnpd: add option to enable NAT-PMP (#8747)
git-svn-id: svn://svn.openwrt.org/openwrt/packages@25251 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-01-30 00:56:41 +00:00

52 lines
1.6 KiB
Makefile

#
# Copyright (C) 2006-2009 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=miniupnpd
PKG_VERSION:=1.5
PKG_RELEASE:=5
PKG_MD5SUM:=063f03a2a8363b9d4cb0f73b20b8dfce
PKG_SOURCE_URL:=http://miniupnp.free.fr/files
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
include $(INCLUDE_DIR)/package.mk
define Package/miniupnpd
SECTION:=net
CATEGORY:=Network
DEPENDS:=+iptables
TITLE:=Lightweight UPnP daemon
URL:=http://miniupnp.free.fr/
MAINTAINER:=Daniel Dickinson <openwrt@cshore.neomailbox.net>
endef
define Package/miniupnpd/conffiles
/etc/config/upnpd
endef
define Build/Compile
ln -sf $(PKG_BUILD_DIR)/config.h.openwrt $(PKG_BUILD_DIR)/config.h
$(MAKE) -C $(PKG_BUILD_DIR) -f Makefile.openwrt \
$(TARGET_CONFIGURE_OPTS) \
STAGING_DIR="$(STAGING_DIR)" \
CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include -I$(firstword $(wildcard $(KERNEL_BUILD_DIR)/iptables-*/include)) -DIPTABLES_143" \
LIBS="$(STAGING_DIR)/usr/lib/libiptc.so $(STAGING_DIR)/usr/lib/libip4tc.so $(STAGING_DIR)/usr/lib/libip6tc.so"
endef
define Package/miniupnpd/install
$(INSTALL_DIR) $(1)/usr/bin $(1)/etc/init.d $(1)/etc/config $(1)/etc/hotplug.d/firewall
$(INSTALL_BIN) $(PKG_BUILD_DIR)/miniupnpd $(1)/usr/bin/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/firewall/50-miniupnpd
endef
$(eval $(call BuildPackage,miniupnpd))