2 # Copyright (C) 2007-2012 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR)/rules.mk
14 PKG_SOURCE_URL:=http://download.savannah.nongnu.org/releases/natpmp/
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_MD5SUM:=f696565d59c488b9ad9f43625be93377
18 include $(INCLUDE_DIR)/package.mk
25 TITLE:=A daemon implementing NAT-PMP
26 URL:=http://savannah.nongnu.org/projects/natpmp
29 define Package/natpmp/description
30 This is a daemon implementing NAT-PMP. NAT-PMP is a protocol for
31 handling port forwarding requests from clients behind a NAT.
34 define Build/Configure
38 $(MAKE) -C $(PKG_BUILD_DIR) \
39 $(TARGET_CONFIGURE_OPTS) \
42 CFLAGS="$(strip $(TARGET_CFLAGS))" \
43 CPPFLAGS="$$$$CPPFLAGS $(TARGET_CPPFLAGS) -DIPTABLES_PATH=\\\"/usr/sbin\\\"" \
44 LDFLAGS="$(TARGET_LDFLAGS)" \
45 prefix="$(PKG_INSTALL_DIR)/usr"
48 define Package/natpmp/install
49 $(INSTALL_DIR) $(1)/usr/sbin
50 $(INSTALL_BIN) $(PKG_BUILD_DIR)/natpmp $(1)/usr/sbin
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
57 define Package/natpmp/conffiles
61 $(eval $(call BuildPackage,natpmp))