2 # Copyright (C) 2006-2011 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
9 include $(INCLUDE_DIR)/kernel.mk
12 PKG_VERSION:=1.5.20110309
14 PKG_MD5SUM:=350d20bf25922e12f8d69e06fa33fd83
16 PKG_SOURCE_URL:=http://miniupnp.free.fr/files
17 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
19 include $(INCLUDE_DIR)/package.mk
21 define Package/miniupnpd
24 DEPENDS:=+iptables +libip4tc
25 TITLE:=Lightweight UPnP daemon
27 URL:=http://miniupnp.free.fr/
28 MAINTAINER:=Daniel Dickinson <openwrt@cshore.neomailbox.net>
31 define Package/miniupnpd/conffiles
36 echo "OpenWRT/$(OPENWRTVERSION)" | tr \(\)\ _ >$(PKG_BUILD_DIR)/os.openwrt
37 $(MAKE) -C $(PKG_BUILD_DIR) -f Makefile.linux \
38 $(TARGET_CONFIGURE_OPTS) \
39 STAGING_DIR="$(STAGING_DIR)" \
42 CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include -I$(firstword $(wildcard $(KERNEL_BUILD_DIR)/iptables-*/include)) -DIPTABLES_143" \
43 LIBS="$(STAGING_DIR)/usr/lib/libip4tc.so"
46 define Package/miniupnpd/install
47 $(INSTALL_DIR) $(1)/usr/bin $(1)/etc/init.d $(1)/etc/config $(1)/etc/hotplug.d/iface $(1)/etc/hotplug.d/firewall
48 $(INSTALL_BIN) $(PKG_BUILD_DIR)/miniupnpd $(1)/usr/bin/miniupnpd
49 $(INSTALL_BIN) ./files/miniupnpd.init $(1)/etc/init.d/miniupnpd
50 $(INSTALL_CONF) ./files/upnpd.config $(1)/etc/config/upnpd
51 $(INSTALL_DATA) ./files/miniupnpd.iface.hotplug $(1)/etc/hotplug.d/iface/50-miniupnpd
52 $(INSTALL_DATA) ./files/miniupnpd.firewall.hotplug $(1)/etc/hotplug.d/firewall/50-miniupnpd
53 $(INSTALL_DIR) $(1)/usr/share/miniupnpd
56 $(eval $(call BuildPackage,miniupnpd))