9321fc1fdb87189e12518919c6c1d0d2fba64352
[openwrt/svn-archive/archive.git] / libs / libnetfilter-queue / Makefile
1 #
2 # Copyright (C) 2007-2008 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=libnetfilter_queue
12 PKG_VERSION:=0.0.13
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15 PKG_SOURCE_URL:=ftp://ftp.netfilter.org/pub/libnetfilter_queue/
16 PKG_MD5SUM:=660cbfd3dc8c10bf9b1803cd2b688256
17
18 include $(INCLUDE_DIR)/package.mk
19
20 define Package/libnetfilter-queue
21 SECTION:=libs
22 CATEGORY:=Libraries
23 DEPENDS:=@LINUX_2_6 +libnfnetlink
24 TITLE:=libnetfilter_queue
25 URL:=http://www1.cs.columbia.edu/~angelos/libnetfilter_queue.html
26 endef
27
28 define Package/libnetfilter-queue/description
29 libnetfilter_queue is a userspace library providing an API to packets
30 that have been queued by the kernel packet filter. It is is part of a system
31 that deprecates the old ip_queue / libipq mechanism.
32 endef
33
34 TARGET_CFLAGS += $(FPIC)
35
36 CONFIGURE_ARGS += \
37 --enable-static \
38 --enable-shared \
39 LIBNFNETLINK_CFLAGS="-I$(STAGING_DIR)/usr/include" \
40 LIBNFNETLINK_LIBS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib"
41
42 MAKE_FLAGS += \
43 CFLAGS="$(TARGET_CFLAGS)"
44
45
46 define Build/Compile
47 $(MAKE) -C $(PKG_BUILD_DIR) \
48 CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include" \
49 LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
50 DESTDIR="$(PKG_INSTALL_DIR)" \
51 all install
52 endef
53
54
55 define Build/InstallDev
56 $(INSTALL_DIR) $(1)/usr/include/libnetfilter_queue
57 $(INSTALL_DATA) \
58 $(PKG_INSTALL_DIR)/usr/include/libnetfilter_queue/*.h \
59 $(1)/usr/include/libnetfilter_queue/
60
61 $(INSTALL_DIR) $(1)/usr/lib
62 $(INSTALL_DATA) \
63 $(PKG_INSTALL_DIR)/usr/lib/libnetfilter_queue*.{so.*,la} \
64 $(1)/usr/lib/
65
66 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
67 $(INSTALL_DATA) \
68 $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \
69 $(1)/usr/lib/pkgconfig/
70 endef
71
72 define Package/libnetfilter-queue/install
73 $(INSTALL_DIR) $(1)/usr/lib
74 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libnetfilter_queue*.{so.*,a} $(1)/usr/lib/
75 endef
76
77 $(eval $(call BuildPackage,libnetfilter-queue))