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.

56 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.24
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=http://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/
  13. PKG_MD5SUM:=d43ab9f680435a7fff35b4ace8d45b80
  14. PKG_MAINTAINER:=Steven Barth <cyrus@openwrt.org>
  15. PKG_INSTALL:=1
  16. include $(INCLUDE_DIR)/package.mk
  17. include $(INCLUDE_DIR)/kernel.mk
  18. define Package/libcap
  19. TITLE:=Linux capabilities library
  20. SECTION:=libs
  21. CATEGORY:=Libraries
  22. URL:=http://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/
  23. endef
  24. MAKE_FLAGS += \
  25. CFLAGS="$(TARGET_CFLAGS)" \
  26. BUILD_CC="$(CC)" \
  27. BUILD_CFLAGS="$(FPIC) -I$(PKG_BUILD_DIR)/libcap/include" \
  28. CFLAGS="$(TARGET_CFLAGS)" \
  29. LD="$(TARGET_CC)" \
  30. LDFLAGS="$(TARGET_LDFLAGS) -shared" \
  31. INDENT="| true" \
  32. PAM_CAP="no" \
  33. LIBATTR="no" \
  34. DYNAMIC="yes" \
  35. lib="lib"
  36. define Build/InstallDev
  37. $(INSTALL_DIR) $(1)/usr/include/sys
  38. $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
  39. $(INSTALL_DIR) $(1)/usr/lib/
  40. $(CP) $(PKG_INSTALL_DIR)/lib/* $(1)/usr/lib/
  41. endef
  42. define Package/libcap/install
  43. $(INSTALL_DIR) $(1)/usr/lib
  44. $(CP) $(PKG_INSTALL_DIR)/lib/libcap.so* $(1)/usr/lib/
  45. endef
  46. $(eval $(call BuildPackage,libcap))