[package] add libcrypto++, required for the new amule version
[packages.git] / libs / libcrypto++ / Makefile
1
2 # Copyright (C) 2009 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:=libcrypto++
11 PKG_VERSION:=5.6.0
12
13 PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.gz
14 PKG_SOURCE_URL:=http://ftp.de.debian.org/debian/pool/main/libc/libcrypto++/
15 PKG_MD5SUM:=
16
17 include $(INCLUDE_DIR)/package.mk
18
19 define Package/libcryptoxx
20   SECTION:=libs
21   CATEGORY:=Libraries
22   DEPENDS:=+libpthread
23   TITLE:=Crypto++ is library for creating C++ programs which use cryptographic algorithms
24   URL:=http://packages.debian.org/sid/libcrypto++-dev
25 endef
26
27 define Package/package/libcryptoxx
28   Crypto++ is library for creating C++ programs which use cryptographic algorithms.
29   The library uses a Pipes & Filters architecture with heavy use of templates and
30   abstract base classes.
31 endef
32
33 CONFIGURE_ARGS += \
34         --enable-static \
35         --enable-shared
36
37 define Build/Configure
38         (cd $(PKG_BUILD_DIR); rm -f config.cache GNUmakefile; autoreconf --force --install)
39         $(call Build/Configure/Default,,\
40                 LDFLAGS="$(TARGET_LDFLAGS) -lpthread" \
41         )
42 endef
43
44 define Build/Compile
45         $(MAKE) -C $(PKG_BUILD_DIR) \
46                 DESTDIR="$(PKG_INSTALL_DIR)" \
47                 all install
48 endef
49
50
51 define Build/InstallDev
52         mkdir -p $(1)/usr/include/crypto++
53         $(CP) $(PKG_INSTALL_DIR)/usr/include/crypto--/* $(1)/usr/include/crypto++/
54         mkdir -p $(1)/usr/lib
55         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcrypto++.{a,so*} $(1)/usr/lib/
56 endef
57
58 define Package/libcryptoxx/install
59         $(INSTALL_DIR) $(1)/usr/lib
60         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcrypto++.so* $(1)/usr/lib/
61 endef
62
63 $(eval $(call BuildPackage,libcryptoxx))