86bff45365fb70a521f7a184bdea380ae67f1f8d
[openwrt/svn-archive/archive.git] / net / natpmp / Makefile
1 include $(TOPDIR)/rules.mk
2
3 PKG_NAME:=natpmp
4 PKG_VERSION:=0.2.1
5 PKG_RELEASE:=1
6
7 PKG_SOURCE_URL:=http://download.savannah.nongnu.org/releases/natpmp/
8 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
9 PKG_MD5SUM:=b0b1fea34ecd2c99f75c01a6728c9a7b
10
11 PKG_CAT:=zcat
12 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
13 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
14
15 include $(INCLUDE_DIR)/package.mk
16
17 define Package/natpmp
18 SECTION:=net
19 CATEGORY:=Network
20 DEPENDS:=+ip
21 TITLE:=A daemon implementing NAT-PMP
22 URL:=http://savannah.nongnu.org/projects/natpmp
23 endef
24
25 define Package/natpmp/description
26 stunnel replacement based on xyssl
27 endef
28
29 define Build/Configure
30 endef
31
32 define Build/Compile
33 rm -rf $(PKG_INSTALL_DIR)
34 $(MAKE) -C $(PKG_BUILD_DIR) \
35 $(TARGET_CONFIGURE_OPTS) \
36 CC="$(TARGET_CC)" \
37 LD="$(TARGET_CC)" \
38 CCFLAGS="$(strip $(TARGET_CFLAGS))" \
39 CPPFLAGS="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/include" \
40 LDFLAGS="-L$(STAGING_DIR)/usr/lib" \
41 prefix="$(PKG_INSTALL_DIR)/usr"
42 mkdir -p $(PKG_INSTALL_DIR)/usr/sbin
43 $(CP) $(PKG_BUILD_DIR)/natpmp $(PKG_INSTALL_DIR)/usr/sbin
44 endef
45
46 define Package/natpmp/install
47 $(INSTALL_DIR) $(1)/usr/sbin
48 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/natpmp $(1)/usr/sbin
49 $(RSTRIP) $(1)/usr/sbin/natpmp
50
51 $(INSTALL_DIR) $(1)/etc/config
52 $(INSTALL_DATA) ./files/natpmp.config $(1)/etc/config/natpmp
53 $(INSTALL_DIR) $(1)/etc/init.d
54 $(INSTALL_BIN) ./files/natpmp.init $(1)/etc/init.d/natpmp
55 endef
56
57 $(eval $(call BuildPackage,natpmp))