1 # _with_innodb - with InnoDB backend
2 # _with_bdb - with Berkeley DB backend
3 %include /usr/lib/rpm/macros.perl
4 Summary: MySQL: a very fast and reliable SQL database engine
5 Summary(fr): MySQL: un serveur SQL rapide et fiable
6 Summary(pl): MySQL: bardzo szybka i niezawodna baza danych (SQL)
7 Summary(pt_BR): MySQL: Um servidor SQL r
\e.A
\eNapido e confi
\eNavel.
\e*B
8 Summary(ru): MySQL -- ÂÙÓÔÒÙÊ SQL-ÓÅÒ×ÅÒ
9 Summary(uk): MySQL -- Û×ÉÄËÉÊ SQL-ÓÅÒ×ÅÒ
10 Summary(zh_CN): MySQLÊý¾Ý¿â·þÎñÆ÷
12 Group: Applications/Databases
16 Source0: http://prdownloads.sourceforge.net/mysql/%{name}-%{version}.tar.gz
18 Source2: %{name}.sysconfig
19 Source3: %{name}.logrotate
20 Source4: %{name}d.conf
21 Patch0: %{name}-info.patch
22 Patch1: %{name}-no_libnsl.patch
23 Patch2: %{name}-opt.patch
24 Patch3: %{name}-moreincludes.patch
25 Patch4: %{name}-amfix.patch
26 Patch5: %{name}-acfix.patch
27 Patch6: %{name}-am15.patch
28 Patch7: %{name}-c++.patch
29 Patch8: %{name}-noproc.patch
31 URL: http://www.mysql.com/
32 Requires: %{name}-libs = %{version}
33 BuildRequires: autoconf
34 BuildRequires: automake
35 BuildRequires: libstdc++-devel
36 BuildRequires: libtool
37 BuildRequires: ncurses-devel >= 4.2
38 BuildRequires: perl-DBI
39 BuildRequires: perl-devel >= 5.6.1
40 BuildRequires: readline-devel >= 4.2
41 BuildRequires: rpm-perlprov
42 BuildRequires: texinfo
43 BuildRequires: zlib-devel
44 Prereq: rc-scripts >= 0.2.0
46 Prereq: /sbin/chkconfig
47 Provides: msqlormysql MySQL-server
48 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
50 Obsoletes: mysql-server
52 %define _libexecdir %{_sbindir}
53 %define _localstatedir /var/lib/mysql
54 %define _gcc_ver %(%{__cc} -dumpversion | cut -b 1)
56 %define __cxx "%{__cc}"
60 MySQL is a true multi-user, multi-threaded SQL (Structured Query
61 Language) database server. SQL is the most popular database language
62 in the world. MySQL is a client/server implementation that consists of
63 a server daemon mysqld and many different client programs/libraries.
65 The main goals of MySQL are speed, robustness and easy to use. MySQL
66 was originally developed because we at Tcx needed a SQL server that
67 could handle very big databases with magnitude higher speed than what
68 any database vendor could offer to us. We have now been using MySQL
69 since 1996 in a environment with more than 40 databases, 10,000
70 tables, of which more than 500 have more than 7 million rows. This is
71 about 50G of mission critical data.
73 The base upon which MySQL is built is a set of routines that have been
74 used in a highly demanding production environment for many years.
75 While MySQL is still in development, it already offers a rich and
76 highly useful function set.
79 MySQL est un serveur de bases de donnees SQL vraiment multi-usagers et
80 multi-taches. Le langage SQL est le langage de bases de donnees le
81 plus populaire au monde. MySQL est une implementation client/serveur
82 qui consiste en un serveur (mysqld) et differents
83 programmes/bibliotheques clientes.
85 Les objectifs principaux de MySQL sont: vitesse, robustesse et
86 facilite d'utilisation. MySQL fut originalement developpe parce que
87 nous, chez Tcx, avions besoin d'un serveur SQL qui pouvait gerer de
88 tres grandes bases de donnees avec une vitesse d'un ordre de magnitude
89 superieur a ce que n'importe quel vendeur pouvait nous offrir. Nous
90 utilisons MySQL depuis 1996 dans un environnement avec plus de 40
91 bases de donnees, 10000 tables, desquelles plus de 500 ont plus de 7
92 millions de lignes. Ceci represente environ 50G de donnees critiques.
94 A la base de la conception de MySQL, on retrouve une serie de routines
95 qui ont ete utilisees dans un environnement de production pendant
96 plusieurs annees. Meme si MySQL est encore en developpement, il offre
97 deja une riche et utile serie de fonctions.
100 MySQL to wielow±tkowy serwer baz danych SQL.
102 G³ówne zalety MySQL to szybko¶æ, potêga i ³atwo¶æ u¿ytkowania. MySQL
103 jest wykorzystywany m.in. do obs³ugi 40 baz danych, 10 000 tabeli,
104 gdzie ka¿da tabela zawiera 7 milionów pozycji. To ok 50GB danych.
106 %description -l pt_BR
107 O MySQL é um servidor de banco de dados SQL realmente multiusuário e
108 multi-tarefa. A linguagem SQL é a mais popular linguagem para banco de
109 dados no mundo. O MySQL é uma implementação cliente/servidor que
110 consiste de um servidor chamado mysqld e diversos
111 programas/bibliotecas clientes. Os principais objetivos do MySQL são:
112 velocidade, robustez e facilidade de uso. O MySQL foi originalmente
113 desenvolvido porque nós na Tcx precisávamos de um servidor SQL que
114 pudesse lidar com grandes bases de dados e com uma velocidade muito
115 maior do que a que qualquer vendedor podia nos oferecer. Estamos
116 usando o MySQL desde 1996 em um ambiente com mais de 40 bases de dados
117 com 10.000 tabelas, das quais mais de 500 têm mais de 7 milhões de
118 linhas. Isto é o equivalente a aproximadamente 50G de dados críticos.
119 A base da construção do MySQL é uma série de rotinas que foram usadas
120 em um ambiente de produção com alta demanda por muitos anos. Mesmo o
121 MySQL estando ainda em desenvolvimento, ele já oferece um conjunto de
122 funções muito ricas e úteis. Veja a documentação para maiores
126 MySQL - ÜÔÏ SQL (Structured Query Language) ÓÅÒ×ÅÒ ÂÁÚÙ ÄÁÎÎÙÈ. MySQL
127 ÂÙÌÁ ÎÁÐÉÓÁÎÁ Michael'ÏÍ (monty) Widenius'ÏÍ. óÍ. ÆÁÊÌ CREDITS ×
128 ÄÉÓÔÒÉÂÕÔÉ×Å ÎÁ ÐÒÅÄÍÅÔ ÄÒÕÇÉÈ ÕÞÁÓÔÎÉËÏ× ÐÒÏÅËÔÁ É ÐÒÏÞÅÊ ÉÎÆÏÒÍÁÃÉÉ
132 MySQL - ÃÅ SQL (Structured Query Language) ÓÅÒ×ÅÒ ÂÁÚÉ ÄÁÎÉÈ. MySQL
133 ÂÕÌÏ ÎÁÐÉÓÁÎÏ Michael'ÏÍ (monty) Widenius'ÏÍ. äÉ×. ÆÁÊÌ CREDITS ×
134 ÄÉÓÔÒÉÂÕÔÉצ ÄÌÑ ¦ÎÆÏÒÍÁæ§ ÐÒÏ ¦ÎÛÉÈ ÕÞÁÓÎÉË¦× ÐÒÏÅËÔÕ ÔÁ ¦ÎÛϧ
138 Summary: MySQL additional utilities
139 Summary(pl): Dodatkowe narzêdzia do MySQL
140 Group: Applications/Databases
141 Requires: %{name}-libs = %{version}
144 MySQL additional utilities except Perl scripts (they may be found in
145 %{name}-extras-perl package)
147 %description extras -l pl
148 Dodatkowe narzêdzia do MySQL - z wyj±tkiem skryptów Perla (które s± w
149 pakiecie %{name}-extras-perl).
152 Summary: MySQL additional utilities written in Perl
153 Summary(pl): Dodatkowe narzêdzia do MySQL napisane w Perlu
154 Group: Applications/Databases
155 Requires: %{name}-extras = %{version}
156 Requires: perl(DBD::mysql)
158 %define _noautoreqdep "perl(DBD::mysql)"
160 %description extras-perl
161 MySQL additional utilities written in Perl.
163 %description extras-perl -l pl
164 Dodatkowe narzêdzia do MySQL napisane w Perlu.
167 Summary: MySQL - Client
168 Summary(pl): MySQL - Klient
169 Summary(pt): MySQL - Cliente
170 Summary(ru): MySQL ËÌÉÅÎÔ
171 Summary(uk): MySQL Ë̦¤ÎÔ
172 Group: Applications/Databases
173 Requires: %{name}-libs = %{version}
174 Obsoletes: MySQL-client
177 This package contains the standard MySQL clients.
179 %description client -l fr
180 Ce package contient les clients MySQL standards.
182 %description client -l pl
183 Standardowe programy klienckie MySQL.
185 %description client -l pt_BR
186 Este pacote contém os clientes padrão para o MySQL.
188 %description client -l ru
189 üÔÏÔ ÐÁËÅÔ ÓÏÄÅÒÖÉÔ ÔÏÌØËÏ ËÌÉÅÎÔ MySQL.
191 %description client -l uk
192 ãÅÊ ÐÁËÅÔ Í¦ÓÔÉÔØ Ô¦ÌØËÉ Ë̦¤ÎÔÁ MySQL.
195 Summary: Shared libraries for MySQL
196 Summary(pl): Biblioteki dzielone MySQL
197 Group: Applications/Databases
198 Obsoletes: libmysql10
201 Shared libraries for MySQL.
203 %description libs -l pl
204 Biblioteki dzielone MySQL.
207 Summary: MySQL - Development header files and libraries
208 Summary(pl): MySQL - Pliki nag³ówkowe i biblioteki dla programistów
209 Summary(pt): MySQL - Medições de desempenho
210 Summary(ru): MySQL - ÈÅÄÅÒÙ É ÂÉÂÌÉÏÔÅËÉ ÒÁÚÒÁÂÏÔÞÉËÁ
211 Summary(uk): MySQL - ÈÅÄÅÒÉ ÔÁ ¦Â̦ÏÔÅËÉ ÐÒÏÇÒÁͦÓÔÁ
212 Group: Development/Libraries
213 Requires: %{name}-libs = %{version}
214 Obsoletes: MySQL-devel
215 Obsoletes: libmysql10-devel
218 This package contains the development header files and libraries
219 necessary to develop MySQL client applications.
221 %description devel -l fr
222 Ce package contient les fichiers entetes et les librairies de
223 developpement necessaires pour developper des applications clientes
226 %description devel -l pl
227 Pliki nag³ówkowe i biblioteki konieczne do kompilacji aplikacji
230 %description devel -l pt_BR
231 Este pacote contém os arquivos de cabeçalho (header files) e
232 bibliotecas necessárias para desenvolver aplicações clientes do MySQL.
234 %description devel -l ru
235 üÔÏÔ ÐÁËÅÔ ÓÏÄÅÒÖÉÔ ÈÅÄÅÒÙ É ÂÉÂÌÉÏÔÅËÉ ÒÁÚÒÁÂÏÔÞÉËÁ, ÎÅÏÂÈÏÄÉÍÙÅ ÄÌÑ
236 ÒÁÚÒÁÂÏÔËÉ ËÌÉÅÎÔÓËÉÈ ÐÒÉÌÏÖÅÎÉÊ.
238 %description devel -l uk
239 ãÅÊ ÐÁËÅÔ Í¦ÓÔÉÔØ ÈÅÄÅÒÉ ÔÁ ¦Â̦ÏÔÅËÉ ÐÒÏÇÒÁͦÓÔÁ, ÎÅÏÂȦÄΦ ÄÌÑ
240 ÒÏÚÒÏÂËÉ ÐÒÏÇÒÁÍ-Ë̦¤ÎÔ¦×.
243 Summary: MySQL staic libraris
244 Summary(pl): Biblioteki statyczne MySQL
245 Summary(ru): MySQL - ÓÔÁÔÉÞÅÓËÉÅ ÂÉÂÌÉÏÔÅËÉ
246 Summary(uk): MySQL - ÓÔÁÔÉÞΦ ¦Â̦ÏÔÅËÉ
247 Group: Development/Libraries
248 Requires: %{name}-devel = %{version}
249 Obsoletes: MySQL-static
252 MySQL static libraris.
254 %description static -l pl
255 Biblioteki statyczne MySQL.
257 %description static -l ru
258 üÔÏÔ ÐÁËÅÔ ÓÏÄÅÒÖÉÔ ÓÔÁÔÉÞÅÓËÉÅ ÂÉÂÌÉÏÔÅËÉ ÒÁÚÒÁÂÏÔÞÉËÁ, ÎÅÏÂÈÏÄÉÍÙÅ
259 ÄÌÑ ÒÁÚÒÁÂÏÔËÉ ËÌÉÅÎÔÓËÉÈ ÐÒÉÌÏÖÅÎÉÊ.
261 %description static -l uk
262 ãÅÊ ÐÁËÅÔ Í¦ÓÔÉÔØ ÓÔÁÔÉÞΦ ¦Â̦ÏÔÅËÉ ÐÒÏÇÒÁͦÓÔÁ, ÎÅÏÂȦÄΦ ÄÌÑ
263 ÒÏÚÒÏÂËÉ ÐÒÏÇÒÁÍ-Ë̦¤ÎÔ¦×.
266 Summary: MySQL - Benchmarks
267 Summary(pl): MySQL - Programy testuj±ce szybko¶æ dzia³ania bazy
268 Summary(pt): MySQL - Medições de desempenho
269 Summary(ru): MySQL - ÂÅÎÞÍÁÒËÉ
270 Summary(uk): MySQL - ÂÅÎÞÍÁÒËÉ
271 Group: Applications/Databases
272 Requires: %{name} = %{version}
273 Requires: %{name}-client
274 Obsoletes: MySQL-bench
277 This package contains MySQL benchmark scripts and data.
279 %description bench -l pl
280 Programy testuj±ce szybko¶æ serwera MySQL.
282 %description bench -l pt_BR
283 Este pacote contém medições de desempenho de scripts e dados do MySQL.
285 %description bench -l ru
286 üÔÏÔ ÐÁËÅÔ ÓÏÄÅÒÖÉÔ ÓËÒÉÐÔÙ É ÄÁÎÎÙÅ ÄÌÑ ÏÃÅÎËÉ ÐÒÏÉÚ×ÏÄÉÔÅÌØÎÏÓÔÉ
289 %description bench -l uk
290 ãÅÊ ÐÁËÅÔ Í¦ÓÔÉÔØ ÓËÒÉÐÔÉ ÔÁ ÄÁΦ ÄÌÑ ÏæÎËÉ ÐÒÏÄÕËÔÉ×ÎÏÓÔ¦ MySQL.
293 %setup -q -n %{name}-%{version}
310 CXXFLAGS="%{rpmcflags} -fno-rtti -fno-exceptions -fomit-frame-pointer"
311 CFLAGS="%{rpmcflags} -fomit-frame-pointer"
314 %{!?debug:--without-debug} \
315 %{?_with_innodb:--with-innodb} \
316 %{?_with_bdb:--with-berkeley-db} \
322 --with-named-curses-libs="-lncurses" \
325 --with-extra-charsets=all \
326 --with-mysqld-user=mysql \
327 --with-unix-socket-path=/var/lib/mysql/mysql.sock \
331 --with-comment="PLD Linux Distribution MySQL RPM"
333 %{__make} benchdir=$RPM_BUILD_ROOT%{_datadir}/sql-bench
334 %{__make} -C Docs mysql.info
337 rm -rf $RPM_BUILD_ROOT
338 install -d $RPM_BUILD_ROOT/etc/{logrotate.d,rc.d/init.d,sysconfig} \
339 $RPM_BUILD_ROOT/var/{log/{archiv,}/mysql,lib/mysql/db} \
340 $RPM_BUILD_ROOT%{_infodir}
342 %if %{?_with_innodb:1}%{!?_with_innodb:0}
343 install -d $RPM_BUILD_ROOT/var/lib/mysql/innodb/{data,log}
346 %if %{?_with_bdb:1}%{!?_with_bdb:0}
347 install -d $RPM_BUILD_ROOT/var/lib/mysql/bdb/{log,tmp}
351 %{__make} install DESTDIR=$RPM_BUILD_ROOT benchdir=%{_datadir}/sql-bench
352 install Docs/mysql.info $RPM_BUILD_ROOT%{_infodir}
354 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql
355 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/mysql
356 install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/mysql
357 install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/mysqld.conf
358 touch $RPM_BUILD_ROOT/var/log/mysql/{err,log,update,isamlog}
360 # remove mysqld's *.po files
361 find . $RPM_BUILD_ROOT%{_datadir}/%{name} -name \*.txt | xargs -n 100 rm -f
362 mv -f $RPM_BUILD_ROOT%{_libdir}/mysql/lib* $RPM_BUILD_ROOT%{_libdir}
363 perl -pi -e 's,%{_libdir}/mysql,%{_libdir},;' $RPM_BUILD_ROOT%{_libdir}/libmysqlclient.la
366 rm -rf $RPM_BUILD_ROOT
369 if [ -n "`getgid mysql`" ]; then
370 if [ "`getgid mysql`" != "89" ]; then
371 echo "Warning: group mysql haven't gid=89. Correct this before installing mysql" 1>&2
375 /usr/sbin/groupadd -g 89 -r -f mysql
377 if [ -n "`id -u mysql 2>/dev/null`" ]; then
378 if [ "`id -u mysql`" != "89" ]; then
379 echo "Warning: user mysql haven't uid=89. Correct this before installing mysql" 1>&2
383 /usr/sbin/useradd -u 89 -r -d /var/lib/mysql -s /bin/false -c "MySQL User" -g mysql mysql 1>&2
387 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
388 /sbin/chkconfig --add mysql
389 if [ -f /var/lock/subsys/mysql ]; then
390 /etc/rc.d/init.d/mysql restart >&2
392 echo "Run \"/etc/rc.d/init.d/mysql start\" to start mysql." >&2
396 if [ "$1" = "0" ]; then
397 if [ -f /var/lock/subsys/mysql ]; then
398 /etc/rc.d/init.d/mysql stop
400 /sbin/chkconfig --del mysql
404 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
405 if [ "$1" = "0" ]; then
406 /usr/sbin/userdel mysql
407 /usr/sbin/groupdel mysql
410 %post libs -p /sbin/ldconfig
411 %postun libs -p /sbin/ldconfig
414 %defattr(644,root,root,755)
415 %attr(640,root,root) %config(noreplace) %verify(not md5 size mtime) /etc/logrotate.d/mysql
416 %attr(754,root,root) /etc/rc.d/init.d/mysql
417 %attr(640,root,root) %config(noreplace) %verify(not md5 size mtime) /etc/sysconfig/mysql
418 %attr(640,root,root) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/mysqld.conf
419 %attr(755,root,root) %{_bindir}/isamchk
420 %attr(755,root,root) %{_bindir}/isamlog
421 %attr(755,root,root) %{_bindir}/myisamchk
422 %attr(755,root,root) %{_bindir}/myisamlog
423 %attr(755,root,root) %{_bindir}/myisampack
424 %attr(755,root,root) %{_bindir}/pack_isam
425 %attr(755,root,root) %{_sbindir}/mysqld
427 %attr(751,mysql,mysql) /var/lib/mysql
428 %attr(750,mysql,mysql) %dir /var/log/mysql
429 %attr(750,mysql,mysql) %dir /var/log/archiv/mysql
430 %attr(640,mysql,mysql) %config(noreplace) %verify(not md5 size mtime) /var/log/mysql/*
432 %{_infodir}/mysql.info*
433 %dir %{_datadir}/mysql
434 %{_datadir}/mysql/charsets
435 %{_datadir}/mysql/english
436 %lang(cs) %{_datadir}/mysql/czech
437 %lang(da) %{_datadir}/mysql/danish
438 %lang(nl) %{_datadir}/mysql/dutch
439 %lang(et) %{_datadir}/mysql/estonian
440 %lang(fr) %{_datadir}/mysql/french
441 %lang(de) %{_datadir}/mysql/german
442 %lang(el) %{_datadir}/mysql/greek
443 %lang(hu) %{_datadir}/mysql/hungarian
444 %lang(it) %{_datadir}/mysql/italian
445 %lang(ja) %{_datadir}/mysql/japanese
446 %lang(ko) %{_datadir}/mysql/korean
447 %lang(no) %{_datadir}/mysql/norwegian
448 %lang(nn) %{_datadir}/mysql/norwegian-ny
449 %lang(pl) %{_datadir}/mysql/polish
450 %lang(pt) %{_datadir}/mysql/portuguese
451 %lang(ro) %{_datadir}/mysql/romanian
452 %lang(ru) %{_datadir}/mysql/russian
453 %lang(sk) %{_datadir}/mysql/slovak
454 %lang(es) %{_datadir}/mysql/spanish
455 %lang(sv) %{_datadir}/mysql/swedish
458 %defattr(644,root,root,755)
459 %attr(755,root,root) %{_bindir}/msql2mysql
460 %attr(755,root,root) %{_bindir}/mysql_config
461 %attr(755,root,root) %{_bindir}/mysql_fix_privilege_tables
462 %attr(755,root,root) %{_bindir}/perror
463 %attr(755,root,root) %{_bindir}/my_print_defaults
464 %attr(755,root,root) %{_bindir}/replace
465 %attr(755,root,root) %{_bindir}/resolveip
468 %defattr(644,root,root,755)
469 %attr(755,root,root) %{_bindir}/mysql_convert_table_format
470 %attr(755,root,root) %{_bindir}/mysqldumpslow
471 %attr(755,root,root) %{_bindir}/mysqlhotcopy
472 %attr(755,root,root) %{_bindir}/mysql_setpermission
473 %attr(755,root,root) %{_bindir}/mysql_zap
474 %attr(755,root,root) %{_bindir}/mysql_find_rows
475 %attr(755,root,root) %{_bindir}/mysqlaccess
478 %defattr(644,root,root,755)
479 %attr(755,root,root) %{_bindir}/mysql
480 %attr(755,root,root) %{_bindir}/mysqldump
481 %attr(755,root,root) %{_bindir}/mysqlimport
482 %attr(755,root,root) %{_bindir}/mysqlshow
483 %attr(755,root,root) %{_bindir}/mysqlbinlog
484 %attr(755,root,root) %{_bindir}/mysqladmin
485 %{_mandir}/man1/mysql.1*
488 %defattr(644,root,root,755)
489 %attr(755,root,root) %{_libdir}/lib*.so.*.*
490 %attr(755,root,root) %{_bindir}/mysqlbug
493 %defattr(644,root,root,755)
494 %attr(755,root,root) %{_libdir}/lib*.la
495 %attr(755,root,root) %{_libdir}/lib*.so
496 %{_libdir}/lib*[^t].a
500 %defattr(644,root,root,755)
504 %defattr(644,root,root,755)
505 %dir %{_datadir}/sql-bench
506 %{_datadir}/sql-bench/[CDRl]*
507 %attr(755,root,root) %{_datadir}/sql-bench/[bcgrst]*