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