]> git.pld-linux.org Git - packages/mysql.git/blob - mysql.spec
- rel 3
[packages/mysql.git] / mysql.spec
1 # TODO:
2 # - C(XX)FLAGS for innodb subdirs are overriden by ./configure!
3 # - http://bugs.mysql.com/bug.php?id=16470
4 #
5 # Conditional build:
6 %bcond_with     bdb             # Berkeley DB support
7 %bcond_without  innodb          # Without InnoDB support
8 %bcond_without  raid            # Without raid
9 %bcond_without  ssl             # Without OpenSSL
10 %bcond_without  tcpd            # Without libwrap (tcp_wrappers) support
11 %bcond_without  big_tables      # Support tables with more than 4G rows even on 32 bit platforms
12 #
13 %include        /usr/lib/rpm/macros.perl
14 #define _snap   20060111
15 Summary:        MySQL: a very fast and reliable SQL database engine
16 Summary(de):    MySQL: ist eine SQL-Datenbank
17 Summary(fr):    MySQL: un serveur SQL rapide et fiable
18 Summary(pl):    MySQL: bardzo szybka i niezawodna baza danych (SQL)
19 Summary(pt_BR): MySQL: Um servidor SQL rápido e confiável
20 Summary(ru):    MySQL - ÂÙÓÔÒÙÊ SQL-ÓÅÒ×ÅÒ
21 Summary(uk):    MySQL - Û×ÉÄËÉÊ SQL-ÓÅÒ×ÅÒ
22 Summary(zh_CN): MySQLÊý¾Ý¿â·þÎñÆ÷
23 Name:           mysql
24 Version:        5.0.27
25 Release:        3
26 License:        GPL + MySQL FLOSS Exception
27 Group:          Applications/Databases
28 Source0:        http://ftp.gwdg.de/pub/misc/mysql/Downloads/MySQL-5.0/%{name}-%{version}.tar.gz
29 # Source0-md5:  584d423440a9d9c859678e3d4f2690b3
30 #Source0:       http://downloads.mysql.com/snapshots/mysql-5.0/%{name}-%{version}-nightly-%{_snap}.tar.gz
31 Source1:        %{name}.init
32 Source2:        %{name}.sysconfig
33 Source3:        %{name}.logrotate
34 Source4:        %{name}d.conf
35 Source5:        %{name}-clusters.conf
36 Source7:        %{name}-ndb.init
37 Source8:        %{name}-ndb.sysconfig
38 Source9:        %{name}-ndb-mgm.init
39 Source10:       %{name}-ndb-mgm.sysconfig
40 Source11:       %{name}-ndb-cpc.init
41 Source12:       %{name}-ndb-cpc.sysconfig
42 Source13:       %{name}-client.conf
43 Patch0:         %{name}-libs.patch
44
45 Patch2:         %{name}-c++.patch
46 Patch3:         %{name}-info.patch
47 Patch4:         %{name}-sql-cxx-pic.patch
48 Patch5:         %{name}-noproc.patch
49 Patch6:         %{name}-fix_privilege_tables.patch
50 Patch7:         %{name}-align.patch
51 Patch8:         %{name}-client-config.patch
52 Patch9:         %{name}-build.patch
53 Patch10:        %{name}-alpha.patch
54 Patch11:        %{name}-ndb-ldflags.patch
55 Patch12:        %{name}-bug-20153.patch
56 URL:            http://www.mysql.com/products/database/mysql/community_edition.html
57 BuildRequires:  autoconf
58 BuildRequires:  automake
59 %{?with_bdb:BuildRequires:      db3-devel}
60 BuildRequires:  libstdc++-devel >= 5:3.0
61 BuildRequires:  libtool
62 %{?with_tcpd:BuildRequires:     libwrap-devel}
63 BuildRequires:  ncurses-devel >= 4.2
64 %{?with_ssl:BuildRequires:      openssl-devel >= 0.9.7d}
65 BuildRequires:  perl-DBI
66 BuildRequires:  perl-devel >= 1:5.6.1
67 BuildRequires:  readline-devel >= 4.2
68 BuildRequires:  rpm-perlprov >= 4.1-13
69 BuildRequires:  rpmbuild(macros) >= 1.268
70 BuildRequires:  sed >= 4.0
71 BuildRequires:  texinfo
72 BuildRequires:  zlib-devel
73 Requires(post,preun):   /sbin/chkconfig
74 Requires(postun):       /usr/sbin/groupdel
75 Requires(postun):       /usr/sbin/userdel
76 Requires(pre):  /bin/id
77 Requires(pre):  /usr/bin/getgid
78 Requires(pre):  /usr/sbin/groupadd
79 Requires(pre):  /usr/sbin/useradd
80 Requires(triggerpostun):        sed >= 4.0
81 Requires:       %{name}-charsets = %{version}-%{release}
82 Requires:       /usr/bin/setsid
83 Requires:       rc-scripts >= 0.2.0
84 Provides:       MySQL-server
85 Provides:       group(mysql)
86 Provides:       msqlormysql
87 Provides:       user(mysql)
88 Obsoletes:      MySQL
89 Obsoletes:      mysql-server
90 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
91
92 %define         _libexecdir     %{_sbindir}
93 %define         _localstatedir  /var/lib/mysql
94 %define         _mysqlhome      /home/services/mysql
95
96 %define         _noautoreqdep   'perl(DBD::mysql)'
97 # CFLAGS for innodb are altered
98 %undefine       configure_cache
99
100 %description
101 MySQL is a true multi-user, multi-threaded SQL (Structured Query
102 Language) database server. SQL is the most popular database language
103 in the world. MySQL is a client/server implementation that consists of
104 a server daemon mysqld and many different client programs/libraries.
105
106 The main goals of MySQL are speed, robustness and easy to use. MySQL
107 was originally developed because we at Tcx needed a SQL server that
108 could handle very big databases with magnitude higher speed than what
109 any database vendor could offer to us. We have now been using MySQL
110 since 1996 in a environment with more than 40 databases, 10,000
111 tables, of which more than 500 have more than 7 million rows. This is
112 about 50G of mission critical data.
113
114 The base upon which MySQL is built is a set of routines that have been
115 used in a highly demanding production environment for many years.
116 While MySQL is still in development, it already offers a rich and
117 highly useful function set.
118
119 %description -l fr
120 MySQL est un serveur de bases de donnees SQL vraiment multi-usagers et
121 multi-taches. Le langage SQL est le langage de bases de donnees le
122 plus populaire au monde. MySQL est une implementation client/serveur
123 qui consiste en un serveur (mysqld) et differents
124 programmes/bibliotheques clientes.
125
126 Les objectifs principaux de MySQL sont: vitesse, robustesse et
127 facilite d'utilisation. MySQL fut originalement developpe parce que
128 nous, chez Tcx, avions besoin d'un serveur SQL qui pouvait gerer de
129 tres grandes bases de donnees avec une vitesse d'un ordre de magnitude
130 superieur a ce que n'importe quel vendeur pouvait nous offrir. Nous
131 utilisons MySQL depuis 1996 dans un environnement avec plus de 40
132 bases de donnees, 10000 tables, desquelles plus de 500 ont plus de 7
133 millions de lignes. Ceci represente environ 50G de donnees critiques.
134
135 A la base de la conception de MySQL, on retrouve une serie de routines
136 qui ont ete utilisees dans un environnement de production pendant
137 plusieurs annees. Meme si MySQL est encore en developpement, il offre
138 deja une riche et utile serie de fonctions.
139
140 %description -l pl
141 MySQL to prawdziwie wielou¿ytkownikowy, wielow±tkowy serwer baz danych
142 SQL. SQL jest najpopularniejszym na ¶wiecie jêzykiem u¿ywanym do baz
143 danych. MySQL to implementacja klient/serwer sk³adaj±ca siê z demona
144 mysqld i wielu ró¿nych programów i bibliotek klienckich.
145
146 G³ównymi celami MySQL-a s± szybko¶æ, potêga i ³atwo¶æ u¿ytkowania.
147 MySQL oryginalnie by³ tworzony, poniewa¿ autorzy w Tcx potrzebowali
148 serwera SQL do obs³ugi bardzo du¿ych baz danych z szybko¶ci± o wiele
149 wiêksz±, ni¿ mogli zaoferowaæ inni producenci baz danych. U¿ywaj± go
150 od 1996 roku w ¶rodowisku z ponad 40 bazami danych, 10 000 tabel, z
151 których ponad 500 zawiera ponad 7 milionów rekordów - w sumie oko³o
152 50GB krytycznych danych.
153
154 Baza, na której oparty jest MySQL, sk³ada siê ze zbioru procedur,
155 które by³y u¿ywane w bardzo wymagaj±cym ¶rodowisku produkcyjnym przez
156 wiele lat. Pomimo, ¿e MySQL jest ci±gle rozwijany, ju¿ oferuje bogaty
157 i u¿yteczny zbiór funkcji.
158
159 %description -l de
160 MySQL ist eine SQL-Datenbank. Allerdings ist sie im Gegensatz zu
161 Oracle, DB2 oder PostgreSQL keine relationale Datenbank. Die Daten
162 werden zwar in zweidimensionalen Tabellen gespeichert und können mit
163 einem Primärschlüssel versehen werden. Es ist aber keine Definition
164 eines Fremdschlüssels möglich. Der Benutzer ist somit bei einer
165 MySQL-Datenbank völlig allein für die (referenzielle) Integrität der
166 Daten verantwortlich. Allein durch die Nutzung externer
167 Tabellenformate, wie InnoDB bzw Berkeley DB wird eine Relationalität
168 ermöglicht. Diese Projekte sind aber getrennt von MySQL zu betrachten.
169
170 %description -l pt_BR
171 O MySQL é um servidor de banco de dados SQL realmente multiusuário e
172 multi-tarefa. A linguagem SQL é a mais popular linguagem para banco de
173 dados no mundo. O MySQL é uma implementação cliente/servidor que
174 consiste de um servidor chamado mysqld e diversos
175 programas/bibliotecas clientes. Os principais objetivos do MySQL são:
176 velocidade, robustez e facilidade de uso. O MySQL foi originalmente
177 desenvolvido porque nós na Tcx precisávamos de um servidor SQL que
178 pudesse lidar com grandes bases de dados e com uma velocidade muito
179 maior do que a que qualquer vendedor podia nos oferecer. Estamos
180 usando o MySQL desde 1996 em um ambiente com mais de 40 bases de dados
181 com 10.000 tabelas, das quais mais de 500 têm mais de 7 milhões de
182 linhas. Isto é o equivalente a aproximadamente 50G de dados críticos.
183 A base da construção do MySQL é uma série de rotinas que foram usadas
184 em um ambiente de produção com alta demanda por muitos anos. Mesmo o
185 MySQL estando ainda em desenvolvimento, ele já oferece um conjunto de
186 funções muito ricas e úteis. Veja a documentação para maiores
187 informações.
188
189 %description -l ru
190 MySQL - ÜÔÏ SQL (Structured Query Language) ÓÅÒ×ÅÒ ÂÁÚÙ ÄÁÎÎÙÈ. MySQL
191 ÂÙÌÁ ÎÁÐÉÓÁÎÁ Michael'ÏÍ (monty) Widenius'ÏÍ. óÍ. ÆÁÊÌ CREDITS ×
192 ÄÉÓÔÒÉÂÕÔÉ×Å ÎÁ ÐÒÅÄÍÅÔ ÄÒÕÇÉÈ ÕÞÁÓÔÎÉËÏ× ÐÒÏÅËÔÁ É ÐÒÏÞÅÊ ÉÎÆÏÒÍÁÃÉÉ
193 Ï MySQL.
194
195 %description -l uk
196 MySQL - ÃÅ SQL (Structured Query Language) ÓÅÒ×ÅÒ ÂÁÚÉ ÄÁÎÉÈ. MySQL
197 ÂÕÌÏ ÎÁÐÉÓÁÎÏ Michael'ÏÍ (monty) Widenius'ÏÍ. äÉ×. ÆÁÊÌ CREDITS ×
198 ÄÉÓÔÒÉÂÕÔÉצ ÄÌÑ ¦ÎÆÏÒÍÁ槠ÐÒÏ ¦ÎÛÉÈ ÕÞÁÓÎÉ˦נÐÒÏÅËÔÕ ÔÁ ¦ÎÛϧ
199 ¦ÎÆÏÒÍÁæ§.
200
201 %package charsets
202 Summary:        MySQL - character sets definitions
203 Summary(pl):    MySQL - definicje kodowañ znaków
204 Group:          Applications/Databases
205
206 %description charsets
207 This package contains character sets definitions needed by both client
208 and server.
209
210 %description charsets -l pl
211 Ten pakiet zawiera definicje kodowañ znaków potrzebne dla serwera i
212 klienta.
213
214 %package extras
215 Summary:        MySQL additional utilities
216 Summary(pl):    Dodatkowe narzêdzia do MySQL
217 Group:          Applications/Databases
218 Requires:       %{name}-libs = %{version}-%{release}
219
220 %description extras
221 MySQL additional utilities except Perl scripts (they may be found in
222 %{name}-extras-perl package).
223
224 %description extras -l pl
225 Dodatkowe narzêdzia do MySQL - z wyj±tkiem skryptów Perla (które s± w
226 pakiecie %{name}-extras-perl).
227
228 %package extras-perl
229 Summary:        MySQL additional utilities written in Perl
230 Summary(pl):    Dodatkowe narzêdzia do MySQL napisane w Perlu
231 Group:          Applications/Databases
232 Requires:       %{name}-extras = %{version}-%{release}
233 Requires:       perl(DBD::mysql)
234
235 %description extras-perl
236 MySQL additional utilities written in Perl.
237
238 %description extras-perl -l pl
239 Dodatkowe narzêdzia do MySQL napisane w Perlu.
240
241 %package client
242 Summary:        MySQL - Client
243 Summary(pl):    MySQL - Klient
244 Summary(pt):    MySQL - Cliente
245 Summary(ru):    MySQL ËÌÉÅÎÔ
246 Summary(uk):    MySQL Ë̦¤ÎÔ
247 Group:          Applications/Databases
248 Requires:       %{name}-charsets = %{version}-%{release}
249 Requires:       %{name}-libs = %{version}-%{release}
250 Obsoletes:      MySQL-client
251
252 %description client
253 This package contains the standard MySQL clients.
254
255 %description client -l fr
256 Ce package contient les clients MySQL standards.
257
258 %description client -l pl
259 Standardowe programy klienckie MySQL.
260
261 %description client -l pt_BR
262 Este pacote contém os clientes padrão para o MySQL.
263
264 %description client -l ru
265 üÔÏÔ ÐÁËÅÔ ÓÏÄÅÒÖÉÔ ÔÏÌØËÏ ËÌÉÅÎÔ MySQL.
266
267 %description client -l uk
268 ãÅÊ ÐÁËÅԠͦÓÔÉÔØ Ô¦ÌØËÉ Ë̦¤ÎÔÁ MySQL.
269
270 %package libs
271 Summary:        Shared libraries for MySQL
272 Summary(pl):    Biblioteki dzielone MySQL
273 Group:          Libraries
274 Obsoletes:      libmysql10
275 Obsoletes:      mysql-doc < 4.1.12
276
277 %description libs
278 Shared libraries for MySQL.
279
280 %description libs -l pl
281 Biblioteki dzielone MySQL.
282
283 %package devel
284 Summary:        MySQL - Development header files and libraries
285 Summary(pl):    MySQL - Pliki nag³ówkowe i biblioteki dla programistów
286 Summary(pt):    MySQL - Medições de desempenho
287 Summary(ru):    MySQL - ÈÅÄÅÒÙ É ÂÉÂÌÉÏÔÅËÉ ÒÁÚÒÁÂÏÔÞÉËÁ
288 Summary(uk):    MySQL - ÈÅÄÅÒÉ ÔÁ Â¦Â̦ÏÔÅËÉ ÐÒÏÇÒÁͦÓÔÁ
289 Group:          Development/Libraries
290 Requires:       %{name}-libs = %{version}-%{release}
291 %{?with_ssl:Requires:   openssl-devel}
292 Requires:       zlib-devel
293 Obsoletes:      MySQL-devel
294 Obsoletes:      libmysql10-devel
295
296 %description devel
297 This package contains the development header files and libraries
298 necessary to develop MySQL client applications.
299
300 %description devel -l fr
301 Ce package contient les fichiers entetes et les librairies de
302 developpement necessaires pour developper des applications clientes
303 MySQL.
304
305 %description devel -l pl
306 Pliki nag³ówkowe i biblioteki konieczne do kompilacji aplikacji
307 klienckich MySQL.
308
309 %description devel -l pt_BR
310 Este pacote contém os arquivos de cabeçalho (header files) e
311 bibliotecas necessárias para desenvolver aplicações clientes do MySQL.
312
313 %description devel -l ru
314 üÔÏÔ ÐÁËÅÔ ÓÏÄÅÒÖÉÔ ÈÅÄÅÒÙ É ÂÉÂÌÉÏÔÅËÉ ÒÁÚÒÁÂÏÔÞÉËÁ, ÎÅÏÂÈÏÄÉÍÙÅ ÄÌÑ
315 ÒÁÚÒÁÂÏÔËÉ ËÌÉÅÎÔÓËÉÈ ÐÒÉÌÏÖÅÎÉÊ.
316
317 %description devel -l uk
318 ãÅÊ ÐÁËÅԠͦÓÔÉÔØ ÈÅÄÅÒÉ ÔÁ Â¦Â̦ÏÔÅËÉ ÐÒÏÇÒÁͦÓÔÁ, ÎÅÏÂȦÄΦ ÄÌÑ
319 ÒÏÚÒÏÂËÉ ÐÒÏÇÒÁÍ-Ë̦¤ÎÔ¦×.
320
321 %package static
322 Summary:        MySQL static libraries
323 Summary(pl):    Biblioteki statyczne MySQL
324 Summary(ru):    MySQL - ÓÔÁÔÉÞÅÓËÉÅ ÂÉÂÌÉÏÔÅËÉ
325 Summary(uk):    MySQL - ÓÔÁÔÉÞΦ Â¦Â̦ÏÔÅËÉ
326 Group:          Development/Libraries
327 Requires:       %{name}-devel = %{version}-%{release}
328 Obsoletes:      MySQL-static
329
330 %description static
331 MySQL static libraries.
332
333 %description static -l pl
334 Biblioteki statyczne MySQL.
335
336 %description static -l ru
337 üÔÏÔ ÐÁËÅÔ ÓÏÄÅÒÖÉÔ ÓÔÁÔÉÞÅÓËÉÅ ÂÉÂÌÉÏÔÅËÉ ÒÁÚÒÁÂÏÔÞÉËÁ, ÎÅÏÂÈÏÄÉÍÙÅ
338 ÄÌÑ ÒÁÚÒÁÂÏÔËÉ ËÌÉÅÎÔÓËÉÈ ÐÒÉÌÏÖÅÎÉÊ.
339
340 %description static -l uk
341 ãÅÊ ÐÁËÅԠͦÓÔÉÔØ ÓÔÁÔÉÞΦ Â¦Â̦ÏÔÅËÉ ÐÒÏÇÒÁͦÓÔÁ, ÎÅÏÂȦÄΦ ÄÌÑ
342 ÒÏÚÒÏÂËÉ ÐÒÏÇÒÁÍ-Ë̦¤ÎÔ¦×.
343
344 %package bench
345 Summary:        MySQL - Benchmarks
346 Summary(pl):    MySQL - Programy testuj±ce szybko¶æ dzia³ania bazy
347 Summary(pt):    MySQL - Medições de desempenho
348 Summary(ru):    MySQL - ÂÅÎÞÍÁÒËÉ
349 Summary(uk):    MySQL - ÂÅÎÞÍÁÒËÉ
350 Group:          Applications/Databases
351 Requires:       %{name} = %{version}-%{release}
352 Requires:       %{name}-client
353 Requires:       perl(DBD::mysql)
354 Obsoletes:      MySQL-bench
355
356 %description bench
357 This package contains MySQL benchmark scripts and data.
358
359 %description bench -l pl
360 Programy testuj±ce szybko¶æ serwera MySQL.
361
362 %description bench -l pt_BR
363 Este pacote contém medições de desempenho de scripts e dados do MySQL.
364
365 %description bench -l ru
366 üÔÏÔ ÐÁËÅÔ ÓÏÄÅÒÖÉÔ ÓËÒÉÐÔÙ É ÄÁÎÎÙÅ ÄÌÑ ÏÃÅÎËÉ ÐÒÏÉÚ×ÏÄÉÔÅÌØÎÏÓÔÉ
367 MySQL.
368
369 %description bench -l uk
370 ãÅÊ ÐÁËÅԠͦÓÔÉÔØ ÓËÒÉÐÔÉ ÔÁ ÄÁΦ ÄÌÑ ÏæÎËÉ ÐÒÏÄÕËÔÉ×ÎÏÓÔ¦ MySQL.
371
372 %package doc
373 Summary:        MySQL manual
374 Summary(pl):    Podrêcznik u¿ytkownika MySQL
375 Group:          Applications/Databases
376
377 %description doc
378 This package contains manual in HTML format.
379
380 %description doc -l pl
381 Podrêcznik MySQL-a w formacie HTML.
382
383 %package ndb
384 Summary:        MySQL - NDB Storage Engine Daemon
385 Summary(pl):    MySQL - demon silnika przechowywania danych NDB
386 Group:          Applications/Databases
387 Requires:       %{name}-libs = %{version}-%{release}
388
389 %description ndb
390 This package contains the standard MySQL NDB Storage Engine Daemon.
391
392 %description ndb -l pl
393 Ten pakiet zawiera standardowego demona silnika przechowywania danych
394 NDB.
395
396 %package ndb-client
397 Summary:        MySQL - NDB Clients
398 Summary(pl):    MySQL - programy klienckie NDB
399 Group:          Applications/Databases
400 Requires:       %{name}-libs = %{version}-%{release}
401
402 %description ndb-client
403 This package contains the standard MySQL NDB Clients.
404
405 %description ndb-client -l pl
406 Ten pakiet zawiera standardowe programy klienckie MySQL NDB.
407
408 %package ndb-mgm
409 Summary:        MySQL - NDB Management Daemon
410 Summary(pl):    MySQL - demon zarz±dzaj±cy NDB
411 Group:          Applications/Databases
412 Requires:       %{name}-libs = %{version}-%{release}
413
414 %description ndb-mgm
415 This package contains the standard MySQL NDB Management Daemon.
416
417 %description ndb-mgm -l pl
418 Ten pakiet zawiera standardowego demona zarz±dzaj±cego MySQL NDB.
419
420 %package ndb-cpc
421 Summary:        MySQL - NDB CPC Daemon
422 Summary(pl):    MySQL - demon NDB CPC
423 Group:          Applications/Databases
424 Requires:       %{name}-libs = %{version}-%{release}
425
426 %description ndb-cpc
427 This package contains the standard MySQL NDB CPC Daemon.
428
429 %description ndb-cpc -l pl
430 Ten pakiet zawiera standardowego demona MySQL NDB CPC.
431
432 %prep
433 %setup -q %{?_snap:-n %{name}-%{version}-nightly-%{_snap}}
434 %patch0 -p1
435
436 %patch2 -p1
437 %patch3 -p1
438 %ifarch alpha
439 # this is strange: mysqld functions for UDF modules are not explicitly defined,
440 # so -rdynamic is used; in such case gcc3+ld on alpha doesn't like C++ vtables
441 # in objects compiled without -fPIC
442 %patch4 -p1
443 # gcc 3.3.x ICE
444 %patch10 -p1
445 %endif
446 %patch5 -p1
447 %patch6 -p1
448 %patch7 -p1
449 %patch8 -p1
450 %patch9 -p1
451 %patch11 -p1
452 %patch12 -p1
453
454 %build
455 %{__libtoolize}
456 %{__aclocal}
457 %{__automake}
458 %{__autoconf}
459
460 # The compiler flags are as per their "official" spec ;)
461 CXXFLAGS="%{rpmcflags} -felide-constructors -fno-rtti -fno-exceptions %{!?debug:-fomit-frame-pointer}"
462 CFLAGS="%{rpmcflags} %{!?debug:-fomit-frame-pointer}"
463
464 # NOTE: the PS, FIND_PROC, KILL, CHECK_PID are not used by PLD Linux
465 # and therefore do not add BR on these. These are here just to satisfy
466 # configure.
467
468 %configure \
469         PS='/bin/ps' \
470         FIND_PROC='/bin/ps p $$PID' \
471         KILL='/bin/kill' \
472         CHECK_PID='/bin/kill -0 $$PID' \
473         --enable-assembler \
474         --enable-largefile=yes \
475         --enable-shared \
476         --enable-static \
477         --enable-thread-safe-client \
478         --with%{!?with_bdb:out}-berkeley-db \
479         --with%{!?with_innodb:out}-innodb \
480         --with%{!?with_raid:out}-raid \
481         --with%{!?with_ssl:out}-openssl \
482         --with%{!?with_tcpd:out}-libwrap \
483         %{?with_big_tables:--with-big-tables} \
484         --with-comment="PLD Linux Distribution MySQL RPM" \
485         --with%{!?debug:out}-debug \
486         --with%{!?debug:out}-ndb-debug \
487         --with-embedded-server \
488         --with-extra-charsets=all \
489         --with-low-memory \
490         --with-mysqld-user=mysql \
491         --with-named-curses-libs="-lncurses" \
492         --with-named-thread-libs="-lpthread" \
493         --with-unix-socket-path=/var/lib/mysql/mysql.sock \
494         --with-archive-storage-engine \
495         --with-vio \
496         --with-ndbcluster \
497         --without-readline \
498         --without-libedit \
499         --without-docs
500 #       --with-mysqlfs
501 #       --with-ndb-test --with-ndb-docs
502
503 # NOTE that /var/lib/mysql/mysql.sock is symlink to real sock file
504 # (it defaults to first cluster but user may change it to whatever
505 # cluster it wants)
506
507 echo -e "all:\ninstall:\nclean:\nlink_sources:\n" > libmysqld/examples/Makefile
508
509 %{__make} \
510         benchdir=$RPM_BUILD_ROOT%{_datadir}/sql-bench
511
512 %{__make} -C Docs mysql.info
513
514 %install
515 rm -rf $RPM_BUILD_ROOT
516 install -d $RPM_BUILD_ROOT/etc/{logrotate.d,rc.d/init.d,sysconfig,mysql} \
517            $RPM_BUILD_ROOT/var/{log/{archiv,}/mysql,lib/mysql} \
518            $RPM_BUILD_ROOT{%{_infodir},%{_mysqlhome}}
519
520 %if %{with bdb}
521 install -d $RPM_BUILD_ROOT/var/lib/mysql/bdb/{log,tmp}
522 %endif
523
524 # Make install
525 %{__make} install \
526         DESTDIR=$RPM_BUILD_ROOT \
527         benchdir=%{_datadir}/sql-bench \
528         libsdir=/tmp
529 # libsdir is to avoid installing innodb static libs in $RPM_BUILD_ROOT../libs
530
531 install Docs/mysql.info $RPM_BUILD_ROOT%{_infodir}
532
533 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql
534 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/mysql
535 install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/mysql
536 # This is template for configuration file which is created after 'service mysql init'
537 install %{SOURCE4} mysqld.conf
538 install %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/mysql/clusters.conf
539 touch $RPM_BUILD_ROOT/var/log/mysql/{err,log,update}
540
541 # remove innodb directives from mysqld.conf if mysqld is configured without
542 %if !%{with innodb}
543         echo "BASE_TABLETYPE=MyISAM" >> $RPM_BUILD_ROOT/etc/sysconfig/mysql
544         cp mysqld.conf mysqld.tmp
545         awk 'BEGIN { RS="\n\n" } !/innodb/ { printf("%s\n\n", $0) }' < mysqld.tmp > mysqld.conf
546 %endif
547
548 # remove berkeley-db directives from mysqld.conf if mysqld is configured without
549 %if !%{with bdb}
550         cp mysqld.conf mysqld.tmp
551         awk 'BEGIN { RS="\n\n" } !/bdb/ { printf("%s\n\n", $0) }' < mysqld.tmp > mysqld.conf
552 %endif
553
554 install mysqld.conf $RPM_BUILD_ROOT%{_datadir}/mysql/mysqld.conf
555 install %{SOURCE13} $RPM_BUILD_ROOT%{_sysconfdir}/mysql/mysql-client.conf
556
557 # NDB
558 install %{SOURCE7} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql-ndb
559 install %{SOURCE8} $RPM_BUILD_ROOT/etc/sysconfig/mysql-ndb
560 install %{SOURCE9} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql-ndb-mgm
561 install %{SOURCE10} $RPM_BUILD_ROOT/etc/sysconfig/mysql-ndb-mgm
562 install %{SOURCE11} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql-ndb-cpc
563 install %{SOURCE12} $RPM_BUILD_ROOT/etc/sysconfig/mysql-ndb-cpc
564 # remove .txt variants for .sys messages
565 rm -f $RPM_BUILD_ROOT%{_datadir}/%{name}/*/*.txt
566
567 mv -f $RPM_BUILD_ROOT%{_libdir}/mysql/lib* $RPM_BUILD_ROOT%{_libdir}
568 sed -i -e 's,%{_libdir}/mysql,%{_libdir},' $RPM_BUILD_ROOT{%{_libdir}/libmysqlclient{,_r}.la,%{_bindir}/mysql_config}
569
570 # remove known unpackaged files
571 rm -rf $RPM_BUILD_ROOT%{_prefix}/mysql-test
572
573 # rename not to be so generic name
574 mv $RPM_BUILD_ROOT%{_bindir}/{,mysql_}comp_err
575 mv $RPM_BUILD_ROOT%{_bindir}/{,mysql_}resolve_stack_dump
576
577 # not useful without -debug build
578 %{!?debug:rm -f $RPM_BUILD_ROOT%{_bindir}/mysql_resolve_stack_dump}
579 # generate symbols file, so one can generate backtrace using it
580 # mysql_resolve_stack_dump -s %{_datadir}/mysql/mysqld.sym -n mysqld.stack.
581 # http://dev.mysql.com/doc/refman/5.0/en/using-stack-trace.html
582 %{?debug:nm -n $RPM_BUILD_ROOT%{_sbindir}/mysqld > $RPM_BUILD_ROOT%{_datadir}/mysql/mysqld.sym}
583
584 # functionality in initscript / rpm
585 rm $RPM_BUILD_ROOT%{_bindir}/mysql_create_system_tables
586 rm $RPM_BUILD_ROOT%{_bindir}/mysql_install_db
587 rm $RPM_BUILD_ROOT%{_bindir}/mysqld_safe
588 rm $RPM_BUILD_ROOT%{_bindir}/mysqld_multi
589 rm $RPM_BUILD_ROOT%{_mandir}/man1/mysqld_{multi,safe}*
590 rm $RPM_BUILD_ROOT%{_datadir}/%{name}/mysql-log-rotate
591 rm $RPM_BUILD_ROOT%{_datadir}/%{name}/mysql.server
592 rm $RPM_BUILD_ROOT%{_datadir}/%{name}/binary-configure
593 rm $RPM_BUILD_ROOT%{_datadir}/%{name}/errmsg.txt
594 rm $RPM_BUILD_ROOT%{_bindir}/mysql_waitpid
595 rm $RPM_BUILD_ROOT%{_mandir}/man1/mysql.server*
596 rm $RPM_BUILD_ROOT%{_mandir}/man1/safe_mysqld*
597 rm $RPM_BUILD_ROOT%{_mandir}/man1/mysqlman.1*
598
599 # in %doc
600 rm $RPM_BUILD_ROOT%{_datadir}/%{name}/*.{ini,cnf}
601
602 %clean
603 rm -rf $RPM_BUILD_ROOT
604
605 %pre
606 %groupadd -g 89 mysql
607 %useradd -u 89 -d %{_mysqlhome} -s /bin/sh -g mysql -c "MySQL Server" mysql
608
609 %post
610 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
611 /sbin/chkconfig --add mysql
612 %service mysql restart
613
614 %preun
615 if [ "$1" = "0" ]; then
616         %service -q mysql stop
617         /sbin/chkconfig --del mysql
618 fi
619
620 %postun
621 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
622 if [ "$1" = "0" ]; then
623         %userremove mysql
624         %groupremove mysql
625 fi
626
627 %post ndb
628 /sbin/chkconfig --add mysql-ndb
629 %service mysql-ndb restart "mysql NDB engine"
630
631 %preun ndb
632 if [ "$1" = "0" ]; then
633         %service mysql-ndb stop
634         /sbin/chkconfig --del mysql-ndb
635 fi
636
637 %post ndb-mgm
638 /sbin/chkconfig --add mysql-ndb-mgm
639 %service mysql-ndb-mgm restart "mysql NDB management node"
640
641 %preun ndb-mgm
642 if [ "$1" = "0" ]; then
643         %service mysql-ndb-mgm stop
644         /sbin/chkconfig --del mysql-ndb-mgm
645 fi
646
647 %post ndb-cpc
648 /sbin/chkconfig --add mysql-ndb-cpc
649 %service mysql-ndb-cpc restart "mysql NDB CPC"
650
651 %preun ndb-cpc
652 if [ "$1" = "0" ]; then
653         %service mysql-ndb-cpc stop
654         /sbin/chkconfig --del mysql-ndb-cpc
655 fi
656
657 %post   libs -p /sbin/ldconfig
658 %postun libs -p /sbin/ldconfig
659
660 %triggerpostun -- mysql <= 4.0.20-2
661 # For clusters in /etc/mysql/clusters.conf
662 if [ -f "/etc/sysconfig/mysql" ]; then
663         . /etc/sysconfig/mysql
664         if [ -n "$MYSQL_DB_CLUSTERS" ]; then
665                 for i in "$MYSQL_DB_CLUSTERS"; do
666                         echo "$i/mysqld.conf=$i" >> /etc/mysql/clusters.conf
667                 done
668                 echo "# Do not use **obsolete** option MYSQL_DB_CLUSTERS" >> /etc/sysconfig/mysql
669                 echo "# USE /etc/mysql/clusters.conf instead" >> /etc/sysconfig/mysql
670                 echo "Converted clusters from MYSQL_DB_CLUSTERS to /etc/mysql/clusters.conf."
671                 echo "You NEED to fix your /etc/sysconfig/mysql and verify /etc/mysql/clusters.conf."
672         fi
673 fi
674
675 %triggerpostun -- mysql <= 4.1.1
676 # For better compatibility with prevoius versions:
677 for config in $(awk -F= '!/^#/ && /=/{print $1}' /etc/mysql/clusters.conf); do
678         if echo "$config" | grep -q '^/'; then
679                 config_file="$config"
680         elif [ -f "/etc/mysql/$config" ]; then
681                 config_file=/etc/mysql/$config
682         else
683                 clusterdir=$(awk -F= "/^$config/{print \$2}" /etc/mysql/clusters.conf)
684                 if [ -z "$clusterdir" ]; then
685                         echo >&2 "Can't find cluster dir for $config!"
686                         echo >&2 "Please remove extra (leading) spaces from /etc/mysql/clusters.conf"
687                         exit 1
688                 fi
689                 config_file="$clusterdir/mysqld.conf"
690         fi
691
692         if [ ! -f "$config_file" ]; then
693                         echo >&2 "Lost myself! Please report this (with above errors, if any) to http://bugs.pld-linux.org/"
694                         exit 1
695         fi
696         echo "Adding option old-passwords to config: $config_file"
697         echo "If you want to use new, better passwords - remove it"
698
699         # sed magic to add 'old-passwords' to [mysqld] section
700         sed -i -e '/./{H;$!d;};x;/\[mysqld\]/{
701                 a
702                 a; Compatibility options:
703                 aold-passwords
704         }
705         ' $config_file
706 done
707
708 %banner -e %{name}-4.1.x <<-EOF
709         If you want to use new help tables in MySQL 4.1.x then You'll need to import the help data:
710         mysql -u mysql mysql < %{_datadir}/%{name}/fill_help_tables.sql
711 EOF
712 #'
713
714 %files
715 %defattr(644,root,root,755)
716 %doc support-files/*.cnf support-files/*.ini
717 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/mysql
718 %attr(754,root,root) /etc/rc.d/init.d/mysql
719 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mysql
720 %attr(640,root,mysql) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mysql/clusters.conf
721 %attr(755,root,root) %{_bindir}/innochecksum
722 %attr(755,root,root) %{_bindir}/myisamchk
723 %attr(755,root,root) %{_bindir}/myisamlog
724 %attr(755,root,root) %{_bindir}/myisampack
725 %attr(755,root,root) %{_bindir}/mysql_fix_privilege_tables
726 %attr(755,root,root) %{_bindir}/my_print_defaults
727 %attr(755,root,root) %{_bindir}/mysql_upgrade
728 %attr(755,root,root) %{_bindir}/mysql_upgrade_shell
729 %attr(755,root,root) %{_sbindir}/mysqld
730 %{_mandir}/man1/mysql_fix_privilege_tables.1*
731 %{_mandir}/man1/mysqld.1*
732 %{_mandir}/man1/myisamchk.1*
733 %{_mandir}/man1/myisamlog.1*
734 %{_mandir}/man1/myisampack.1*
735 %{_mandir}/man1/mysql_upgrade.1*
736 %{_mandir}/man8/mysqld.8*
737
738 %attr(700,mysql,mysql) %{_mysqlhome}
739 # root:root is proper here for AC mysql.rpm while mysql:mysql is potential security hole
740 %attr(751,root,root) /var/lib/mysql
741 %attr(750,mysql,mysql) %dir /var/log/mysql
742 %attr(750,mysql,mysql) %dir /var/log/archiv/mysql
743 %attr(640,mysql,mysql) %ghost /var/log/mysql/*
744
745 %{_infodir}/mysql.info*
746 # This is template for configuration file which is created after 'service mysql init'
747 %{_datadir}/mysql/mysqld.conf
748 %{_datadir}/mysql/english
749 %{_datadir}/mysql/fill_help_tables.sql
750 %{_datadir}/mysql/mysql_fix_privilege_tables.sql
751 %lang(cs) %{_datadir}/mysql/czech
752 %lang(da) %{_datadir}/mysql/danish
753 %lang(de) %{_datadir}/mysql/german
754 %lang(el) %{_datadir}/mysql/greek
755 %lang(es) %{_datadir}/mysql/spanish
756 %lang(et) %{_datadir}/mysql/estonian
757 %lang(fr) %{_datadir}/mysql/french
758 %lang(hu) %{_datadir}/mysql/hungarian
759 %lang(it) %{_datadir}/mysql/italian
760 %lang(ja) %{_datadir}/mysql/japanese
761 %lang(ko) %{_datadir}/mysql/korean
762 %lang(nl) %{_datadir}/mysql/dutch
763 %lang(nb) %{_datadir}/mysql/norwegian
764 %lang(nn) %{_datadir}/mysql/norwegian-ny
765 %lang(pl) %{_datadir}/mysql/polish
766 %lang(pt) %{_datadir}/mysql/portuguese
767 %lang(ro) %{_datadir}/mysql/romanian
768 %lang(ru) %{_datadir}/mysql/russian
769 %lang(sr) %{_datadir}/mysql/serbian
770 %lang(sk) %{_datadir}/mysql/slovak
771 %lang(sv) %{_datadir}/mysql/swedish
772 %lang(uk) %{_datadir}/mysql/ukrainian
773
774 %files charsets
775 %defattr(644,root,root,755)
776 %dir %{_datadir}/mysql
777 %{_datadir}/mysql/charsets
778
779 %files extras
780 %defattr(644,root,root,755)
781 %attr(755,root,root) %{_bindir}/msql2mysql
782 %attr(755,root,root) %{_bindir}/myisam_ftdump
783 %attr(755,root,root) %{_bindir}/mysql_secure_installation
784 %attr(755,root,root) %{_bindir}/mysql_tzinfo_to_sql
785 %attr(755,root,root) %{_bindir}/mysqlcheck
786 %attr(755,root,root) %{_bindir}/perror
787 %attr(755,root,root) %{_bindir}/replace
788 %attr(755,root,root) %{_bindir}/resolveip
789 %{_mandir}/man1/msql2mysql.1*
790 %{_mandir}/man1/myisam_ftdump.1*
791 %{_mandir}/man1/mysqlcheck.1*
792 %{_mandir}/man1/perror.1*
793 %{_mandir}/man1/replace.1*
794
795 %files extras-perl
796 %defattr(644,root,root,755)
797 %attr(755,root,root) %{_bindir}/mysql_convert_table_format
798 %attr(755,root,root) %{_bindir}/mysql_explain_log
799 %attr(755,root,root) %{_bindir}/mysql_find_rows
800 %attr(755,root,root) %{_bindir}/mysql_fix_extensions
801 %attr(755,root,root) %{_bindir}/mysql_setpermission
802 %attr(755,root,root) %{_bindir}/mysql_tableinfo
803 %attr(755,root,root) %{_bindir}/mysql_zap
804 %attr(755,root,root) %{_bindir}/mysqlaccess
805 %attr(755,root,root) %{_bindir}/mysqldumpslow
806 %attr(755,root,root) %{_bindir}/mysqlhotcopy
807 %{_mandir}/man1/mysql_explain_log.1*
808 %{_mandir}/man1/mysql_zap.1*
809 %{_mandir}/man1/mysqlaccess.1*
810 %{_mandir}/man1/mysqlhotcopy.1*
811
812 %files client
813 %defattr(644,root,root,755)
814 %attr(755,root,root) %{_bindir}/mysql
815 %attr(755,root,root) %{_bindir}/mysqlbug
816 %attr(755,root,root) %{_bindir}/mysqldump
817 %attr(755,root,root) %{_bindir}/mysqlimport
818 %attr(755,root,root) %{_sbindir}/mysqlmanager*
819 %attr(755,root,root) %{_bindir}/mysqlshow
820 %attr(755,root,root) %{_bindir}/mysqlbinlog
821 %attr(755,root,root) %{_bindir}/mysqladmin
822 %attr(755,root,root) %{_bindir}/mysqltest*
823 %{_mandir}/man1/mysql.1*
824 %{_mandir}/man1/mysqladmin.1*
825 %{_mandir}/man1/mysqldump.1*
826 %{_mandir}/man1/mysqlshow.1*
827 %{_mandir}/man1/mysqlmanager.1*
828 %{_mandir}/man1/mysqlbinlog.1*
829 %{_mandir}/man1/mysqlimport.1*
830 %{_mandir}/man8/mysqlmanager.8*
831
832 %files libs
833 %defattr(644,root,root,755)
834 %doc EXCEPTIONS-CLIENT
835 %attr(755,root,root) %{_libdir}/lib*.so.*.*
836 %attr(751,root,root) %dir %{_sysconfdir}/mysql
837 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mysql/mysql-client.conf
838
839 %files devel
840 %defattr(644,root,root,755)
841 %attr(755,root,root) %{_bindir}/mysql_config
842 %attr(755,root,root) %{_libdir}/lib*.so
843 %attr(755,root,root) %{_bindir}/*comp_err
844 %{?debug:%attr(755,root,root) %{_bindir}/*resolve_stack_dump}
845 %{?debug:%{_datadir}/mysql/mysqld.sym}
846 %{_libdir}/lib*.la
847 %{_libdir}/lib*[!tr].a
848 %{_includedir}/mysql
849 %{_mandir}/man1/mysql_config.1*
850
851 %files static
852 %defattr(644,root,root,755)
853 %{_libdir}/lib*[tr].a
854
855 %files bench
856 %defattr(644,root,root,755)
857 %attr(755,root,root) %{_bindir}/mysqltest
858 %attr(755,root,root) %{_bindir}/mysql_client_test
859 %dir %{_datadir}/sql-bench
860 %{_datadir}/sql-bench/[CDRl]*
861 %attr(755,root,root) %{_datadir}/sql-bench/[bcgirst]*
862 # wrong dir?
863 %{_datadir}/mysql/mi_test_all.res
864 %attr(755,root,root) %{_datadir}/mysql/mi_test_all
865
866 #%files doc
867 #%defattr(644,root,root,755)
868 #%doc Docs/manual.html Docs/manual_toc.html
869
870 %files ndb
871 %defattr(644,root,root,755)
872 %attr(755,root,root) %{_sbindir}/ndbd
873 %attr(754,root,root) /etc/rc.d/init.d/mysql-ndb
874 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mysql-ndb
875
876 %files ndb-client
877 %defattr(644,root,root,755)
878 %attr(755,root,root) %{_bindir}/ndb_*
879 %attr(755,root,root) %{_datadir}/mysql/ndb_size.tmpl
880
881 %files ndb-mgm
882 %defattr(644,root,root,755)
883 %attr(755,root,root) %{_sbindir}/ndb_mgmd
884 %attr(754,root,root) /etc/rc.d/init.d/mysql-ndb-mgm
885 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mysql-ndb-mgm
886
887 %files ndb-cpc
888 %defattr(644,root,root,755)
889 %attr(755,root,root) %{_sbindir}/ndb_cpcd
890 %attr(754,root,root) /etc/rc.d/init.d/mysql-ndb-cpc
891 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mysql-ndb-cpc
This page took 0.0864780000000001 seconds and 4 git commands to generate.