Makefile 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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:=@KERNEL/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))