Merge pull request #5257 from lynxis/rb_libgcrypt
[feed/packages.git] / libs / libgcrypt / Makefile
1 #
2 # Copyright (C) 2005-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:=libgcrypt
11 PKG_VERSION:=1.6.6
12 PKG_RELEASE:=2
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15 PKG_SOURCE_URL:=https://www.gnupg.org/ftp/gcrypt/libgcrypt/
16 PKG_HASH:=f9461b4619bb78b273a88d468915750d418e89a3ea3b641bab0563a9af4b04d0
17 PKG_LICENSE:=LGPL-2.1+ GPL-2.0+
18 PKG_LICENSE_FILES:=COPYING
19
20 PKG_FIXUP:=autoreconf patch-libtool
21 PKG_INSTALL:=1
22 PKG_BUILD_PARALLEL:=1
23
24 include $(INCLUDE_DIR)/package.mk
25
26 define Package/libgcrypt
27 SECTION:=libs
28 CATEGORY:=Libraries
29 DEPENDS:=+libgpg-error
30 TITLE:=GNU crypto library
31 URL:=http://directory.fsf.org/security/libgcrypt.html
32 MAINTAINER:=W. Michael Petullo <mike@flyn.org>
33 endef
34
35 define Package/libgcrypt/description
36 This is a general purpose cryptographic library based on the code from
37 GnuPG. It provides functions for all cryptograhic building blocks:
38 symmetric ciphers (AES, DES, Arcfour, CAST5), hash algorithms (MD5, SHA-1,
39 RIPE-MD160, SHA-224/256, SHA-384/512), MACs (HMAC for all hash
40 algorithms), public key algorithms (RSA, DSA), large integer functions,
41 random numbers and a lot of supporting functions. Some algorithms have
42 been disabled to reduce size (Blowfish, Twofish, Serpent,
43 RC2, SEED, Camellia, CRC, MD4, TIGER-192, Whirlpool, ElGamal, ECC).
44 endef
45
46 CONFIGURE_ARGS += \
47 --enable-shared \
48 --enable-static \
49 --disable-asm \
50 --with-gpg-error-prefix="$(STAGING_DIR)/usr"
51
52 TARGET_CFLAGS += $(FPIC)
53
54 define Build/InstallDev
55 $(INSTALL_DIR) $(1)/usr/bin $(2)/bin $(1)/usr/include $(1)/usr/lib $(1)/usr/share/aclocal
56 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/libgcrypt-config $(1)/usr/bin/
57 $(CP) $(PKG_INSTALL_DIR)/usr/include/gcrypt*.h $(1)/usr/include/
58 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgcrypt.{la,a,so*} $(1)/usr/lib/
59 $(CP) $(PKG_INSTALL_DIR)/usr/share/aclocal/libgcrypt.m4 $(1)/usr/share/aclocal/
60 $(SED) 's,^libdir=\"$$$${exec_prefix}/lib,libdir=\"$(STAGING_DIR)/usr/lib,g' $(1)/usr/bin/libgcrypt-config
61 $(SED) 's,^includedir=\"$$$${prefix}/include/,includedir=\"$(STAGING_DIR)/usr/include/,g' $(1)/usr/bin/libgcrypt-config
62 ln -sf $(STAGING_DIR)/usr/bin/libgcrypt-config $(2)/bin/
63 endef
64
65 define Package/libgcrypt/install
66 $(INSTALL_DIR) $(1)/usr/lib
67 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgcrypt.so.* $(1)/usr/lib/
68 endef
69
70 $(eval $(call BuildPackage,libgcrypt))