Makefile 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. #
  2. # Copyright (C) 2014 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=libnftnl
  9. PKG_VERSION:=1.0.3
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  12. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  13. PKG_SOURCE_URL:=git://git.netfilter.org/libnftnl
  14. PKG_SOURCE_PROTO:=git
  15. PKG_SOURCE_VERSION:=libnftnl-1.0.3
  16. PKG_MAINTAINER:=Steven Barth <steven@midlink.org>
  17. PKG_LICENSE:=GPL-2.0+
  18. PKG_FIXUP:=autoreconf
  19. PKG_INSTALL:=1
  20. include $(INCLUDE_DIR)/package.mk
  21. define Package/libnftnl
  22. SECTION:=libs
  23. CATEGORY:=Libraries
  24. DEPENDS:=+libmnl
  25. TITLE:=Low-level netlink library for the nf_tables subsystem
  26. URL:=http://www.netfilter.org/projects/libnftnl
  27. endef
  28. define Package/libnftnl/description
  29. libnftnl is a userspace library providing a low-level netlink
  30. programming interface (API) to the in-kernel nf_tables subsystem.
  31. endef
  32. TARGET_CFLAGS += $(FPIC)
  33. CONFIGURE_ARGS += \
  34. --enable-static \
  35. --enable-shared \
  36. --without-json-parsing \
  37. --without-xml-parsing \
  38. define Build/InstallDev
  39. $(INSTALL_DIR) $(1)/usr/include/libnftnl
  40. $(CP) \
  41. $(PKG_INSTALL_DIR)/usr/include/libnftnl/*.h \
  42. $(1)/usr/include/libnftnl/
  43. $(INSTALL_DIR) $(1)/usr/lib
  44. $(CP) \
  45. $(PKG_INSTALL_DIR)/usr/lib/libnftnl.{so*,a,la} \
  46. $(1)/usr/lib/
  47. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  48. $(CP) \
  49. $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libnftnl.pc \
  50. $(1)/usr/lib/pkgconfig/
  51. endef
  52. define Package/libnftnl/install
  53. $(INSTALL_DIR) $(1)/usr/lib
  54. $(CP) \
  55. $(PKG_INSTALL_DIR)/usr/lib/libnftnl.so.* \
  56. $(1)/usr/lib/
  57. endef
  58. $(eval $(call BuildPackage,libnftnl))