[8.09] backport miniupnpd v1.4 (#6161)
[openwrt/svn-archive/archive.git] / net / miniupnpd / Makefile
1 #
2 # Copyright (C) 2006-2009 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.4
13 PKG_RELEASE:=1
14 PKG_MD5SUM:=ffa33d4ed8732c662bdb7d511e86db76
15
16 PKG_SOURCE_URL:=http://miniupnp.free.fr/files
17 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/miniupnpd
22 SECTION:=net
23 CATEGORY:=Network
24 DEPENDS:=+iptables
25 TITLE:=Lightweight UPnP daemon
26 URL:=http://miniupnp.free.fr/
27 endef
28
29 define Package/miniupnpd/conffiles
30 /etc/config/upnpd
31 endef
32
33 define Build/Compile
34 ln -sf $(PKG_BUILD_DIR)/config.h.openwrt $(PKG_BUILD_DIR)/config.h
35 $(MAKE) -C $(PKG_BUILD_DIR) -f Makefile.openwrt \
36 $(TARGET_CONFIGURE_OPTS) \
37 STAGING_DIR="$(STAGING_DIR)" \
38 CFLAGS="$(TARGET_CFLAGS) -I $(STAGING_DIR)/usr/include" \
39 LIBS="$(STAGING_DIR)/usr/lib/libiptc.a"
40 endef
41
42 define Package/miniupnpd/install
43 $(INSTALL_DIR) $(1)/usr/bin $(1)/etc/init.d $(1)/etc/config $(1)/etc/hotplug.d/firewall
44 $(INSTALL_BIN) $(PKG_BUILD_DIR)/miniupnpd $(1)/usr/bin/miniupnpd
45 $(INSTALL_BIN) ./files/miniupnpd.init $(1)/etc/init.d/miniupnpd
46 $(INSTALL_CONF) ./files/upnpd.config $(1)/etc/config/upnpd
47 $(INSTALL_DATA) ./files/miniupnpd.hotplug $(1)/etc/hotplug.d/firewall/50-miniupnpd
48 endef
49
50 $(eval $(call BuildPackage,miniupnpd))