packages: Use $(CP) instead of $(INSTALL_BIN) for binaries.
[openwrt/svn-archive/archive.git] / libs / opencdk / Makefile
1 #
2 # Copyright (C) 2006, 2007 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.6.4
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:=7bfc820bcdc08f0c31f860710368071e
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/libopencdk
29 SECTION:=libs
30 CATEGORY:=Libraries
31 DEPENDS:=+libgcrypt zlib
32 TITLE:=The Open Crypto Development Kit library
33 URL:=ftp://ftp.gnutls.org/pub/gnutls/opencdk/
34 endef
35
36 define Package/libopencdk/description
37 This library provides basic parts of the OpenPGP message format.
38 For reference, please read the rfc2440.txt in the doc/ directory.
39 Due to some possible security problems, the library also implements
40 parts of draft-ietf-openpgp-rfc2440bis-08.txt. If you want to exchange
41 messages with earlier PGP version < 7, you should use the compat mode.
42 endef
43
44 define Build/Configure
45 $(call Build/Configure/Default, \
46 --enable-shared \
47 --enable-static \
48 --with-libgcrypt-prefix="$(STAGING_DIR)/usr" \
49 )
50 endef
51
52 define Build/Compile
53 $(MAKE) -C $(PKG_BUILD_DIR) \
54 DESTDIR="$(PKG_INSTALL_DIR)" \
55 all install
56 endef
57
58 define Build/InstallDev
59 mkdir -p $(1)/usr/bin
60 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/opencdk-config $(1)/usr/bin/
61 mkdir -p $(1)/usr/include
62 $(CP) $(PKG_INSTALL_DIR)/usr/include/opencdk.h $(1)/usr/include/
63 mkdir -p $(1)/usr/lib
64 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libopencdk.{a,so*} $(1)/usr/lib/
65 endef
66
67 define Build/UninstallDev
68 rm -rf \
69 $(STAGING_DIR)/usr/bin/opencdk-config \
70 $(STAGING_DIR)/usr/include/opencdk.h \
71 $(STAGING_DIR)/usr/lib/libopencdk.{a,so*}
72 endef
73
74 define Package/libopencdk/install
75 $(INSTALL_DIR) $(1)/usr/lib
76 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libopencdk.so.* $(1)/usr/lib/
77 endef
78
79 $(eval $(call BuildPackage,libopencdk))