Makefile 2.4 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. 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. endef
  27. define Package/libmnl/description
  28. libmnl is a minimalistic user-space library oriented to Netlink developers.
  29. There are a lot of common tasks in parsing, validating, constructing of
  30. both the Netlink header and TLVs that are repetitive and easy to get wrong.
  31. This library aims to provide simple helpers that allows you to re-use code
  32. and to avoid re-inventing the wheel. The main features of this library are:
  33. .
  34. * Small: the shared library requires around 30KB for an x86-based computer.
  35. .
  36. * Simple: this library avoids complexity and elaborated abstractions that
  37. tend to hide Netlink details.
  38. .
  39. * Easy to use: the library simplifies the work for Netlink-wise developers.
  40. It provides functions to make socket handling, message building, validating,
  41. parsing and sequence tracking, easier.
  42. .
  43. * Easy to re-use: you can use the library to build your own abstraction layer
  44. on top of this library.
  45. .
  46. * Decoupling: the interdependency of the main bricks that compose the library
  47. is reduced, i.e. the library provides many helpers, but the programmer is not
  48. forced to use them.
  49. endef
  50. CONFIGURE_ARGS+= \
  51. --enable-shared \
  52. --enable-static \
  53. define Build/InstallDev
  54. $(INSTALL_DIR) $(1)/usr/include
  55. $(CP) $(PKG_INSTALL_DIR)/usr/include/libmnl $(1)/usr/include/
  56. $(INSTALL_DIR) $(1)/usr/lib
  57. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmnl.{a,so*} $(1)/usr/lib/
  58. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  59. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libmnl.pc $(1)/usr/lib/pkgconfig/
  60. endef
  61. define Package/libmnl/install
  62. $(INSTALL_DIR) $(1)/usr/lib
  63. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmnl.so.* $(1)/usr/lib/
  64. endef
  65. $(eval $(call BuildPackage,libmnl))