[packages] libgpg-error: update to 1.9
[packages.git] / libs / libgpg-error / Makefile
1 #
2 # Copyright (C) 2005-2011 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=libgpg-error
11 PKG_VERSION:=1.9
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15 PKG_SOURCE_URL:=ftp://ftp.gnupg.org/gcrypt/libgpg-error
16 PKG_MD5SUM:=521b98aa9395e7eaf0ef2236233a0796
17
18 PKG_BUILD_PARALLEL:=1
19 PKG_FIXUP:=libtool
20 PKG_INSTALL:=1
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/libgpg-error
25   SECTION:=libs
26   CATEGORY:=Libraries
27   TITLE:=GnuPG error handling helper library
28   URL:=http://www.gnupg.org/related_software/libgpg-error/
29 endef
30
31 define Package/libgpg-error/description
32         An helper library for common error codes and descriptions.
33         This is a library that defines common error values for all GnuPG
34         components. Among these are GPG, GPGSM, GPGME, GPG-Agent, libgcrypt,
35         Libksba, DirMngr, Pinentry, SmartCard Daemon and possibly more in the
36         future.
37 endef
38
39 TARGET_CFLAGS += $(FPIC)
40
41 CONFIGURE_ARGS += \
42         --enable-shared \
43         --enable-static \
44         --disable-rpath
45
46 define Build/InstallDev
47         $(INSTALL_DIR) $(2)/bin $(1)/usr/bin
48         $(INSTALL_BIN) \
49                 $(PKG_INSTALL_DIR)/usr/bin/gpg-error-config \
50                 $(2)/bin/
51         $(SED) \
52                 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' \
53                 $(2)/bin/gpg-error-config
54         ln -sf $(STAGING_DIR)/host/bin/gpg-error-config $(1)/usr/bin/gpg-error-config
55
56         $(INSTALL_DIR) $(1)/usr/include
57         $(INSTALL_DATA) \
58                 $(PKG_INSTALL_DIR)/usr/include/gpg-error.h \
59                 $(1)/usr/include/
60
61         $(INSTALL_DIR) $(1)/usr/lib
62         $(CP) \
63                 $(PKG_INSTALL_DIR)/usr/lib/libgpg-error.{la,a,so*} \
64                 $(1)/usr/lib/
65
66         $(INSTALL_DIR) $(1)/usr/share/aclocal
67         $(INSTALL_DATA) \
68                 $(PKG_INSTALL_DIR)/usr/share/aclocal/gpg-error.m4 \
69                 $(1)/usr/share/aclocal/
70 endef
71
72 define Package/libgpg-error/install
73         $(INSTALL_DIR) $(1)/usr/lib
74         $(CP) \
75                 $(PKG_INSTALL_DIR)/usr/lib/libgpg-error.so.* \
76                 $(1)/usr/lib/
77 endef
78
79 $(eval $(call BuildPackage,libgpg-error))