ad61e6d1cec411f69ea564b1c0953cab58bd8468
[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-RC1
13 PKG_RELEASE:=1
14 PKG_MD5SUM:=ab752eebbebcfa84178de0a4632d7688
15
16 PKG_SOURCE_URL:=http://miniupnp.tuxfamily.org/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 DESCRIPTION:=\
31 Lightweight UPnP daemon
32 URL:=http://miniupnp.tuxfamily.org/
33 endef
34
35 define Package/miniupnpd/postinst
36 /etc/init.d/miniupnpd enable
37 endef
38
39 define Build/Compile
40 $(MAKE) \
41 -C $(PKG_BUILD_DIR) \
42 -f Makefile.linux \
43 $(TARGET_CONFIGURE_OPTS) \
44 CFLAGS="$(TARGET_CFLAGS) -I $(STAGING_DIR)/usr/include" \
45 LIBS="$(STAGING_DIR)/usr/lib/libiptc.a"
46 endef
47
48 define Package/miniupnpd/install
49 $(INSTALL_DIR) $(1)/usr/bin $(1)/etc/init.d $(1)/etc/config $(1)/etc/hotplug.d/iface
50 $(INSTALL_BIN) $(PKG_BUILD_DIR)/miniupnpd $(1)/usr/bin/
51 $(INSTALL_BIN) $(PKG_BUILD_DIR)/linux/*.sh $(1)/usr/bin/
52 $(INSTALL_BIN) ./files/miniupnpd.init $(1)/etc/init.d/miniupnpd
53 $(INSTALL_DATA) ./files/upnpd.config $(1)/etc/config/upnpd
54 $(INSTALL_DATA) ./files/miniupnpd.hotplug $(1)/etc/hotplug.d/iface/10-miniupnpd
55 endef
56
57 $(eval $(call BuildPackage,miniupnpd))