1
0

Makefile 2.3 KB

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