2
0

Makefile 3.5 KB

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