#
-# Copyright (C) 2006 OpenWrt.org
+# Copyright (C) 2006-2009 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
-# $Id$
include $(TOPDIR)/rules.mk
+include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=miniupnpd
-PKG_VERSION:=20061129
-PKG_RELEASE:=1
-PKG_MD5SUM:=1826c480e61e0573dfa1d835ee9d8802
+PKG_VERSION:=1.3
+PKG_RELEASE:=2
+PKG_MD5SUM:=b5e70e80dcf45b424b8fe3c966bdc613
-PKG_SOURCE_URL:=http://miniupnp.tuxfamily.org/files
-PKG_SOURCE:=$(PKG_NAME)$(PKG_VERSION).tar.gz
-PKG_CAT:=zcat
-
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
-PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
+PKG_SOURCE_URL:=http://miniupnp.free.fr/files
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
include $(INCLUDE_DIR)/package.mk
CATEGORY:=Network
DEPENDS:=+iptables
TITLE:=Lightweight UPnP daemon
- DESCRIPTION:=\
- Lightweight UPnP daemon
- URL:=http://miniupnp.tuxfamily.org/
+ URL:=http://miniupnp.free.fr/
endef
define Build/Compile
- $(MAKE) -C $(PKG_BUILD_DIR) -f Makefile.openwrt
+ ln -sf $(PKG_BUILD_DIR)/config.h.openwrt $(PKG_BUILD_DIR)/config.h
+ $(MAKE) -C $(PKG_BUILD_DIR) -f Makefile.openwrt \
+ $(TARGET_CONFIGURE_OPTS) \
+ STAGING_DIR="$(STAGING_DIR)" \
+ CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include -I$(KERNEL_BUILD_DIR)/iptables-1.4.3.2/include -DIPTABLES_143" \
+ LIBS="$(STAGING_DIR)/usr/lib/libiptc.so"
endef
define Package/miniupnpd/install
- $(INSTALL_DIR) $(1)/usr/bin $(1)/etc/init.d $(1)/etc/config $(1)/CONTROL
+ $(INSTALL_DIR) $(1)/usr/bin $(1)/etc/init.d $(1)/etc/config $(1)/etc/hotplug.d/iface $(1)/lib/miniupnpd
$(INSTALL_BIN) $(PKG_BUILD_DIR)/miniupnpd $(1)/usr/bin/
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/linux/*.sh $(1)/usr/bin/
$(INSTALL_BIN) ./files/miniupnpd.init $(1)/etc/init.d/miniupnpd
- $(INSTALL_BIN) ./files/upnpd.config $(1)/etc/config/upnpd
- $(INSTALL_BIN) ./ipkg/miniupnp.postinst $(1)/CONTROL/postinst
- $(STRIP) $(1)/usr/bin/miniupnpd
+ $(INSTALL_DATA) ./files/upnpd.config $(1)/etc/config/upnpd
+ $(INSTALL_DATA) ./files/miniupnpd.hotplug $(1)/etc/hotplug.d/iface/20-miniupnpd
+ $(INSTALL_DATA) ./files/miniupnpd.firewall $(1)/lib/miniupnpd/firewall.sh
endef
$(eval $(call BuildPackage,miniupnpd))