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(zh_CN): MySQLÊý¾Ý¿â·þÎñÆ÷
10 Group: Applications/Databases
14 Source0: http://prdownloads.sourceforge.net/mysql/%{name}-%{version}.tar.gz
16 Source2: %{name}.sysconfig
17 Source3: %{name}.logrotate
18 Source4: %{name}d.conf
19 Patch0: %{name}-info.patch
20 Patch1: %{name}-no_libnsl.patch
21 Patch2: %{name}-opt.patch
22 Patch3: %{name}-moreincludes.patch
23 Patch4: %{name}-amfix.patch
24 Patch5: %{name}-acfix.patch
25 Patch6: %{name}-am15.patch
26 Patch7: %{name}-c++.patch
28 URL: http://www.mysql.com/
29 Requires: %{name}-libs = %{version}
30 BuildRequires: autoconf
31 BuildRequires: automake
32 BuildRequires: libstdc++-devel
33 BuildRequires: libtool
34 BuildRequires: ncurses-devel >= 4.2
35 BuildRequires: perl-DBI
36 BuildRequires: perl-devel >= 5.6.1
37 BuildRequires: readline-devel >= 4.2
38 BuildRequires: rpm-perlprov
39 BuildRequires: texinfo
40 BuildRequires: zlib-devel
41 Prereq: rc-scripts >= 0.2.0
43 Prereq: /sbin/chkconfig
44 Provides: msqlormysql MySQL-server
45 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47 Obsoletes: mysql-server
49 %define _libexecdir %{_sbindir}
50 %define _localstatedir /var/lib/mysql
53 MySQL is a true multi-user, multi-threaded SQL (Structured Query
54 Language) database server. SQL is the most popular database language
55 in the world. MySQL is a client/server implementation that consists of
56 a server daemon mysqld and many different client programs/libraries.
58 The main goals of MySQL are speed, robustness and easy to use. MySQL
59 was originally developed because we at Tcx needed a SQL server that
60 could handle very big databases with magnitude higher speed than what
61 any database vendor could offer to us. We have now been using MySQL
62 since 1996 in a environment with more than 40 databases, 10,000
63 tables, of which more than 500 have more than 7 million rows. This is
64 about 50G of mission critical data.
66 The base upon which MySQL is built is a set of routines that have been
67 used in a highly demanding production environment for many years.
68 While MySQL is still in development, it already offers a rich and
69 highly useful function set.
72 MySQL est un serveur de bases de donnees SQL vraiment multi-usagers et
73 multi-taches. Le langage SQL est le langage de bases de donnees le
74 plus populaire au monde. MySQL est une implementation client/serveur
75 qui consiste en un serveur (mysqld) et differents
76 programmes/bibliotheques clientes.
78 Les objectifs principaux de MySQL sont: vitesse, robustesse et
79 facilite d'utilisation. MySQL fut originalement developpe parce que
80 nous, chez Tcx, avions besoin d'un serveur SQL qui pouvait gerer de
81 tres grandes bases de donnees avec une vitesse d'un ordre de magnitude
82 superieur a ce que n'importe quel vendeur pouvait nous offrir. Nous
83 utilisons MySQL depuis 1996 dans un environnement avec plus de 40
84 bases de donnees, 10000 tables, desquelles plus de 500 ont plus de 7
85 millions de lignes. Ceci represente environ 50G de donnees critiques.
87 A la base de la conception de MySQL, on retrouve une serie de routines
88 qui ont ete utilisees dans un environnement de production pendant
89 plusieurs annees. Meme si MySQL est encore en developpement, il offre
90 deja une riche et utile serie de fonctions.
93 MySQL to wielow±tkowy serwer baz danych SQL.
95 G³ówne zalety MySQL to szybko¶æ, potêga i ³atwo¶æ u¿ytkowania. MySQL
96 jest wykorzystywany m.in. do obs³ugi 40 baz danych, 10 000 tabeli,
97 gdzie ka¿da tabela zawiera 7 milionów pozycji. To ok 50GB danych.
100 O MySQL é um servidor de banco de dados SQL realmente multiusuário e
101 multi-tarefa. A linguagem SQL é a mais popular linguagem para banco de
102 dados no mundo. O MySQL é uma implementação cliente/servidor que
103 consiste de um servidor chamado mysqld e diversos
104 programas/bibliotecas clientes. Os principais objetivos do MySQL são:
105 velocidade, robustez e facilidade de uso. O MySQL foi originalmente
106 desenvolvido porque nós na Tcx precisávamos de um servidor SQL que
107 pudesse lidar com grandes bases de dados e com uma velocidade muito
108 maior do que a que qualquer vendedor podia nos oferecer. Estamos
109 usando o MySQL desde 1996 em um ambiente com mais de 40 bases de dados
110 com 10.000 tabelas, das quais mais de 500 têm mais de 7 milhões de
111 linhas. Isto é o equivalente a aproximadamente 50G de dados críticos.
112 A base da construção do MySQL é uma série de rotinas que foram usadas
113 em um ambiente de produção com alta demanda por muitos anos. Mesmo o
114 MySQL estando ainda em desenvolvimento, ele já oferece um conjunto de
115 funções muito ricas e úteis. Veja a documentação para maiores
119 Summary: MySQL additional utilities
120 Summary(pl): Dodatkowe narzêdzia do MySQL
121 Group: Applications/Databases
122 Requires: %{name}-libs = %{version}
125 MySQL additional utilities except Perl scripts (they may be found in
126 %{name}-extras-perl package)
128 %description extras -l pl
129 Dodatkowe narzêdzia do MySQL - z wyj±tkiem skryptów Perla (które s± w
130 pakiecie %{name}-extras-perl).
133 Summary: MySQL additional utilities written in Perl
134 Summary(pl): Dodatkowe narzêdzia do MySQL napisane w Perlu
135 Group: Applications/Databases
136 Requires: %{name}-extras = %{version}
138 %description extras-perl
139 MySQL additional utilities written in Perl.
141 %description extras-perl -l pl
142 Dodatkowe narzêdzia do MySQL napisane w Perlu.
145 Summary: MySQL - Client
146 Summary(pl): MySQL - Klient
147 Summary(pt): MySQL - Cliente
148 Group: Applications/Databases
149 Requires: %{name}-libs = %{version}
150 Obsoletes: MySQL-client
153 This package contains the standard MySQL clients.
155 %description client -l fr
156 Ce package contient les clients MySQL standards.
158 %description client -l pl
159 Standardowe programy klienckie MySQL.
161 %description client -l pt_BR
162 Este pacote contém os clientes padrão para o MySQL.
165 Summary: Shared libraries for MySQL
166 Summary(pl): Biblioteki dzielone MySQL
167 Group: Applications/Databases
168 Obsoletes: libmysql10
171 Shared libraries for MySQL.
173 %description libs -l pl
174 Biblioteki dzielone MySQL.
177 Summary: MySQL - Development header files and libraries
178 Summary(pl): MySQL - Pliki nag³ówkowe i biblioteki dla programistów
179 Summary(pt): MySQL - Medições de desempenho
180 Group: Development/Libraries
181 Requires: %{name}-libs = %{version}
182 Obsoletes: MySQL-devel
183 Obsoletes: libmysql10-devel
186 This package contains the development header files and libraries
187 necessary to develop MySQL client applications.
189 %description devel -l pl
190 Pliki nag³ówkowe i biblioteki konieczne do kompilacji aplikacji
193 %description devel -l pt_BR
194 Este pacote contém os arquivos de cabeçalho (header files) e
195 bibliotecas necessárias para desenvolver aplicações clientes do MySQL.
197 %description devel -l fr
198 Ce package contient les fichiers entetes et les librairies de
199 developpement necessaires pour developper des applications clientes
203 Summary: MySQL staic libraris
204 Summary(pl): Biblioteki statyczne MySQL
205 Group: Development/Libraries
206 Requires: %{name}-devel = %{version}
207 Obsoletes: MySQL-static
210 MySQL static libraris.
212 %description static -l pl
213 Biblioteki statyczne MySQL.
216 Summary: MySQL - Benchmarks
217 Summary(pl): mySQL - Programy testuj±ce szybko¶æ dzia³ania bazy
218 Summary(pt): MySQL - Medições de desempenho
219 Group: Applications/Databases
220 Requires: %{name} = %{version}
221 Requires: %{name}-client
222 Obsoletes: MySQL-bench
225 This package contains MySQL benchmark scripts and data.
227 %description bench -l pl
228 Programy testuj±ce szybko¶æ serwera MySQL.
230 %description bench -l pt_BR
231 Este pacote contém medições de desempenho de scripts e dados do MySQL.
234 %setup -q -n %{name}-%{version}
246 libtoolize --copy --force
250 CXXFLAGS="%{rpmcflags} -fno-rtti -fno-exceptions -fomit-frame-pointer"
251 CFLAGS="%{rpmcflags} -fomit-frame-pointer"
254 %{!?debug:--without-debug} \
255 %{?_with_innodb:--with-innodb} \
256 %{?_with_bdb:--with-berkeley-db} \
262 --with-named-curses-libs="-lncurses" \
265 --with-extra-charsets=all \
266 --with-mysqld-user=mysql \
267 --with-unix-socket-path=/var/lib/mysql/mysql.sock \
271 --with-comment="Polish Linux Distribution MySQL RPM"
273 %{__make} benchdir=$RPM_BUILD_ROOT%{_datadir}/sql-bench
274 %{__make} -C Docs mysql.info
277 rm -rf $RPM_BUILD_ROOT
278 install -d $RPM_BUILD_ROOT/etc/{logrotate.d,rc.d/init.d,sysconfig} \
279 $RPM_BUILD_ROOT/var/{log/{archiv,}/mysql,lib/mysql/db} \
280 $RPM_BUILD_ROOT%{_infodir}
282 %if %{?_with_innodb:1}%{!?_with_innodb:0}
283 install -d $RPM_BUILD_ROOT/var/lib/mysql/innodb/{data,log}
286 %if %{?_with_bdb:1}%{!?_with_bdb:0}
287 install -d $RPM_BUILD_ROOT/var/lib/mysql/bdb/{log,tmp}
291 %{__make} install DESTDIR=$RPM_BUILD_ROOT benchdir=%{_datadir}/sql-bench
292 install Docs/mysql.info $RPM_BUILD_ROOT%{_infodir}
294 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql
295 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/mysql
296 install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/mysql
297 install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/mysqld.conf
298 touch $RPM_BUILD_ROOT/var/log/mysql/{err,log,update,isamlog}
300 # remove mysqld's *.po files
301 find . $RPM_BUILD_ROOT%{_datadir}/%{name} -name \*.txt | xargs -n 100 rm -f
302 mv -f $RPM_BUILD_ROOT%{_libdir}/mysql/lib* $RPM_BUILD_ROOT%{_libdir}
303 perl -pi -e 's,%{_libdir}/mysql,%{_libdir},;' $RPM_BUILD_ROOT%{_libdir}/libmysqlclient.la
306 rm -rf $RPM_BUILD_ROOT
309 if [ -n "`getgid mysql`" ]; then
310 if [ "`getgid mysql`" != "89" ]; then
311 echo "Warning: group mysql haven't gid=89. Correct this before installing mysql" 1>&2
315 /usr/sbin/groupadd -g 89 -r -f mysql
317 if [ -n "`id -u mysql 2>/dev/null`" ]; then
318 if [ "`id -u mysql`" != "89" ]; then
319 echo "Warning: user mysql haven't uid=89. Correct this before installing mysql" 1>&2
323 /usr/sbin/useradd -u 89 -r -d /var/lib/mysql -s /bin/false -c "MySQL User" -g mysql mysql 1>&2
327 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
328 /sbin/chkconfig --add mysql
329 if [ -f /var/lock/subsys/mysql ]; then
330 /etc/rc.d/init.d/mysql restart >&2
332 echo "Run \"/etc/rc.d/init.d/mysql start\" to start mysql." >&2
336 if [ "$1" = "0" ]; then
337 if [ -f /var/lock/subsys/mysql ]; then
338 /etc/rc.d/init.d/mysql stop
340 /sbin/chkconfig --del mysql
344 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
345 if [ "$1" = "0" ]; then
346 /usr/sbin/userdel mysql
347 /usr/sbin/groupdel mysql
350 %post libs -p /sbin/ldconfig
351 %postun libs -p /sbin/ldconfig
354 %defattr(644,root,root,755)
355 %attr(640,root,root) %config(noreplace) %verify(not md5 size mtime) /etc/logrotate.d/mysql
356 %attr(754,root,root) /etc/rc.d/init.d/mysql
357 %attr(640,root,root) %config(noreplace) %verify(not md5 size mtime) /etc/sysconfig/mysql
358 %attr(640,root,root) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/mysqld.conf
359 %attr(755,root,root) %{_bindir}/isamchk
360 %attr(755,root,root) %{_bindir}/isamlog
361 %attr(755,root,root) %{_bindir}/mysqladmin
362 %attr(755,root,root) %{_bindir}/mysqlbug
363 %attr(755,root,root) %{_bindir}/myisamchk
364 %attr(755,root,root) %{_bindir}/myisamlog
365 %attr(755,root,root) %{_bindir}/myisampack
366 %attr(755,root,root) %{_bindir}/pack_isam
367 %attr(755,root,root) %{_sbindir}/mysqld
369 %attr(751,mysql,mysql) /var/lib/mysql
370 %attr(750,mysql,mysql) %dir /var/log/mysql
371 %attr(750,mysql,mysql) %dir /var/log/archiv/mysql
372 %attr(640,mysql,mysql) %config(noreplace) %verify(not md5 size mtime) /var/log/mysql/*
374 %{_infodir}/mysql.info*
375 %dir %{_datadir}/mysql
376 %{_datadir}/mysql/charsets
377 %{_datadir}/mysql/english
378 %lang(cs) %{_datadir}/mysql/czech
379 %lang(da) %{_datadir}/mysql/danish
380 %lang(nl) %{_datadir}/mysql/dutch
381 %lang(et) %{_datadir}/mysql/estonian
382 %lang(fr) %{_datadir}/mysql/french
383 %lang(de) %{_datadir}/mysql/german
384 %lang(el) %{_datadir}/mysql/greek
385 %lang(hu) %{_datadir}/mysql/hungarian
386 %lang(it) %{_datadir}/mysql/italian
387 %lang(ja) %{_datadir}/mysql/japanese
388 %lang(ko) %{_datadir}/mysql/korean
389 %lang(no) %{_datadir}/mysql/norwegian
390 %lang(nn) %{_datadir}/mysql/norwegian-ny
391 %lang(pl) %{_datadir}/mysql/polish
392 %lang(pt) %{_datadir}/mysql/portuguese
393 %lang(ro) %{_datadir}/mysql/romanian
394 %lang(ru) %{_datadir}/mysql/russian
395 %lang(sk) %{_datadir}/mysql/slovak
396 %lang(es) %{_datadir}/mysql/spanish
397 %lang(sv) %{_datadir}/mysql/swedish
400 %defattr(644,root,root,755)
401 %attr(755,root,root) %{_bindir}/msql2mysql
402 %attr(755,root,root) %{_bindir}/mysql_config
403 %attr(755,root,root) %{_bindir}/mysql_fix_privilege_tables
404 %attr(755,root,root) %{_bindir}/perror
405 %attr(755,root,root) %{_bindir}/my_print_defaults
406 %attr(755,root,root) %{_bindir}/replace
407 %attr(755,root,root) %{_bindir}/resolveip
410 %defattr(644,root,root,755)
411 %attr(755,root,root) %{_bindir}/mysql_convert_table_format
412 %attr(755,root,root) %{_bindir}/mysqldumpslow
413 %attr(755,root,root) %{_bindir}/mysqlhotcopy
414 %attr(755,root,root) %{_bindir}/mysql_setpermission
415 %attr(755,root,root) %{_bindir}/mysql_zap
416 %attr(755,root,root) %{_bindir}/mysql_find_rows
417 %attr(755,root,root) %{_bindir}/mysqlaccess
420 %defattr(644,root,root,755)
421 %attr(755,root,root) %{_bindir}/mysql
422 %attr(755,root,root) %{_bindir}/mysqlbug
423 %attr(755,root,root) %{_bindir}/mysqldump
424 %attr(755,root,root) %{_bindir}/mysqlimport
425 %attr(755,root,root) %{_bindir}/mysqlshow
426 %attr(755,root,root) %{_bindir}/mysqlbinlog
427 %{_mandir}/man1/mysql.1*
430 %defattr(644,root,root,755)
431 %attr(755,root,root) %{_libdir}/lib*.so.*.*
434 %defattr(644,root,root,755)
435 %attr(755,root,root) %{_libdir}/lib*.la
436 %attr(755,root,root) %{_libdir}/lib*.so
440 %defattr(644,root,root,755)
444 %defattr(644,root,root,755)
445 %dir %{_datadir}/sql-bench
446 %{_datadir}/sql-bench/[CDRl]*
447 %attr(755,root,root) %{_datadir}/sql-bench/[bcgrst]*