revert autotools files touching: it has side effects (closes: #918)
[packages.git] / libs / opencdk / 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:=opencdk
12 PKG_VERSION:=0.5.5
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:=ftp://ftp.gnutls.org/pub/gnutls/opencdk/ \
17         ftp://ftp.gnupg.org/gcrypt/alpha/gnutls/opencdk/ \
18         http://www.mirrors.wiretapped.net/security/network-security/gnutls/opencdk/ \
19         ftp://ftp.mirrors.wiretapped.net/pub/security/network-security/gnutls/opencdk/ \
20         http://josefsson.org/gnutls/releases/opencdk/
21 PKG_MD5SUM:=aaff60107f0153873192ffda00699a96
22 PKG_CAT:=bzcat
23
24 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
25 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
26
27 include $(INCLUDE_DIR)/package.mk
28
29 define Package/libopencdk
30   SECTION:=libs
31   CATEGORY:=Libraries
32   DEPENDS:=+libgcrypt
33   TITLE:=The Open Crypto Development Kit library
34   DESCRIPTION:=\
35         This library provides basic parts of the OpenPGP message format.\\\
36         For reference, please read the rfc2440.txt in the doc/ directory.\\\
37         Due to some possible security problems, the library also implements \\\
38         parts of draft-ietf-openpgp-rfc2440bis-08.txt. If you want to exchange \\\
39         messages with earlier PGP version < 7, you should use the compat mode.
40   URL:=ftp://ftp.gnutls.org/pub/gnutls/opencdk/
41 endef
42
43 define Build/Configure
44         (cd $(PKG_BUILD_DIR); touch \
45                 configure.ac \
46                 acinclude.m4 \
47                 aclocal.m4 \
48                 Makefile.in \
49                 config.h.in \
50                 configure \
51         );
52         $(call Build/Configure/Default, \
53                 --enable-shared \
54                 --enable-static \
55                 --with-libgcrypt-prefix="$(STAGING_DIR)/usr" \
56         )
57 endef
58
59 define Build/Compile
60         $(MAKE) -C $(PKG_BUILD_DIR) \
61                 DESTDIR="$(PKG_INSTALL_DIR)" \
62                 all install
63 endef
64
65 define Build/InstallDev
66         mkdir -p $(STAGING_DIR)/usr/bin
67         $(CP) $(PKG_INSTALL_DIR)/usr/bin/opencdk-config $(STAGING_DIR)/usr/bin/
68         mkdir -p $(STAGING_DIR)/usr/include
69         $(CP) $(PKG_INSTALL_DIR)/usr/include/opencdk.h $(STAGING_DIR)/usr/include/
70         mkdir -p $(STAGING_DIR)/usr/lib
71         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libopencdk.{a,so*} $(STAGING_DIR)/usr/lib/
72 endef
73
74 define Build/UninstallDev
75         rm -rf \
76                 $(STAGING_DIR)/usr/bin/opencdk-config \
77                 $(STAGING_DIR)/usr/include/opencdk.h \
78                 $(STAGING_DIR)/usr/lib/libopencdk.{a,so*}
79 endef
80
81 define Package/libopencdk/install
82         install -d -m0755 $(1)/usr/lib
83         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libopencdk.so.* $(1)/usr/lib/
84 endef
85
86 $(eval $(call BuildPackage,libopencdk))