You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

58 lines
1.4 KiB

  1. #
  2. # Copyright (C) 2011 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:=libcap
  9. PKG_VERSION:=2.25
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=@KERNEL/linux/libs/security/linux-privs/libcap2
  13. PKG_HASH:=693c8ac51e983ee678205571ef272439d83afe62dd8e424ea14ad9790bc35162
  14. PKG_LICENSE:=GPL-2.0
  15. PKG_LICENSE_FILES:=License
  16. PKG_MAINTAINER:=Paul Wassi <p.wassi@gmx.at>
  17. PKG_INSTALL:=1
  18. include $(INCLUDE_DIR)/package.mk
  19. include $(INCLUDE_DIR)/kernel.mk
  20. define Package/libcap
  21. TITLE:=Linux capabilities library
  22. SECTION:=libs
  23. CATEGORY:=Libraries
  24. URL:=http://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/
  25. endef
  26. MAKE_FLAGS += \
  27. CFLAGS="$(TARGET_CFLAGS)" \
  28. BUILD_CC="$(CC)" \
  29. BUILD_CFLAGS="$(FPIC) -I$(PKG_BUILD_DIR)/libcap/include" \
  30. CFLAGS="$(TARGET_CFLAGS)" \
  31. LD="$(TARGET_CC)" \
  32. LDFLAGS="$(TARGET_LDFLAGS) -shared" \
  33. INDENT="| true" \
  34. PAM_CAP="no" \
  35. RAISE_SETFCAP="no" \
  36. DYNAMIC="yes" \
  37. lib="lib"
  38. define Build/InstallDev
  39. $(INSTALL_DIR) $(1)/usr/include/sys
  40. $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
  41. $(INSTALL_DIR) $(1)/usr/lib/
  42. $(CP) $(PKG_INSTALL_DIR)/lib/* $(1)/usr/lib/
  43. endef
  44. define Package/libcap/install
  45. $(INSTALL_DIR) $(1)/usr/lib
  46. $(CP) $(PKG_INSTALL_DIR)/lib/libcap.so* $(1)/usr/lib/
  47. endef
  48. $(eval $(call BuildPackage,libcap))