Makefile 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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_CPE_ID:=cpe:/a:netfilter:libnftnl
  10. PKG_VERSION:=1.2.6
  11. PKG_RELEASE:=1
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  13. PKG_SOURCE_URL:=https://netfilter.org/projects/$(PKG_NAME)/files
  14. PKG_HASH:=ceeaea2cd92147da19f13a35a7f1a4bc2767ff897e838e4b479cf54b59c777f4
  15. PKG_MAINTAINER:=Steven Barth <steven@midlink.org>
  16. PKG_LICENSE:=GPL-2.0-or-later
  17. PKG_LICENSE_FILES:=COPYING
  18. PKG_INSTALL:=1
  19. PKG_BUILD_PARALLEL:=1
  20. PKG_BUILD_FLAGS:=lto
  21. include $(INCLUDE_DIR)/package.mk
  22. DISABLE_NLS:=
  23. define Package/libnftnl
  24. SECTION:=libs
  25. CATEGORY:=Libraries
  26. DEPENDS:=+libmnl
  27. TITLE:=Low-level netlink library for the nf_tables subsystem
  28. URL:=http://www.netfilter.org/projects/libnftnl
  29. ABI_VERSION:=11
  30. endef
  31. define Package/libnftnl/description
  32. libnftnl is a userspace library providing a low-level netlink
  33. programming interface (API) to the in-kernel nf_tables subsystem.
  34. endef
  35. TARGET_CFLAGS += $(FPIC)
  36. CONFIGURE_ARGS += \
  37. --enable-static \
  38. --enable-shared
  39. define Build/InstallDev
  40. $(INSTALL_DIR) $(1)/usr/include/libnftnl
  41. $(CP) \
  42. $(PKG_INSTALL_DIR)/usr/include/libnftnl/*.h \
  43. $(1)/usr/include/libnftnl/
  44. $(INSTALL_DIR) $(1)/usr/lib
  45. $(CP) \
  46. $(PKG_INSTALL_DIR)/usr/lib/libnftnl.{so*,a,la} \
  47. $(1)/usr/lib/
  48. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  49. $(CP) \
  50. $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libnftnl.pc \
  51. $(1)/usr/lib/pkgconfig/
  52. endef
  53. define Package/libnftnl/install
  54. $(INSTALL_DIR) $(1)/usr/lib
  55. $(CP) \
  56. $(PKG_INSTALL_DIR)/usr/lib/libnftnl.so.* \
  57. $(1)/usr/lib/
  58. endef
  59. $(eval $(call BuildPackage,libnftnl))