b621883ad565b6feed3681dda3a1f319537eb81a
[openwrt/svn-archive/archive.git] / net / miniupnpd / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=miniupnpd
12 PKG_VERSION:=1.0-RC6
13 PKG_RELEASE:=2
14 PKG_MD5SUM:=6cb5f0710050b5be0d976383985b012b
15
16 PKG_SOURCE_URL:=http://miniupnp.free.fr/files
17 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
18 PKG_CAT:=zcat
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/miniupnpd
26 SECTION:=net
27 CATEGORY:=Network
28 DEPENDS:=+iptables
29 TITLE:=Lightweight UPnP daemon
30 URL:=http://miniupnp.tuxfamily.org/
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/iface
44 $(INSTALL_BIN) $(PKG_BUILD_DIR)/miniupnpd $(1)/usr/bin/
45 $(INSTALL_BIN) $(PKG_BUILD_DIR)/linux/*.sh $(1)/usr/bin/
46 $(INSTALL_BIN) ./files/miniupnpd.init $(1)/etc/init.d/miniupnpd
47 $(INSTALL_DATA) ./files/upnpd.config $(1)/etc/config/upnpd
48 $(INSTALL_DATA) ./files/miniupnpd.hotplug $(1)/etc/hotplug.d/iface/20-miniupnpd
49 endef
50
51 $(eval $(call BuildPackage,miniupnpd))