7 include /usr
/share
/dpatch
/dpatch.make
10 TMP
=$(PWD
)/debian
/tmp
/
12 ARCH
= $(shell dpkg-architecture
-qDEB_BUILD_ARCH
)
13 ARCH_OS
= $(shell dpkg-architecture
-qDEB_BUILD_ARCH_OS
)
14 DEB_BUILD_GNU_TYPE ?
= $(shell dpkg-architecture
-qDEB_BUILD_GNU_TYPE
)
15 DEB_HOST_GNU_TYPE ?
= $(shell dpkg-architecture
-qDEB_HOST_GNU_TYPE
)
16 DEBVERSION
= $(shell dpkg-parsechangelog | awk
'/^Version: / { print $$2 }' | sed
's/^.*-//' )
18 MAKE_J
= $(shell if grep
-q processor.
*3 /proc
/cpuinfo
; then echo
"-j 4"; else echo
""; fi
)
20 ifeq ($(findstring $(ARCH
),i386 sparc
),$(ARCH
))
21 USE_ASSEMBLER
=--enable-assembler
24 ifeq ($(findstring $(ARCH
), arm
),$(ARCH
))
27 FOMIT_FRAME_POINTER
=-fomit-frame-pointer
30 # trying to raise stability on i386. See #116631
31 # don't use it on ia64
32 ifeq ($(findstring $(ARCH
),i386
),$(ARCH
))
33 FNO_EXCEPTIONS
=-fno-exceptions
36 # This causes seg11 crashes if LDAP is used for groups in /etc/nsswitch.conf
37 # so it is disabled by default although, according to MySQL, it brings >10%
38 # performance gain if enabled. See #299382.
39 ifeq ($(STATIC_MYSQLD
), 1)
40 USE_STATIC_MYSQLD
=--with-mysqld-ldflags
=-all-static
43 configure
: patch configure-stamp
45 @echo
"RULES.configure-stamp"
48 ifneq ($(ARCH_OS
),hurd
)
49 if
[ ! -d
/proc
/self
]; then echo
"/proc IS NEEDED" 1>&2; exit
1; fi
53 sh
-c
'PATH=$${MYSQL_BUILD_PATH:-"/bin:/usr/bin"} \
54 CC=$${MYSQL_BUILD_CC:-gcc} \
55 CFLAGS=$${MYSQL_BUILD_CFLAGS:-"-DBIG_JOINS=1 -O2"} \
56 CXX=$${MYSQL_BUILD_CXX:-g++} \
57 CXXFLAGS=$${MYSQL_BUILD_CXXFLAGS:-"-DBIG_JOINS=1 -felide-constructors -fno-rtti -O2"} \
59 --build=${DEB_BUILD_GNU_TYPE} \
60 --host=${DEB_HOST_GNU_TYPE} \
64 --libexecdir=/usr/sbin \
65 --datadir=/usr/share \
66 --localstatedir=/var/lib/mysql \
67 --includedir=/usr/include \
68 --infodir=/usr/share/info \
69 --mandir=/usr/share/man \
72 --with-server-suffix="-Debian_$(DEBVERSION)" \
73 --with-comment="Debian etch distribution" \
77 --enable-thread-safe-client \
79 --enable-local-infile \
83 --with-unix-socket-path=/var/run/mysqld/mysqld.sock \
84 --with-mysqld-user=mysql \
86 $(USE_STATIC_MYSQLD) \
93 --with-extra-charsets=all \
97 --with-archive-storage-engine \
98 --with-csv-storage-engine \
99 --with-federated-storage-engine \
100 --without-embedded-server \
105 --with-embedded-server \
106 --with-embedded-privilege-control \
109 # --sysconfdir=/etc/mysql -- Appends /etc/mysql after ~/ in the my.cnf search patch!
110 # --with-embedded-server \
111 # --with-embedded-privilege-control \
113 # --with-mysqlfs # does not build, no toplevel fs/ directory! Needs CORBA.
115 touch configure-stamp
119 build-stamp
: configure
127 clean: clean-patched unpatch
128 rm -rf debian
/patched
130 @echo
"RULES.clean-patched"
133 rm -f configure-stamp
138 # We like to see how long this is neccessary
140 @find
-type l
-print0 | xargs
--no-run-if-empty
-0 rm -v
141 @find
-name .deps
-type d
-print0 | xargs
--no-run-if-empty
-0 rm -rfv
142 @
rm -vrf ndb
/docs
/.doxy
* ndb
/docs
/*html ndb
/docs
/*pdf innobase
/autom4te.cache
146 scripts
/make_win_binary_distribution \
147 scripts
/mysql_explain_log \
148 scripts
/mysql_tableinfo \
151 strings
/ctype_autoconf.c \
166 @echo
"RULES.install"
172 # some self written manpages which hopefully
173 # gets overwritten sooner or later with upstreams
174 mkdir
-p
$(TMP
)/usr
/share
/man
/man1
/
175 mkdir
-p
$(TMP
)/usr
/share
/man
/man8
/
176 cp debian
/additions
/*.1 $(TMP
)/usr
/share
/man
/man1
/
177 ln
-s mysqlmanager
.1 $(TMP
)/usr
/share
/man
/man1
/mysqlmanager-pwgen
.1
178 ln
-s mysqlmanager
.1 $(TMP
)/usr
/share
/man
/man1
/mysqlmanagerc
.1
180 # make install (trailing slash needed for innobase)
181 $(MAKE
) install DESTDIR
=$(TMP
)/
183 # After installing, remove rpath to make lintian happy.
185 find .
/debian
/tmp
/ -type f
-print0 \
186 | xargs
-0 --no-run-if-empty chrpath
-k
2>/dev
/null \
189 | xargs
--no-run-if-empty chrpath
-d
; \
192 # libmysqlclient: move shared libraries (but not the rest like libheap.a & co)
193 mv
$(TMP
)/usr
/lib
/mysql
/libmysqlclient
* $(TMP
)/usr
/lib
194 perl
-pi
-e
's#/usr/lib/mysql#/usr/lib#' $(TMP
)/usr
/lib
/libmysqlclient.la
195 perl
-pi
-e
's#/usr/lib/mysql#/usr/lib#' $(TMP
)/usr
/lib
/libmysqlclient_r.la
196 # Check if our beloved versioned symbols are really there
197 if
[ "`objdump -T $(TMP)/usr/lib/libmysqlclient.so.15.0.0 | grep -c libmysqlclient_15`" -lt
500 ]; then \
198 echo
"ERROR: versioned symbols are absent"; \
202 # libmysqlclient-dev: forgotten header file since 3.23.25?
203 cp
include/my_config.h
$(TMP
)/usr
/include/mysql
/
204 cp
include/my_dir.h
$(TMP
)/usr
/include/mysql
/
206 # mysql-common: We now provide our own config file.
207 install -d
$(TMP
)/etc
/mysql
208 install -m
0644 debian
/additions
/my.cnf
$(TMP
)/etc
/mysql
/my.cnf
210 pod2man scripts
/mysqlhotcopy
$(TMP
)/usr
/share
/man
/man1
/mysqlhotcopy
.1
213 install -m
0755 debian
/additions
/mysqlreport
$(TMP
)/usr
/bin
/
216 install -m
0755 scripts
/mysqld_safe
$(TMP
)/usr
/bin
/mysqld_safe
217 mkdir
-p
$(TMP
)/usr
/share
/doc
/mysql-server-5.0
/examples
218 mv
$(TMP
)/usr
/share
/mysql
/*cnf
$(TMP
)/usr
/share
/doc
/mysql-server-5.0
/examples
/
219 rm -vf
$(TMP
)/usr
/share
/mysql
/mi_test_all
* \
220 $(TMP
)/usr
/share
/mysql
/mysql-log-rotate \
221 $(TMP
)/usr
/share
/mysql
/mysql.server \
222 $(TMP
)/usr
/share
/mysql
/binary-configure
223 nm
-n sql
/mysqld |gzip
-9 > $(TMP
)/usr
/share
/doc
/mysql-server-5.0
/mysqld.sym.gz
224 install -m
0644 debian
/additions
/ndb_mgmd.cnf
$(TMP
)/usr
/share
/doc
/mysql-server-5.0
/examples
/
225 install -m
0755 debian
/additions
/echo_stderr
$(TMP
)/usr
/share
/mysql
/
226 install -m
0755 debian
/additions
/debian-start
$(TMP
)/etc
/mysql
/
227 install -m
0755 debian
/additions
/debian-start.inc.sh
$(TMP
)/usr
/share
/mysql
/
228 sed
"s#filename => 'ndb_size.tmpl#filename => '/usr/share/mysql/ndb_size.tmpl#" < $(TMP
)/usr
/bin
/ndb_size.pl
> $(TMP
)/usr
/bin
/ndb_size
229 mv
$(TMP
)/usr
/mysql-test
$(TMP
)/usr
/share
/mysql
/
230 mv
$(TMP
)/usr
/sql-bench
$(TMP
)/usr
/share
/mysql
/
232 mkdir
-p
$(TMP
)/usr
/share
/lintian
/overrides
/
233 cp debian
/mysql-server-5.0.lintian-overrides
$(TMP
)/usr
/share
/lintian
/overrides
/mysql-server-5.0
234 cp debian
/mysql-client-5.0.lintian-overrides
$(TMP
)/usr
/share
/lintian
/overrides
/mysql-client-5.0
235 cp debian
/libmysqlclient15-dev.lintian-overrides
$(TMP
)/usr
/share
/lintian
/overrides
/libmysqlclient15-dev
237 # For 4.1 -> 5.0 transition
238 d
=$(TMP
)/usr
/share
/mysql-common
/internal-use-only
/; \
240 cp debian
/mysql-server-5.0.mysql.init
$$d/_etc_init.d_mysql
; \
241 cp debian
/mysql-server-5.0.mysql-server.logrotate
$$d/_etc_logrotate.d_mysql-server
; \
242 cp debian
/additions
/debian-start
$$d/_etc_mysql_debian-start
246 # Build architecture-independent files here.
247 binary-indep
: build
install
248 @echo
"RULES.binary-indep"
253 dh_installexamples
-i
255 dh_installlogrotate
-i
260 dh_installlogcheck
-i
261 dh_installchangelogs
-i
271 # Build architecture-dependent files here.
272 binary-arch
: build
install
273 @echo
"RULES.binary-arch"
279 dh_installexamples
-a
281 dh_installlogrotate
-a
--name mysql-server
282 # NDB needs to start before MySQL if they share a machine
283 # Neither should automatically restart on package install. There
284 # is a rolling order in which nodes in a cluster should be
285 # restarted that is not possible to manage here.
286 dh_installinit
-a
-r
--no-start
--name
=mysql-ndb-mgm
-- defaults
17 23
287 dh_installinit
-a
-r
--no-start
--name
=mysql-ndb
-- defaults
18 22
288 # Start mysql in runlevel 19 before 20 where apache, proftpd etc gets
289 # started which might depend on a running database server.
290 dh_installinit
-a
--name
=mysql
-- defaults
19 21
291 dh_installcron
-a
--name mysql-server
294 dh_installlogcheck
-a
295 dh_installchangelogs
-a
297 dh_link
-a
# .so muss nach .so.1.2.3 installier werden!
301 dh_makeshlibs
-plibmysqlclient15off
-V
'libmysqlclient15off (>= 5.0.27-1)'
304 dh_shlibdeps
-a
-l debian
/libmysqlclient15off
/usr
/lib
-L libmysqlclient15off
310 @echo
>&2 'source and diff are obsolete - use dpkg-source -b'; false
312 binary
: binary-indep binary-arch
313 .PHONY
: clean clean-patched configure build binary binary-indep binary-arch
install patch unpatch