2 # Copyright (C) 2005-2010 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
:=ftp
://ftp.gnupg.org
/gcrypt
/libgcrypt
/
16 PKG_MD5SUM
:=cc2017ad09b4543f8b3b5e9a53cfd89d
18 PKG_FIXUP
:=libtool no-autoreconf
22 include $(INCLUDE_DIR
)/package.mk
24 define Package
/libgcrypt
27 DEPENDS
:=+libgpg-error
28 TITLE
:=GNU crypto library
29 URL
:=http
://directory.fsf.org
/security
/libgcrypt.html
32 define Package
/libgcrypt
/description
33 This is a general purpose cryptographic library based on the code from
34 GnuPG. It provides functions for
all cryptograhic building blocks
:
35 symmetric ciphers
(AES
, DES
, Arcfour
), hash algorithms
(MD5
, SHA-1
,
36 RIPE-MD160
, SHA-224
/256, SHA-384
/512), MACs
(HMAC for
all hash
37 algorithms
), public key algorithms
(RSA
, DSA
), large integer functions
,
38 random numbers and a lot of supporting functions. Some algorithms have
39 been disabled to reduce size
(Blowfish
, CAST5
, Twofish
, Serpent
,
40 RC2
, SEED
, Camellia
, CRC
, MD4
, TIGER-192
, Whirlpool
, ElGamal
, ECC
).
47 --with-gpg-error-prefix
="$(STAGING_DIR)/usr" \
48 --enable-digests
="md5 rmd160 sha1 sha256 sha512" \
49 --enable-ciphers
="arcfour des aes" \
50 --enable-pubkey-ciphers
="rsa dsa" \
52 TARGET_CFLAGS
+= $(FPIC
)
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
/
65 define Package
/libgcrypt
/install
66 $(INSTALL_DIR
) $(1)/usr
/lib
67 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libgcrypt.so.
* $(1)/usr
/lib
/
70 $(eval
$(call BuildPackage
,libgcrypt
))