2 # Copyright (C) 2005-2011 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.bz2
15 PKG_SOURCE_URL
:=https
://www.gnupg.org
/ftp
/gcrypt
/libgcrypt
/
16 PKG_HASH
:=8b0870897ac5ac67ded568dcfadf45969cfa8a6beb0fd60af2a9eadc2a3272aa
18 PKG_MAINTAINER
:=W. Michael Petullo
<mike@flyn.org
>
19 PKG_CPE_ID
:=cpe
:/a
:gnupg
:libgcrypt
24 include $(INCLUDE_DIR
)/package.mk
26 define Package
/libgcrypt
29 DEPENDS
:=+libgpg-error
30 TITLE
:=GNU crypto library
31 URL
:=https
://www.gnupg.org
/related_software
/libgcrypt
/
32 LICENSE
:=LGPL-2.1
-or-later
33 LICENSE_FILES
:=COPYING.LIB
36 define Package
/libgcrypt
/description
37 This is a general purpose cryptographic library based on the code from
38 GnuPG. It provides functions for
all cryptograhic building blocks
:
39 symmetric ciphers
(AES
, DES
, Arcfour
, CAST5
), hash algorithms
(MD5
, SHA-1
,
40 RIPE-MD160
, SHA-224
/256, SHA-384
/512), MACs
(HMAC for
all hash
41 algorithms
), public key algorithms
(RSA
, DSA
), large integer functions
,
42 random numbers and a lot of supporting functions. Some algorithms have
43 been disabled to reduce size
(Blowfish
, Twofish
, Serpent
,
44 RC2
, SEED
, Camellia
, CRC
, MD4
, TIGER-192
, Whirlpool
, ElGamal
, ECC
).
52 --with-gpg-error-prefix
="$(STAGING_DIR)/usr"
54 TARGET_CFLAGS
+= $(FPIC
)
56 define Build
/InstallDev
57 $(INSTALL_DIR
) $(1)/usr
/bin
$(2)/bin
$(1)/usr
/include $(1)/usr
/lib
$(1)/usr
/share
/aclocal
58 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/libgcrypt-config
$(1)/usr
/bin
/
59 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/gcrypt
*.h
$(1)/usr
/include/
60 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libgcrypt.
{la
,a
,so
*} $(1)/usr
/lib
/
61 $(CP
) $(PKG_INSTALL_DIR
)/usr
/share
/aclocal
/libgcrypt.m4
$(1)/usr
/share
/aclocal
/
62 $(SED
) 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' $(1)/usr
/bin
/libgcrypt-config
63 $(LN
) ..
/..
/usr
/bin
/libgcrypt-config
$(2)/bin
/libgcrypt-config
66 define Package
/libgcrypt
/install
67 $(INSTALL_DIR
) $(1)/usr
/lib
68 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libgcrypt.so.
* $(1)/usr
/lib
/
71 $(eval
$(call BuildPackage
,libgcrypt
))