@@ -11,6 +11,8 @@ include /usr/share/dpkg/buildflags.mk
11
11
ARCH := $(shell dpkg-architecture -qDEB_BUILD_ARCH)
12
12
ARCH_OS := $(shell dpkg-architecture -qDEB_BUILD_ARCH_OS)
13
13
BUILDDIR := builddir
14
+ CC := $(DEB_HOST_GNU_TYPE ) -gcc
15
+ CXX := $(DEB_HOST_GNU_TYPE ) -g++
14
16
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
15
17
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
16
18
DEB_BUILD_GNU_SYSTEM ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_SYSTEM)
@@ -25,23 +27,13 @@ DISTRIBUTION := $(shell lsb_release -i -s)
25
27
RELEASE := $(shell lsb_release -r -s)
26
28
TMP: =$(CURDIR ) /debian/tmp
27
29
28
-
29
- export MYSQL_BUILD_CC =$(DEB_HOST_GNU_TYPE ) -gcc
30
- export MYSQL_BUILD_CXX =$(DEB_HOST_GNU_TYPE ) -g++
31
-
32
- # Parallel build support as adviced
30
+ # Parallel build support as advised
33
31
# at https://www.debian.org/doc/debian-policy/ch-source.html#s-debianrules-options
34
32
ifneq (,$(filter parallel=% ,$(DEB_BUILD_OPTIONS ) ) )
35
33
NUMJOBS = $(patsubst parallel=% ,% ,$(filter parallel=% ,$(DEB_BUILD_OPTIONS ) ) )
36
- # Even though at later point the MAKEFLAGS variable will end up
37
- # having the -j option without a parameter, in test builds it has been
38
- # confirmed that the NUMJOBS really doeas has an effect via MAKEFLAGS magic.
39
- # MAKEFLAGS magic will later also add the -jobserver option.
40
34
MAKEFLAGS += -j $(NUMJOBS )
41
35
endif
42
36
43
- # This is removed in mysql-5.6 and a candidate for removal in MariaDB too
44
- USE_ASSEMBLER: =--enable-assembler
45
37
ifneq (,$(filter $(ARCH ) , i386 kfreebsd-i386 hurd-i386) )
46
38
TAOCRYPT_OPT ="-DTAOCRYPT_DISABLE_X86ASM"
47
39
endif
@@ -66,8 +58,9 @@ MAKEFLAGS += VERBOSE=1
66
58
67
59
MAKE_TEST_TARGET: =test-force
68
60
ifneq ($(findstring fulltest,$(DEB_BUILD_OPTIONS ) ) ,)
69
- # make test-bt is the testsuite run by the MySQL build team
70
- # before a release, but it is long
61
+ # Presets related to test-bt are not guarenteed to work in MariaDB as there
62
+ # are hard-coded MTR lines insted. See MDEV-8244 for implementation status
63
+ # of new test presets.
71
64
MAKE_TEST_TARGET: =test-bt
72
65
endif
73
66
@@ -93,29 +86,28 @@ override_dh_auto_configure:
93
86
@echo " RULES.$@ "
94
87
dh_testdir
95
88
96
- ( test -d $(BUILDDIR) || mkdir $(BUILDDIR) ) && cd $(BUILDDIR) && \
89
+ mkdir -p $(BUILDDIR) && cd $(BUILDDIR) && \
97
90
sh -c 'PATH=$${MYSQL_BUILD_PATH:-"/usr/local/bin:/usr/bin:/bin"} \
98
- CC=$${MYSQL_BUILD_CC:-gcc } \
99
- CFLAGS=$${MYSQL_BUILD_CFLAGS:-"-O2 -DBIG_JOINS=1 - fno-strict-aliasing ${TAOCRYPT_OPT} "} \
100
- CXX=$${MYSQL_BUILD_CXX:-g++ } \
101
- CXXFLAGS=$${MYSQL_BUILD_CXXFLAGS:-"-O3 -DBIG_JOINS=1 - felide-constructors -fno-exceptions -fno-rtti -fno-strict-aliasing ${TAOCRYPT_OPT}"} \
91
+ CC=${CC } \
92
+ CFLAGS=$${MYSQL_BUILD_CFLAGS:-"-O3 - fno-strict-aliasing"} \
93
+ CXX=${CXX } \
94
+ CXXFLAGS=$${MYSQL_BUILD_CXXFLAGS:-"-O3 -felide-constructors -fno-exceptions -fno-rtti -fno-strict-aliasing ${TAOCRYPT_OPT}"} \
102
95
cmake -DCMAKE_INSTALL_PREFIX=/usr \
103
96
$(CMAKEFLAGS) \
104
- -DWITH_LIBWRAP=no \
105
97
-DWITH_SSL=bundled \
106
- -DCOMPILATION_COMMENT="( $(DISTRIBUTION))" \
98
+ -DCOMPILATION_COMMENT="$(DISTRIBUTION) $(RELEASE )" \
107
99
-DMYSQL_SERVER_SUFFIX="-$(DEBVERSION)" \
108
100
-DSYSTEM_TYPE="debian-$(DEB_BUILD_GNU_SYSTEM)" \
109
101
-DBUILD_CONFIG=mysql_release \
110
102
-DINSTALL_LIBDIR=lib/$(DEB_HOST_MULTIARCH) \
111
103
-DINSTALL_PLUGINDIR=lib/mysql/plugin \
112
- -DDEB=1 ..'
104
+ -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test \
105
+ -DDEB=$(DISTRIBUTION) ..'
113
106
touch $@
114
107
115
108
# This is needed, otherwise 'make test' will run before binaries have been built
116
109
override_dh_auto_build :
117
110
@echo " RULES.$@ "
118
- @echo " MAKEFLAGS: $( value MAKEFLAGS) "
119
111
cd $(BUILDDIR ) && $(MAKE )
120
112
touch $@
121
113
@@ -144,13 +136,6 @@ override_dh_auto_install:
144
136
# make install
145
137
cd $(BUILDDIR) && $(MAKE) install DESTDIR=$(TMP)
146
138
147
- # mariadb-server
148
- # INBO_BIN is generated at build time and must thus be installed like this
149
- install -D -m 0644 $(BUILDDIR)/Docs/INFO_BIN $(TMP)/usr/share/doc/mariadb-server-10.0/INFO_BIN
150
- rm -vf $(TMP)/usr/share/mysql/mi_test_all* \
151
- $(TMP)/usr/share/mysql/mysql-log-rotate \
152
- $(TMP)/usr/share/mysql/mysql.server \
153
- $(TMP)/usr/share/mysql/binary-configure
154
139
# nm numeric soft is not enough, therefore extra sort in command
155
140
# to satisfy Debian reproducible build requirements
156
141
nm -n $(BUILDDIR)/sql/mysqld | sort | gzip -n -9 > $(TMP)/usr/share/doc/mariadb-server-10.0/mysqld.sym.gz
@@ -161,15 +146,12 @@ override_dh_auto_install:
161
146
# rename and install Apport hook
162
147
install -D -m 644 debian/mariadb-server-10.0.py $(TMP)/usr/share/apport/package-hooks/source_mariadb-10.0.py
163
148
164
- # mariadb-test
165
- mv $(TMP)/usr/mysql-test $(TMP)/usr/share/mysql
166
-
167
149
touch $@
168
150
169
151
override_dh_installlogrotate-arch :
170
152
dh_installlogrotate --name mysql-server
171
153
172
- # Start mysql in runlevel 19 before 20 where apache, proftpd etc gets
154
+ # Start mysql at sequence number 19 before 20 where apache, proftpd etc gets
173
155
# started which might depend on a running database server.
174
156
override_dh_installinit-arch :
175
157
dh_installinit --name=mysql -- defaults 19 21
0 commit comments