332c4817e3fa998a61dcf811b0f462af81e9ebc5
[packages.git] / libs / libgpg-error / 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:=libgpg-error
12 PKG_VERSION:=1.0
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
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:=ff409db977e4a4897aa09ea420a28a2f
21 PKG_CAT:=zcat
22
23 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
24 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
25
26 include $(INCLUDE_DIR)/package.mk
27
28 define Package/libgpg-error
29   SECTION:=libs
30   CATEGORY:=Libraries
31   TITLE:=GnuPG error handling helper library
32   DESCRIPTION:=\
33         An helper library for common error codes and descriptions.\\\
34         This is a library that defines common error values for all GnuPG \\\
35         components.  Among these are GPG, GPGSM, GPGME, GPG-Agent, libgcrypt, \\\
36         Libksba, DirMngr, Pinentry, SmartCard Daemon and possibly more in the \\\
37         future.
38   URL:=http://www.gnupg.org/related_software/libgpg-error/
39 endef
40
41 define Build/Configure
42         $(call Build/Configure/Default, \
43                 --enable-shared \
44                 --enable-static \
45                 --disable-rpath \
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/gpg-error-config $(STAGING_DIR)/usr/bin/
58         mkdir -p $(STAGING_DIR)/usr/include
59         $(CP) $(PKG_INSTALL_DIR)/usr/include/gpg-error.h $(STAGING_DIR)/usr/include/
60         mkdir -p $(STAGING_DIR)/usr/lib
61         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgpg-error.{a,so*} $(STAGING_DIR)/usr/lib/
62         mkdir -p $(STAGING_DIR)/usr/share/aclocal
63         $(CP) $(PKG_INSTALL_DIR)/usr/share/aclocal/gpg-error.m4 $(STAGING_DIR)/usr/share/aclocal/
64 endef
65
66 define Build/UninstallDev
67         rm -rf \
68                 $(STAGING_DIR)/usr/bin/gpg-error-config \
69                 $(STAGING_DIR)/usr/include/gpg-error.h \
70                 $(STAGING_DIR)/usr/lib/libgpg-error.{a,so*} \
71                 $(STAGING_DIR)/usr/share/aclocal/gpg-error.m4
72 endef
73
74 define Package/libgpg-error/install
75         $(INSTALL_DIR) $(1)/usr/lib
76         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgpg-error.so.* $(1)/usr/lib/
77 endef
78
79 $(eval $(call BuildPackage,libgpg-error))