2 # Copyright (C) 2006-2009 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.20110302
14 PKG_MD5SUM:=9c2906a2f87d9b9504e4fc09488afe41
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
25 TITLE:=Lightweight UPnP daemon
26 URL:=http://miniupnp.free.fr/
27 MAINTAINER:=Daniel Dickinson <openwrt@cshore.neomailbox.net>
30 define Package/miniupnpd/conffiles
35 echo "OpenWRT/$(OPENWRTVERSION)" | tr \(\)\ _ >$(PKG_BUILD_DIR)/os.openwrt
36 $(MAKE) -C $(PKG_BUILD_DIR) -f Makefile.openwrt \
37 $(TARGET_CONFIGURE_OPTS) \
38 STAGING_DIR="$(STAGING_DIR)" \
39 CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include -I$(firstword $(wildcard $(KERNEL_BUILD_DIR)/iptables-*/include)) -DIPTABLES_143" \
40 LIBS="$(STAGING_DIR)/usr/lib/libiptc.so $(STAGING_DIR)/usr/lib/libip4tc.so $(STAGING_DIR)/usr/lib/libip6tc.so"
43 define Package/miniupnpd/install
44 $(INSTALL_DIR) $(1)/usr/bin $(1)/etc/init.d $(1)/etc/config $(1)/etc/hotplug.d/iface $(1)/etc/hotplug.d/firewall
45 $(INSTALL_BIN) $(PKG_BUILD_DIR)/miniupnpd $(1)/usr/bin/miniupnpd
46 $(INSTALL_BIN) ./files/miniupnpd.init $(1)/etc/init.d/miniupnpd
47 $(INSTALL_CONF) ./files/upnpd.config $(1)/etc/config/upnpd
48 $(INSTALL_DATA) ./files/miniupnpd.iface.hotplug $(1)/etc/hotplug.d/iface/50-miniupnpd
49 $(INSTALL_DATA) ./files/miniupnpd.firewall.hotplug $(1)/etc/hotplug.d/firewall/50-miniupnpd
52 $(eval $(call BuildPackage,miniupnpd))