f44c1de23238379e4fdc0aa64292168fbf6bb85e
[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:=6.32
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:=http://ipset.netfilter.org
17 PKG_HASH:=d9cbb49a4ae9e32d7808a604f1a37f359f9fc9064c210c4c5f35d629d49fb9fe
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
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 CONFIGURE_ARGS += \
36 --with-kbuild="$(LINUX_DIR)"
37
38 MAKE_FLAGS += \
39 ARCH="$(LINUX_KARCH)" \
40 SHELL="$(BASH)"
41
42 define Build/Compile
43 $(call Build/Compile/Default)
44 endef
45
46 define Build/InstallDev
47 $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib $(1)/usr/lib/pkgconfig
48 $(CP) $(PKG_INSTALL_DIR)/usr/include/libipset $(1)/usr/include/
49 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libipset.{a,so*} $(1)/usr/lib/
50 $(CP) $(PKG_BUILD_DIR)/lib/libipset.pc $(1)/usr/lib/pkgconfig/
51 endef
52
53 define Package/ipset/install
54 $(INSTALL_DIR) $(1)/usr/sbin
55 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/ipset $(1)/usr/sbin/
56 $(INSTALL_DIR) $(1)/usr/lib
57 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libipset*.so* $(1)/usr/lib/
58 endef
59
60 $(eval $(call BuildPackage,ipset))