dcbc557d77a1a10c872b23182a09c434c3580cc1
[12.09/packages.git] / net / miniupnpd / Makefile
1 #
2 # Copyright (C) 2006-2012 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9 include $(INCLUDE_DIR)/kernel.mk
10
11 PKG_NAME:=miniupnpd
12 PKG_VERSION:=1.6.20110730
13 PKG_RELEASE:=6
14
15 PKG_SOURCE_URL:=http://miniupnp.free.fr/files
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
17 PKG_MD5SUM:=8bd5c0447b6dc1101b96e958ee67d3ea
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/miniupnpd
22   SECTION:=net
23   CATEGORY:=Network
24   DEPENDS:=+iptables +libip4tc
25   TITLE:=Lightweight UPnP daemon
26   SUBMENU:=Firewall
27   URL:=http://miniupnp.free.fr/
28   MAINTAINER:=Daniel Dickinson <openwrt@cshore.neomailbox.net>
29 endef
30
31 define Package/miniupnpd/conffiles
32 /etc/config/upnpd
33 endef
34
35 define Build/Compile
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)" \
40                 CC="$(TARGET_CC)" \
41                 TARGET_OPENWRT=1 \
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"
44 endef
45
46 define Package/miniupnpd/install
47         $(INSTALL_DIR) $(1)/usr/sbin $(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/sbin/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
54 endef
55
56 $(eval $(call BuildPackage,miniupnpd))