replace lots of manual install commands with INSTALL_* variables
[openwrt/svn-archive/archive.git] / libs / libgcrypt / Makefile
1 #
2 # Copyright (C) 2006 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.2.3
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:=http://ftp.gnupg.org/gcrypt/libgcrypt/
17 PKG_MD5SUM:=49810175ab672b19a02509d2a670b156
18 PKG_CAT:=bzcat
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/libgcrypt
26 SECTION:=libs
27 CATEGORY:=Libraries
28 DEPENDS:=+libgpg-error
29 TITLE:=GNU crypto library
30 DESCRIPTION:=\
31 This is a general purpose cryptographic library based on the code from \\\
32 GnuPG. It provides functions for all cryptograhic building blocks: \\\
33 symmetric ciphers (AES, DES, Blowfish, CAST5, Twofish, Arcfour), hash \\\
34 algorithms (MD4, MD5, RIPE-MD160, SHA-1, TIGER-192), MACs (HMAC for all \\\
35 hash algorithms), public key algorithms (RSA, ElGamal, DSA), large \\\
36 integer functions, random numbers and a lot of supporting functions.
37 URL:=http://directory.fsf.org/security/libgcrypt.html
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 $(STAGING_DIR)/usr/bin
57 $(CP) $(PKG_INSTALL_DIR)/usr/bin/libgcrypt-config $(STAGING_DIR)/usr/bin/
58 mkdir -p $(STAGING_DIR)/usr/include
59 $(CP) $(PKG_INSTALL_DIR)/usr/include/gcrypt*.h $(STAGING_DIR)/usr/include/
60 mkdir -p $(STAGING_DIR)/usr/lib
61 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgcrypt.{a,so*} $(STAGING_DIR)/usr/lib/
62 mkdir -p $(STAGING_DIR)/usr/share/aclocal
63 $(CP) $(PKG_INSTALL_DIR)/usr/share/aclocal/libgcrypt.m4 $(STAGING_DIR)/usr/share/aclocal/
64 endef
65
66 define Build/UninstallDev
67 rm -rf \
68 $(STAGING_DIR)/usr/bin/libgcrypt-config \
69 $(STAGING_DIR)/usr/include/gcrypt*.h \
70 $(STAGING_DIR)/usr/lib/libgcrypt.{a,so*} \
71 $(STAGING_DIR)/usr/share/aclocal/libgcrypt.m4
72 endef
73
74 define Package/libgcrypt/install
75 $(INSTALL_DIR) $(1)/usr/lib
76 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgcrypt.so.* $(1)/usr/lib/
77 endef
78
79 $(eval $(call BuildPackage,libgcrypt))