37cff3aca4b48397766e096a7517c6af0fa30111
[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:=2
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 --with-kbuild="$(LINUX_DIR)"
47
48 MAKE_FLAGS += \
49 ARCH="$(LINUX_KARCH)" \
50 SHELL="$(BASH)"
51
52 define Build/InstallDev
53 $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib $(1)/usr/lib/pkgconfig
54 $(CP) $(PKG_INSTALL_DIR)/usr/include/libipset $(1)/usr/include/
55 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libipset.{a,so*} $(1)/usr/lib/
56 $(CP) $(PKG_BUILD_DIR)/lib/libipset.pc $(1)/usr/lib/pkgconfig/
57 endef
58
59 define Package/ipset/install
60 $(INSTALL_DIR) $(1)/usr/sbin
61 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/ipset $(1)/usr/sbin/
62 endef
63
64 define Package/libipset/install
65 $(INSTALL_DIR) $(1)/usr/lib
66 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libipset*.so.* $(1)/usr/lib/
67 endef
68
69 $(eval $(call BuildPackage,ipset))
70 $(eval $(call BuildPackage,libipset))