a2d9d90b3417c30233ec9732b284510c61f0e2e6
[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
22 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
23 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
24
25 include $(INCLUDE_DIR)/package.mk
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 define Build/Configure
43         $(call Build/Configure/Default, \
44                 --enable-shared \
45                 --enable-static \
46                 --disable-rpath \
47         )
48 endef
49
50 define Build/Compile
51         $(MAKE) -C $(PKG_BUILD_DIR) \
52                 DESTDIR="$(PKG_INSTALL_DIR)" \
53                 all install
54 endef
55
56 define Build/InstallDev
57         mkdir -p $(1)/usr/bin
58         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gpg-error-config $(1)/usr/bin/
59         mkdir -p $(1)/usr/include
60         $(CP) $(PKG_INSTALL_DIR)/usr/include/gpg-error.h $(1)/usr/include/
61         mkdir -p $(1)/usr/lib
62         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgpg-error.{a,so*} $(1)/usr/lib/
63         mkdir -p $(1)/usr/share/aclocal
64         $(CP) $(PKG_INSTALL_DIR)/usr/share/aclocal/gpg-error.m4 $(1)/usr/share/aclocal/
65 endef
66
67 define Build/UninstallDev
68         rm -rf \
69                 $(STAGING_DIR)/usr/bin/gpg-error-config \
70                 $(STAGING_DIR)/usr/include/gpg-error.h \
71                 $(STAGING_DIR)/usr/lib/libgpg-error.{a,so*} \
72                 $(STAGING_DIR)/usr/share/aclocal/gpg-error.m4
73 endef
74
75 define Package/libgpg-error/install
76         $(INSTALL_DIR) $(1)/usr/lib
77         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgpg-error.so.* $(1)/usr/lib/
78 endef
79
80 $(eval $(call BuildPackage,libgpg-error))