Retain symlinks. $(INSTALL_*) copys the contens of a file, so if we want to keep
[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 PKG_FIXUP:=libtool
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/libnetfilter-queue
22 SECTION:=libs
23 CATEGORY:=Libraries
24 DEPENDS:=@LINUX_2_6 +libnfnetlink
25 TITLE:=libnetfilter_queue
26 URL:=http://www1.cs.columbia.edu/~angelos/libnetfilter_queue.html
27 endef
28
29 define Package/libnetfilter-queue/description
30 libnetfilter_queue is a userspace library providing an API to packets
31 that have been queued by the kernel packet filter. It is is part of a system
32 that deprecates the old ip_queue / libipq mechanism.
33 endef
34
35 TARGET_CFLAGS += $(FPIC)
36
37 CONFIGURE_ARGS += \
38 --enable-static \
39 --enable-shared \
40 LIBNFNETLINK_CFLAGS="-I$(STAGING_DIR)/usr/include" \
41 LIBNFNETLINK_LIBS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib"
42
43 define Build/Compile
44 $(MAKE) -C $(PKG_BUILD_DIR) \
45 CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include" \
46 LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib -lc -L$(TOOLCHAIN_DIR)/lib" \
47 DESTDIR="$(PKG_INSTALL_DIR)" \
48 all install
49 endef
50
51
52 define Build/InstallDev
53 $(INSTALL_DIR) $(1)/usr/include/libnetfilter_queue
54 $(INSTALL_DATA) \
55 $(PKG_INSTALL_DIR)/usr/include/libnetfilter_queue/*.h \
56 $(1)/usr/include/libnetfilter_queue/
57
58 $(INSTALL_DIR) $(1)/usr/lib
59 $(CP) \
60 $(PKG_INSTALL_DIR)/usr/lib/libnetfilter_queue*.{so*,a,la} \
61 $(1)/usr/lib/
62
63 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
64 $(INSTALL_DATA) \
65 $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \
66 $(1)/usr/lib/pkgconfig/
67 endef
68
69 define Package/libnetfilter-queue/install
70 $(INSTALL_DIR) $(1)/usr/lib
71 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnetfilter_queue*.so* $(1)/usr/lib/
72 endef
73
74 $(eval $(call BuildPackage,libnetfilter-queue))