86837406ccaf26944dd5180b7dfa68a1e59d9739
[packages.git] / libs / libnfnetlink / Makefile
1 #
2 # Copyright (C) 2007-2010 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
10 PKG_NAME:=libnfnetlink
11 PKG_VERSION:=1.0.0
12 PKG_RELEASE:=2
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15 PKG_SOURCE_URL:= \
16         http://www.netfilter.org/projects/libnfnetlink/files/ \
17         ftp://ftp.netfilter.org/pub/libnfnetlink/ \
18         http://mirrors.evolva.ro/netfilter.org/libnfnetlink/
19 PKG_MD5SUM:=016fdec8389242615024c529acc1adb8
20
21 PKG_FIXUP:=libtool
22 PKG_REMOVE_FILES:=aclocal.m4 acinclude.m4 ltmain.sh
23
24 PKG_INSTALL:=1
25
26 include $(INCLUDE_DIR)/package.mk
27
28 define Package/libnfnetlink
29   SECTION:=libs
30   CATEGORY:=Libraries
31   DEPENDS:=@!LINUX_2_4
32   TITLE:=A low-level library for netfilter related kernel/userspace communication
33   URL:=http://netfilter.org/projects/libnfnetlink/
34 endef
35
36 define Package/libnfnetlink/description
37  libnfnetlink is is the low-level library for netfilter related kernel/userspace communication.
38  It provides a generic messaging infrastructure for in-kernel netfilter subsystems
39  (such as nfnetlink_log, nfnetlink_queue, nfnetlink_conntrack) and their respective users
40  and/or management tools in userspace.
41 endef
42
43 TARGET_CFLAGS += $(FPIC)
44
45 CONFIGURE_ARGS += \
46         --enable-static \
47         --enable-shared
48
49 define Build/InstallDev
50         $(INSTALL_DIR) $(1)/usr/include/libnfnetlink
51         $(CP) \
52                 $(PKG_INSTALL_DIR)/usr/include/libnfnetlink/{libnfnetlink,linux_nfnetlink,linux_nfnetlink_compat}.h \
53                 $(1)/usr/include/libnfnetlink/
54         $(INSTALL_DIR) $(1)/usr/lib
55         $(CP) \
56                 $(PKG_INSTALL_DIR)/usr/lib/libnfnetlink.{a,so*} \
57                 $(1)/usr/lib/
58         $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
59         $(CP) \
60                 $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libnfnetlink.pc \
61                 $(1)/usr/lib/pkgconfig/
62 endef
63
64 define Package/libnfnetlink/install
65         $(INSTALL_DIR) $(1)/usr/lib
66         $(CP) \
67                 $(PKG_INSTALL_DIR)/usr/lib/libnfnetlink.so.* \
68                 $(1)/usr/lib/
69 endef
70
71 $(eval $(call BuildPackage,libnfnetlink))