Aurelien Larcher
2018-01-20 2136604c82fa97645ec6488d4a395fdaebb7eba4
commit | author | age
414684 1 #
AP 2 # This file and its contents are supplied under the terms of the
3 # Common Development and Distribution License ("CDDL)". You may
4 # only use this file in accordance with the terms of the CDDL.
5 #
6 # A full copy of the text of the CDDL should have accompanied this
7 # source. A copy of the CDDL is also available via the Internet at
8 # http://www.illumos.org/license/CDDL.
9 #
10
11 #
12 # Copyright 2011-2013, EveryCity Ltd. All rights reserved.
13
14
15 include ../../../make-rules/shared-macros.mk
16
17 COMPONENT_NAME=        percona-server
cbe7b6 18 COMPONENT_VERSION=    5.7.20-19
AP 19 IPS_COMPONENT_VERSION=    5.7.20.19
414684 20 COMPONENT_SRC=        $(COMPONENT_NAME)-$(COMPONENT_VERSION)
AP 21 COMPONENT_ARCHIVE=    $(COMPONENT_SRC).tar.gz
22 COMPONENT_PROJECT_URL=    http://www.percona.com/
cbe7b6 23 COMPONENT_ARCHIVE_HASH=    sha256:17f06c07165954e7eacc3ba2cac0e1d4ba65b0b568f2437298d3c17a6a0940fd
414684 24 COMPONENT_ARCHIVE_URL=    http://www.percona.com/downloads/Percona-Server-5.7/Percona-Server-$(COMPONENT_VERSION)/source/tarball/$(COMPONENT_ARCHIVE)
AP 25
26 # We need specific boost version
27 COMPONENT_ARCHIVE_1= boost_1_59_0.tar.gz
28 COMPONENT_ARCHIVE_HASH_1= \
29     sha256:47f11c8844e579d02691a607fbd32540104a9ac7a2534a8ddaef50daf502baac
30 COMPONENT_ARCHIVE_URL_1= http://downloads.sourceforge.net/project/boost/boost/1.59.0/$(COMPONENT_ARCHIVE_1)
31
b27172 32 include $(WS_MAKE_RULES)/prep.mk
AP 33 include $(WS_MAKE_RULES)/cmake.mk
34 include $(WS_MAKE_RULES)/ips.mk
414684 35
AP 36 COMPONENT_POST_UNPACK_ACTION = ( $(MKDIR) $(BUILD_DIR)/boost && /usr/gnu/bin/tar -C $(BUILD_DIR)/boost -xzf $(USERLAND_ARCHIVES)$(COMPONENT_ARCHIVE_1))
37
38 CMAKE_PREFIX=/usr/percona-server/5.7
39 CONFDIR=/etc/percona-server/5.7
40 DATA_PREFIX=/var/percona-server/5.7
41
42 CMAKE_PLUGINDIR.32 =    lib/plugin
43 CMAKE_PLUGINDIR.64 =    lib/$(MACH64)/plugin
44
45 CMAKE_OPTIONS+= -DCMAKE_BUILD_TYPE=RELEASE
46 CMAKE_OPTIONS+=    -DWITH_SSL=system
47 CMAKE_OPTIONS+= -DINSTALL_LAYOUT=SVR4
48 CMAKE_OPTIONS+= -DINSTALL_BINDIR=$(CMAKE_BINDIR.$(BITS))
49 CMAKE_OPTIONS+= -DINSTALL_INCLUDEDIR=include
50 CMAKE_OPTIONS+= -DINSTALL_INFODIR=bin
51 CMAKE_OPTIONS+= -DINSTALL_LIBDIR=$(CMAKE_LIBDIR.$(BITS))
52 CMAKE_OPTIONS+= -DINSTALL_PLUGINDIR=$(CMAKE_PLUGINDIR.$(BITS))
53 CMAKE_OPTIONS+= -DINSTALL_MANDIR=man
54 CMAKE_OPTIONS+= -DINSTALL_SHAREDIR=share
55 CMAKE_OPTIONS+= -DINSTALL_MYSQLSHAREDIR=share
56 CMAKE_OPTIONS+= -DINSTALL_SBINDIR=$(CMAKE_BINDIR.$(BITS))
57 CMAKE_OPTIONS+= -DINSTALL_SCRIPTDIR=$(CMAKE_BINDIR.$(BITS))
58 CMAKE_OPTIONS+= -DMYSQL_DATADIR=$(DATA_PREFIX)/data
59 CMAKE_OPTIONS+= -DSYSCONFDIR=$(CONFDIR)
60 CMAKE_OPTIONS+= -DENABLE_DTRACE=on
61 CMAKE_OPTIONS+= -DINSTALL_SUPPORTFILESDIR=share/mysql
62 CMAKE_OPTIONS+= -DWITH_BOOST=$(BUILD_DIR)/boost
63 CMAKE_OPTIONS+= -DINSTALL_SECURE_FILE_PRIVDIR=""
64
65 # gcc invocation in some link.txt file is missing -m$(BITS) parameter
66 # and it makes 64-bit build to fail, this is a quick hack to make it build
67 # for now, cmake build system needs a proper fix
68
69 COMPONENT_POST_CMAKE_ACTION.32=
70 COMPONENT_POST_CMAKE_ACTION.64= find $(@D) -type f -name link.txt \
71     -exec perl -pi -e 's/gcc\ \ -fPIC/\/gcc\ -m64\ -fPIC/' {} \;
72 COMPONENT_POST_CMAKE_ACTION=$(COMPONENT_POST_CMAKE_ACTION.$(BITS))
73
74 build:        $(BUILD_32_and_64)
75
76 install:    $(INSTALL_32_and_64)
11604c 77
38a289 78 # Auto-generated dependencies
11604c 79 REQUIRED_PACKAGES += SUNWcs
AP 80 REQUIRED_PACKAGES += database/percona-server-57/client
81 REQUIRED_PACKAGES += library/readline
82 REQUIRED_PACKAGES += library/security/openssl
38a289 83 REQUIRED_PACKAGES += library/zlib
11604c 84 REQUIRED_PACKAGES += runtime/perl-522
38a289 85 REQUIRED_PACKAGES += runtime/perl-524
11604c 86 REQUIRED_PACKAGES += shell/bash
AP 87 REQUIRED_PACKAGES += system/library
88 REQUIRED_PACKAGES += system/library/g++-4-runtime
213660 89 REQUIRED_PACKAGES += system/library/gcc-6-runtime
11604c 90 REQUIRED_PACKAGES += system/library/math
38a289 91 REQUIRED_PACKAGES += system/library/security/libsasl
AL 92 REQUIRED_PACKAGES += web/curl