ipset: size optimizations
[openwrt/openwrt.git] / package / network / utils / ipset / Makefile
1
2 # Copyright (C) 2009-2012 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 #
8 include $(TOPDIR)/rules.mk
9 include $(INCLUDE_DIR)/kernel.mk
10
11 PKG_NAME:=ipset
12 PKG_VERSION:=7.1
13 PKG_RELEASE:=3
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:=http://ipset.netfilter.org
17 PKG_HASH:=7b5eb3b93205c20cdc39e3fc8b6e5f7bb214bf79a7c0c00729dd4a31ce16adc4
18
19 PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
20 PKG_LICENSE:=GPL-2.0
21
22 PKG_FIXUP:=autoreconf
23 PKG_INSTALL:=1
24
25 include $(INCLUDE_DIR)/package.mk
26
27 define Package/ipset/Default
28 SECTION:=net
29 CATEGORY:=Network
30 DEPENDS+= +kmod-ipt-ipset +libmnl
31 TITLE:=IPset administration utility
32 URL:=http://ipset.netfilter.org/
33 endef
34
35 define Package/ipset
36 $(call Package/ipset/Default)
37 DEPENDS+= +libipset
38 endef
39
40 define Package/libipset
41 $(call Package/ipset/Default)
42 ABI_VERSION:=13
43 endef
44
45 CONFIGURE_ARGS += \
46 --disable-static \
47 --with-kbuild="$(LINUX_DIR)"
48
49 TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
50
51 MAKE_FLAGS += \
52 ARCH="$(LINUX_KARCH)" \
53 SHELL="$(BASH)"
54
55 define Build/InstallDev
56 $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib $(1)/usr/lib/pkgconfig
57 $(CP) $(PKG_INSTALL_DIR)/usr/include/libipset $(1)/usr/include/
58 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libipset.so* $(1)/usr/lib/
59 $(CP) $(PKG_BUILD_DIR)/lib/libipset.pc $(1)/usr/lib/pkgconfig/
60 endef
61
62 define Package/ipset/install
63 $(INSTALL_DIR) $(1)/usr/sbin
64 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/ipset $(1)/usr/sbin/
65 endef
66
67 define Package/libipset/install
68 $(INSTALL_DIR) $(1)/usr/lib
69 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libipset*.so.* $(1)/usr/lib/
70 endef
71
72 $(eval $(call BuildPackage,ipset))
73 $(eval $(call BuildPackage,libipset))