Makefile 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. #
  2. # Copyright (C) 2011-2012 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:=libmnl
  9. PKG_VERSION:=1.0.5
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  12. PKG_SOURCE_URL:= \
  13. http://www.netfilter.org/projects/libmnl/files \
  14. ftp://ftp.netfilter.org/pub/libmnl
  15. PKG_HASH:=274b9b919ef3152bfb3da3a13c950dd60d6e2bcd54230ffeca298d03b40d0525
  16. PKG_MAINTAINER:=Jo-Philipp Wich <[email protected]>
  17. PKG_FIXUP:=autoreconf
  18. PKG_INSTALL:=1
  19. PKG_LICENSE:=LGPL-2.1+
  20. PKG_CPE_ID:=cpe:/a:netfilter:libmnl
  21. include $(INCLUDE_DIR)/package.mk
  22. define Package/libmnl
  23. SECTION:=libs
  24. CATEGORY:=Libraries
  25. TITLE:=Minimalistic user-space library for Netlink
  26. URL:=http://www.netfilter.org/projects/libmnl/
  27. ABI_VERSION:=0
  28. endef
  29. define Package/libmnl/description
  30. libmnl is a minimalistic user-space library oriented to Netlink developers.
  31. There are a lot of common tasks in parsing, validating, constructing of
  32. both the Netlink header and TLVs that are repetitive and easy to get wrong.
  33. This library aims to provide simple helpers that allows you to re-use code
  34. and to avoid re-inventing the wheel. The main features of this library are:
  35. .
  36. * Small: the shared library requires around 30KB for an x86-based computer.
  37. .
  38. * Simple: this library avoids complexity and elaborated abstractions that
  39. tend to hide Netlink details.
  40. .
  41. * Easy to use: the library simplifies the work for Netlink-wise developers.
  42. It provides functions to make socket handling, message building, validating,
  43. parsing and sequence tracking, easier.
  44. .
  45. * Easy to re-use: you can use the library to build your own abstraction layer
  46. on top of this library.
  47. .
  48. * Decoupling: the interdependency of the main bricks that compose the library
  49. is reduced, i.e. the library provides many helpers, but the programmer is not
  50. forced to use them.
  51. endef
  52. CONFIGURE_ARGS+= \
  53. --enable-shared \
  54. --enable-static \
  55. define Build/InstallDev
  56. $(INSTALL_DIR) $(1)/usr/include
  57. $(CP) $(PKG_INSTALL_DIR)/usr/include/libmnl $(1)/usr/include/
  58. $(INSTALL_DIR) $(1)/usr/lib
  59. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmnl.{a,so*} $(1)/usr/lib/
  60. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  61. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libmnl.pc $(1)/usr/lib/pkgconfig/
  62. endef
  63. define Package/libmnl/install
  64. $(INSTALL_DIR) $(1)/usr/lib
  65. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmnl.so.* $(1)/usr/lib/
  66. endef
  67. $(eval $(call BuildPackage,libmnl))