1
0

Makefile 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. #
  2. # Copyright (C) 2006-2013 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:=libnl
  9. PKG_VERSION:=3.4.0
  10. PKG_RELEASE:=2
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://github.com/thom311/libnl/releases/download/libnl3_4_0
  13. PKG_HASH:=b7287637ae71c6db6f89e1422c995f0407ff2fe50cecd61a312b6a9b0921f5bf
  14. PKG_LICENSE:=LGPL-2.1
  15. PKG_INSTALL:=1
  16. PKG_FIXUP:=autoreconf
  17. include $(INCLUDE_DIR)/package.mk
  18. define Package/libnl/default
  19. SECTION:=libs
  20. CATEGORY:=Libraries
  21. URL:=http://www.infradead.org/~tgr/libnl/
  22. ABI_VERSION:=200
  23. endef
  24. define Package/libnl-core
  25. $(call Package/libnl/default)
  26. TITLE:=Core Netlink Library
  27. DEPENDS:=+libpthread
  28. endef
  29. define Package/libnl-genl
  30. $(call Package/libnl/default)
  31. TITLE:=Generic Netlink Library
  32. DEPENDS:=+libnl-core
  33. endef
  34. define Package/libnl-route
  35. $(call Package/libnl/default)
  36. TITLE:=Routing Netlink Library
  37. DEPENDS:=+libnl-core
  38. endef
  39. define Package/libnl-nf
  40. $(call Package/libnl/default)
  41. TITLE:=Netfilter Netlink Library
  42. DEPENDS:=+libnl-route
  43. endef
  44. define Package/libnl
  45. $(call Package/libnl/default)
  46. TITLE:=Full Netlink Library
  47. DEPENDS:=+libnl-genl +libnl-route +libnl-nf
  48. endef
  49. define Package/libnl-core/description
  50. Common code for all netlink libraries
  51. endef
  52. define Package/libnl-genl/description
  53. Generic Netlink Library Functions
  54. endef
  55. define Package/libnl-route/description
  56. Routing Netlink Library Functions
  57. endef
  58. define Package/libnl-nf/description
  59. Netfilter Netlink Library Functions
  60. endef
  61. define Package/libnl/description
  62. Socket handling, connection management, sending and receiving of data,
  63. message construction and parsing, object caching system, etc.
  64. endef
  65. TARGET_CFLAGS += -ffunction-sections -fdata-sections $(FPIC)
  66. CONFIGURE_ARGS += \
  67. --disable-debug
  68. define Build/InstallDev
  69. $(INSTALL_DIR) $(1)/usr/include/libnl3 $(1)/usr/lib/pkgconfig
  70. $(CP) $(PKG_INSTALL_DIR)/usr/include/libnl3/* $(1)/usr/include/libnl3/
  71. $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib
  72. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc $(1)/usr/lib/pkgconfig
  73. # Copy symlinks
  74. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnl-3.so $(1)/usr/lib/libnl.so
  75. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnl-genl-3.so $(1)/usr/lib/libnl-genl.so
  76. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnl-nf-3.so $(1)/usr/lib/libnl-nf.so
  77. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnl-route-3.so $(1)/usr/lib/libnl-route.so
  78. endef
  79. define Package/libnl-core/install
  80. $(INSTALL_DIR) $(1)/usr/lib
  81. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnl-3.so.* $(1)/usr/lib/
  82. endef
  83. define Package/libnl-genl/install
  84. $(INSTALL_DIR) $(1)/usr/lib
  85. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnl-genl-3.so.* $(1)/usr/lib/
  86. endef
  87. define Package/libnl-route/install
  88. $(INSTALL_DIR) $(1)/usr/lib
  89. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnl-route-3.so.* $(1)/usr/lib/
  90. endef
  91. define Package/libnl-nf/install
  92. $(INSTALL_DIR) $(1)/usr/lib
  93. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnl-nf-3.so.* $(1)/usr/lib/
  94. endef
  95. define Package/libnl/install
  96. :
  97. endef
  98. $(eval $(call BuildPackage,libnl-core))
  99. $(eval $(call BuildPackage,libnl-genl))
  100. $(eval $(call BuildPackage,libnl-route))
  101. $(eval $(call BuildPackage,libnl-nf))
  102. $(eval $(call BuildPackage,libnl))