81049ae68003f1f2948499f74cb0923b4a38627a
[openwrt/svn-archive/archive.git] / libs / libgcrypt / Makefile
1 #
2 # Copyright (C) 2005-2008 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=libgcrypt
12 PKG_VERSION:=1.4.1
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:=ftp://ftp.gnupg.org/gcrypt/libgcrypt/
17 PKG_MD5SUM:=26703ecef4bbe113b8e6a87572b80b32
18
19 PKG_FIXUP:=libtool
20
21 include $(INCLUDE_DIR)/package.mk
22
23 define Package/libgcrypt
24 SECTION:=libs
25 CATEGORY:=Libraries
26 DEPENDS:=+libgpg-error
27 TITLE:=GNU crypto library
28 URL:=http://directory.fsf.org/security/libgcrypt.html
29 endef
30
31 define Package/libgcrypt/description
32 This is a general purpose cryptographic library based on the code from
33 GnuPG. It provides functions for all cryptograhic building blocks:
34 symmetric ciphers (AES, DES, Blowfish, CAST5, Twofish, Arcfour), hash
35 algorithms (MD4, MD5, RIPE-MD160, SHA-1, TIGER-192), MACs (HMAC for all
36 hash algorithms), public key algorithms (RSA, ElGamal, DSA), large
37 integer functions, random numbers and a lot of supporting functions.
38 endef
39
40 define Build/Configure
41 $(call Build/Configure/Default, \
42 --enable-shared \
43 --enable-static \
44 --disable-asm \
45 --with-gpg-error-prefix="$(STAGING_DIR)/usr" \
46 )
47 endef
48
49 define Build/Compile
50 $(MAKE) -C $(PKG_BUILD_DIR) \
51 DESTDIR="$(PKG_INSTALL_DIR)" \
52 all install
53 endef
54
55 define Build/InstallDev
56 mkdir -p $(1)/usr/bin $(2)/bin $(1)/usr/include $(1)/usr/lib $(1)/usr/share/aclocal
57 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/libgcrypt-config $(1)/usr/bin/
58 $(CP) $(PKG_INSTALL_DIR)/usr/include/gcrypt*.h $(1)/usr/include/
59 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgcrypt.{la,a,so*} $(1)/usr/lib/
60 $(CP) $(PKG_INSTALL_DIR)/usr/share/aclocal/libgcrypt.m4 $(1)/usr/share/aclocal/
61 $(SED) 's,^libdir=\"$$$${exec_prefix}/lib,libdir=\"$(STAGING_DIR)/usr/lib,g' $(1)/usr/bin/libgcrypt-config
62 $(SED) 's,^includedir=\"$$$${prefix}/include/,includedir=\"$(STAGING_DIR)/usr/include/,g' $(1)/usr/bin/libgcrypt-config
63 ln -sf $(STAGING_DIR)/usr/bin/libgcrypt-config $(2)/bin/
64 endef
65
66 define Package/libgcrypt/install
67 $(INSTALL_DIR) $(1)/usr/lib
68 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgcrypt.so.* $(1)/usr/lib/
69 endef
70
71 $(eval $(call BuildPackage,libgcrypt))