libgcrypt needs the libgpg-error config script in $(STAGING_DIR)/usr/bin
[packages.git] / libs / libgpg-error / 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:=libgpg-error
12 PKG_VERSION:=1.6
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:=ftp://ftp.gnupg.org/gcrypt/libgpg-error/ \
17         http://mirrors.rootmode.com/ftp.gnupg.org/libgpg-error/ \
18         http://gulus.usherbrooke.ca/pub/appl/GnuPG/libgpg-error/ \
19         http://gnupg.unixmexico.org/ftp/libgpg-error/
20 PKG_MD5SUM:=f3e9870e213518b407a959f8d29cd554
21 PKG_FIXUP:=libtool
22
23 include $(INCLUDE_DIR)/package.mk
24
25 PKG_INSTALL=1
26
27 define Package/libgpg-error
28   SECTION:=libs
29   CATEGORY:=Libraries
30   TITLE:=GnuPG error handling helper library
31   URL:=http://www.gnupg.org/related_software/libgpg-error/
32 endef
33
34 define Package/libgpg-error/description
35         An helper library for common error codes and descriptions.
36         This is a library that defines common error values for all GnuPG 
37         components. Among these are GPG, GPGSM, GPGME, GPG-Agent, libgcrypt, 
38         Libksba, DirMngr, Pinentry, SmartCard Daemon and possibly more in the 
39         future.
40 endef
41
42 TARGET_CFLAGS += $(FPIC)
43
44 define Build/Configure
45         $(call Build/Configure/Default, \
46                 --enable-shared \
47                 --enable-static \
48                 --disable-rpath \
49         )
50 endef
51
52 define Build/InstallDev
53         $(INSTALL_DIR) $(2)/bin $(1)/usr/bin
54         $(INSTALL_BIN) \
55                 $(PKG_INSTALL_DIR)/usr/bin/gpg-error-config \
56                 $(2)/bin/
57         $(SED) \
58                 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' \
59                 $(2)/bin/gpg-error-config
60         ln -sf $(STAGING_DIR)/host/bin/gpg-error-config $(1)/usr/bin/gpg-error-config
61
62         $(INSTALL_DIR) $(1)/usr/include
63         $(INSTALL_DATA) \
64                 $(PKG_INSTALL_DIR)/usr/include/gpg-error.h \
65                 $(1)/usr/include/
66
67         $(INSTALL_DIR) $(1)/usr/lib
68         $(INSTALL_DATA) \
69                 $(PKG_INSTALL_DIR)/usr/lib/libgpg-error.{la,so*} \
70                 $(1)/usr/lib/
71
72         $(INSTALL_DIR) $(1)/usr/share/aclocal
73         $(INSTALL_DATA) \
74                 $(PKG_INSTALL_DIR)/usr/share/aclocal/gpg-error.m4 \
75                 $(1)/usr/share/aclocal/
76 endef
77
78 define Package/libgpg-error/install
79         $(INSTALL_DIR) $(1)/usr/lib
80         $(INSTALL_DATA) \
81                 $(PKG_INSTALL_DIR)/usr/lib/libgpg-error.so.* \
82                 $(1)/usr/lib/
83 endef
84
85 $(eval $(call BuildPackage,libgpg-error))