6ac3ce7ee4594662edbe851864e64049d483b6fa
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / botan / botan.mk
1 ################################################################################
2 #
3 # botan
4 #
5 ################################################################################
6
7 BOTAN_VERSION = 1.10.8
8 BOTAN_SOURCE = Botan-$(BOTAN_VERSION).tgz
9 BOTAN_SITE = http://files.randombit.net/botan
10 BOTAN_LICENSE = BSD-2c
11 BOTAN_LICENSE_FILES = doc/license.txt
12
13 BOTAN_INSTALL_STAGING = YES
14
15 BOTAN_CONF_OPTS = \
16         --cpu=$(BR2_ARCH) \
17         --os=linux \
18         --cc=gcc \
19         --cc-bin="$(TARGET_CXX)" \
20         --prefix=/usr
21
22 ifeq ($(BR2_STATIC_LIBS),y)
23 BOTAN_CONF_OPTS += --disable-shared --no-autoload
24 endif
25
26 ifeq ($(BR2_PACKAGE_BZIP2),y)
27 BOTAN_DEPENDENCIES += bzip2
28 BOTAN_CONF_OPTS += --with-bzip2
29 endif
30
31 ifeq ($(BR2_PACKAGE_GMP),y)
32 BOTAN_DEPENDENCIES += gmp
33 BOTAN_CONF_OPTS += --with-gnump
34 endif
35
36 ifeq ($(BR2_PACKAGE_OPENSSL),y)
37 BOTAN_DEPENDENCIES += openssl
38 BOTAN_CONF_OPTS += --with-openssl
39 endif
40
41 ifeq ($(BR2_PACKAGE_ZLIB),y)
42 BOTAN_DEPENDENCIES += zlib
43 BOTAN_CONF_OPTS += --with-zlib
44 endif
45
46 define BOTAN_CONFIGURE_CMDS
47         (cd $(@D); ./configure.py $(BOTAN_CONF_OPTS))
48 endef
49
50 define BOTAN_BUILD_CMDS
51         $(MAKE) -C $(@D) AR="$(TARGET_AR) crs"
52 endef
53
54 define BOTAN_INSTALL_STAGING_CMDS
55         $(MAKE) -C $(@D) DESTDIR="$(STAGING_DIR)/usr" install
56 endef
57
58 define BOTAN_INSTALL_TARGET_CMDS
59         $(MAKE) -C $(@D) DESTDIR="$(TARGET_DIR)/usr" install
60 endef
61
62 $(eval $(generic-package))