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