Makefile 1.6 KB

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