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
:=ftp
://ftp.gnupg.org
/gcrypt
/libgcrypt
16 PKG_MD5SUM
:=a5a5060dc2f80bcac700ab0236ea47dc
18 PKG_FIXUP
:=patch-libtool
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
30 MAINTAINER
:=W. Michael Petullo
<mike@flyn.org
>
33 define Package
/libgcrypt
/description
34 This is a general purpose cryptographic library based on the code from
35 GnuPG. It provides functions for
all cryptograhic building blocks
:
36 symmetric ciphers
(AES
, DES
, Arcfour
, CAST5
), hash algorithms
(MD5
, SHA-1
,
37 RIPE-MD160
, SHA-224
/256, SHA-384
/512), MACs
(HMAC for
all hash
38 algorithms
), public key algorithms
(RSA
, DSA
), large integer functions
,
39 random numbers and a lot of supporting functions. Some algorithms have
40 been disabled to reduce size
(Blowfish
, Twofish
, Serpent
,
41 RC2
, SEED
, Camellia
, CRC
, MD4
, TIGER-192
, Whirlpool
, ElGamal
, ECC
).
48 --with-gpg-error-prefix
="$(STAGING_DIR)/usr"
50 TARGET_CFLAGS
+= $(FPIC
)
52 define Build
/InstallDev
53 $(INSTALL_DIR
) $(1)/usr
/bin
$(2)/bin
$(1)/usr
/include $(1)/usr
/lib
$(1)/usr
/share
/aclocal
54 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/libgcrypt-config
$(1)/usr
/bin
/
55 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/gcrypt
*.h
$(1)/usr
/include/
56 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libgcrypt.
{la
,a
,so
*} $(1)/usr
/lib
/
57 $(CP
) $(PKG_INSTALL_DIR
)/usr
/share
/aclocal
/libgcrypt.m4
$(1)/usr
/share
/aclocal
/
58 $(SED
) 's,^libdir=\"$$$${exec_prefix}/lib,libdir=\"$(STAGING_DIR)/usr/lib,g' $(1)/usr
/bin
/libgcrypt-config
59 $(SED
) 's,^includedir=\"$$$${prefix}/include/,includedir=\"$(STAGING_DIR)/usr/include/,g' $(1)/usr
/bin
/libgcrypt-config
60 ln
-sf
$(STAGING_DIR
)/usr
/bin
/libgcrypt-config
$(2)/bin
/
63 define Package
/libgcrypt
/install
64 $(INSTALL_DIR
) $(1)/usr
/lib
65 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libgcrypt.so.
* $(1)/usr
/lib
/
68 $(eval
$(call BuildPackage
,libgcrypt
))