[packages] libiconv-full: autoreconf is broken with this package, use patch-libtool...
[openwrt/svn-archive/archive.git] / libs / libcap / Makefile
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
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=libcap
11 PKG_VERSION:=2.22
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15 PKG_SOURCE_URL:=http://distfiles.gentoo.org/distfiles/
16 PKG_MD5SUM:=ce64058bdb3f086ddbfca8ce6c919845
17
18 PKG_INSTALL:=1
19
20 include $(INCLUDE_DIR)/package.mk
21 include $(INCLUDE_DIR)/kernel.mk
22
23 define Package/libcap
24 TITLE:=Linux capabilities library
25 SECTION:=libs
26 CATEGORY:=Libraries
27 URL:=http://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/
28 endef
29
30 MAKE_FLAGS += \
31 CFLAGS="$(TARGET_CFLAGS)" \
32 BUILD_CC="$(CC)" \
33 BUILD_CFLAGS="$(FPIC) -I$(PKG_BUILD_DIR)/libcap/include" \
34 CFLAGS="$(TARGET_CFLAGS)" \
35 LD="$(TARGET_CC)" \
36 LDFLAGS="$(TARGET_LDFLAGS) -shared" \
37 INDENT="| true" \
38 PAM_CAP="no" \
39 LIBATTR="no" \
40 DYNAMIC="yes" \
41 lib="lib"
42
43 define Build/InstallDev
44 $(INSTALL_DIR) $(1)/usr/include/sys
45 $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
46 $(INSTALL_DIR) $(1)/usr/lib/
47 $(CP) $(PKG_INSTALL_DIR)/lib/* $(1)/usr/lib/
48 endef
49
50 define Package/libcap/install
51 $(INSTALL_DIR) $(1)/usr/lib
52 $(CP) $(PKG_INSTALL_DIR)/lib/libcap.so* $(1)/usr/lib/
53 endef
54
55 $(eval $(call BuildPackage,libcap))