1
0

Makefile 2.4 KB

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