[packages] add libnetfilter-log
[openwrt/svn-archive/archive.git] / libs / libnetfilter-log / Makefile
1 #
2 # Copyright (C) 2009 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 include $(INCLUDE_DIR)/kernel.mk
11
12 PKG_NAME:=libnetfilter_log
13 PKG_VERSION:=0.0.15
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:=ftp://ftp.netfilter.org/pub/libnetfilter_log/
17 PKG_MD5SUM:=310ddd9e0c2bb6108b5fa33cd2666008
18
19 PKG_FIXUP:=libtool
20
21 include $(INCLUDE_DIR)/package.mk
22
23 define Package/libnetfilter-log
24 SECTION:=libs
25 CATEGORY:=Libraries
26 DEPENDS:=@LINUX_2_6 +libnfnetlink +kmod-nfnetlink-log
27 TITLE:=API to packets logged by the kernel packet filter
28 URL:=http://www.netfilter.org/projects/libnetfilter_log/
29 endef
30
31 define Package/libnetfilter-log/description
32 libnetfilter_log is a userspace library providing interface to
33 packets that have been logged by the kernel packet filter.
34 endef
35
36 TARGET_CFLAGS += $(FPIC)
37
38 CONFIGURE_ARGS += \
39 --enable-static \
40 --enable-shared \
41
42 CONFIGURE_VARS += \
43 LIBNFNETLINK_CFLAGS="-I$(STAGING_DIR)/usr/include" \
44 LIBNFNETLINK_LIBS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib"
45
46 define Build/Compile
47 $(MAKE) -C $(PKG_BUILD_DIR) all
48 $(call libtool_fixup_libdir)
49 $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" install
50 endef
51
52
53 define Build/InstallDev
54 $(INSTALL_DIR) $(1)/usr/include/libnetfilter_log
55 $(INSTALL_DATA) \
56 $(PKG_INSTALL_DIR)/usr/include/libnetfilter_log/*.h \
57 $(1)/usr/include/libnetfilter_log/
58
59 $(INSTALL_DIR) $(1)/usr/lib
60 $(CP) \
61 $(PKG_INSTALL_DIR)/usr/lib/libnetfilter_log*.{so*,a,la} \
62 $(1)/usr/lib/
63
64 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
65 $(INSTALL_DATA) \
66 $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libnetfilter_log.pc \
67 $(1)/usr/lib/pkgconfig/
68 endef
69
70 define Package/libnetfilter-log/install
71 $(INSTALL_DIR) $(1)/usr/lib
72 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnetfilter_log*.so.* $(1)/usr/lib/
73 endef
74
75 $(eval $(call BuildPackage,libnetfilter-log))