ipset: update to 7.1
[openwrt/openwrt.git] / package / network / utils / ipset / Makefile
index d53b044e2622ec0ebb93add4543653229966d42e..7efbc401534306c745eb694c2e59562b492b140c 100644 (file)
@@ -1,4 +1,4 @@
+
 # Copyright (C) 2009-2012 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
@@ -9,14 +9,15 @@ include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=ipset
-PKG_VERSION:=6.16.1
+PKG_VERSION:=7.1
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://ipset.netfilter.org
-PKG_MD5SUM:=9fd70c825f052db7dc9d5ba0562b7083
+PKG_HASH:=7b5eb3b93205c20cdc39e3fc8b6e5f7bb214bf79a7c0c00729dd4a31ce16adc4
 
-PKG_MAINTAINER:=Jo-Philipp Wich <jow@openwrt.org>
+PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
+PKG_LICENSE:=GPL-2.0
 
 PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
@@ -24,11 +25,6 @@ PKG_INSTALL:=1
 include $(INCLUDE_DIR)/package.mk
 
 define Package/ipset/Default
-  DEPENDS:= @(!(TARGET_ps3||TARGET_pxcab)||BROKEN)
-endef
-
-define Package/ipset
-$(call Package/ipset/Default)
   SECTION:=net
   CATEGORY:=Network
   DEPENDS+= +kmod-ipt-ipset +libmnl
@@ -36,47 +32,38 @@ $(call Package/ipset/Default)
   URL:=http://ipset.netfilter.org/
 endef
 
+define Package/ipset
+$(call Package/ipset/Default)
+  DEPENDS+= +libipset
+endef
+
+define Package/libipset
+$(call Package/ipset/Default)
+endef
+
 CONFIGURE_ARGS += \
        --with-kbuild="$(LINUX_DIR)"
 
 MAKE_FLAGS += \
-       ARCH="$(LINUX_KARCH)"
+       ARCH="$(LINUX_KARCH)" \
+       SHELL="$(BASH)"
 
-IPSET_MODULES:= \
-       ipset/ip_set \
-       ipset/ip_set_bitmap_ip \
-       ipset/ip_set_bitmap_ipmac \
-       ipset/ip_set_bitmap_port \
-       ipset/ip_set_hash_ip \
-       ipset/ip_set_hash_ipport \
-       ipset/ip_set_hash_ipportip \
-       ipset/ip_set_hash_ipportnet \
-       ipset/ip_set_hash_net \
-       ipset/ip_set_hash_netiface \
-       ipset/ip_set_hash_netport \
-       ipset/ip_set_list_set \
-       xt_set \
-
-define Build/Compile
-       $(call Build/Compile/Default)
-       $(call Build/Compile/Default,modules)
+define Build/InstallDev
+       $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib $(1)/usr/lib/pkgconfig
+       $(CP) $(PKG_INSTALL_DIR)/usr/include/libipset $(1)/usr/include/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libipset.{a,so*} $(1)/usr/lib/
+       $(CP) $(PKG_BUILD_DIR)/lib/libipset.pc $(1)/usr/lib/pkgconfig/
 endef
 
 define Package/ipset/install
        $(INSTALL_DIR) $(1)/usr/sbin
        $(CP) $(PKG_INSTALL_DIR)/usr/sbin/ipset $(1)/usr/sbin/
-       $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libipset*.so* $(1)/usr/lib/
 endef
 
-define KernelPackage/ipt-ipset
-$(call Package/ipset/Default)
-  SUBMENU:=Netfilter Extensions
-  TITLE:=IPset netfilter modules
-  DEPENDS+= +kmod-ipt-core +kmod-nfnetlink
-  FILES:=$(foreach mod,$(IPSET_MODULES),$(PKG_BUILD_DIR)/kernel/net/netfilter/$(mod).ko)
-  AUTOLOAD:=$(call AutoLoad,49,$(notdir $(IPSET_MODULES)))
+define Package/libipset/install
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libipset*.so* $(1)/usr/lib/
 endef
 
 $(eval $(call BuildPackage,ipset))
-$(eval $(call KernelPackage,ipt-ipset))
+$(eval $(call BuildPackage,libipset))