adds apcupsd, thanks Matthias Eller , fixes #2157
[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.1
13 PKG_RELEASE:=1
14 PKG_MD5SUM:=a0f6651476721db9b554668c8c83b151
15
16 PKG_SOURCE_URL:=http://miniupnp.free.fr/files
17 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
18
19 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
20 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/miniupnpd
25 SECTION:=net
26 CATEGORY:=Network
27 DEPENDS:=+iptables
28 TITLE:=Lightweight UPnP daemon
29 URL:=http://miniupnp.tuxfamily.org/
30 endef
31
32 define Build/Compile
33 ln -sf $(PKG_BUILD_DIR)/config.h.openwrt $(PKG_BUILD_DIR)/config.h
34 $(MAKE) -C $(PKG_BUILD_DIR) -f Makefile.openwrt \
35 $(TARGET_CONFIGURE_OPTS) \
36 STAGING_DIR="$(STAGING_DIR)" \
37 CFLAGS="$(TARGET_CFLAGS) -I $(STAGING_DIR)/usr/include" \
38 LIBS="$(STAGING_DIR)/usr/lib/libiptc.a"
39 endef
40
41 define Package/miniupnpd/install
42 $(INSTALL_DIR) $(1)/usr/bin $(1)/etc/init.d $(1)/etc/config $(1)/etc/hotplug.d/iface
43 $(INSTALL_BIN) $(PKG_BUILD_DIR)/miniupnpd $(1)/usr/bin/
44 $(INSTALL_BIN) $(PKG_BUILD_DIR)/netfilter/*.sh $(1)/usr/bin/
45 $(INSTALL_BIN) ./files/miniupnpd.init $(1)/etc/init.d/miniupnpd
46 $(INSTALL_DATA) ./files/upnpd.config $(1)/etc/config/upnpd
47 $(INSTALL_DATA) ./files/miniupnpd.hotplug $(1)/etc/hotplug.d/iface/20-miniupnpd
48 endef
49
50 $(eval $(call BuildPackage,miniupnpd))