1 %include /usr/lib/rpm/macros.perl
2 %define __find_requires %{_builddir}/mysql-%{version}/find-perl-requires
3 Summary: MySQL: a very fast and reliable SQL database engine
4 Summary(fr): MySQL: un serveur SQL rapide et fiable
5 Summary(pl): MySQL: bardzo szybka i niezawodna baza danych (SQL)
6 Summary(pt): MySQL: Um servidor SQL rápido e confiável
8 Group: Applications/Databases
9 Group(pl): Aplikacje/Bazy Danych
10 Group(pt): Aplicações/Banco_de_Dados
13 License: MySQL FREE PUBLIC LICENSE (See the manual)
14 Source0: http://www.mysql.com/Downloads/MySQL-3.22/%{name}-%{version}.tar.gz
16 Source2: mysql.sysconfig
17 Source3: mysql.logrotate
19 Patch0: mysql-info.patch
20 Patch1: mysql-no_libbind.patch
21 Patch2: mysql-perldep.patch
23 URL: http://www.mysql.com/
24 Requires: %{name}-libs = %{version}
25 BuildRequires: libstdc++-devel
26 BuildRequires: zlib-devel
27 BuildRequires: ncurses-devel
28 BuildRequires: readline-devel
29 BuildRequires: texinfo
30 BuildRequires: rpm-perlprov
31 Requires: rc-scripts >= 0.2.0
33 Provides: msqlormysql MySQL-server
35 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37 %define _libexecdir %{_sbindir}
38 %define _localstatedir /var/lib/mysql
41 MySQL is a true multi-user, multi-threaded SQL (Structured Query
42 Language) database server. SQL is the most popular database language
43 in the world. MySQL is a client/server implementation that consists of
44 a server daemon mysqld and many different client programs/libraries.
46 The main goals of MySQL are speed, robustness and easy to use. MySQL
47 was originally developed because we at Tcx needed a SQL server that
48 could handle very big databases with magnitude higher speed than what
49 any database vendor could offer to us. We have now been using MySQL
50 since 1996 in a environment with more than 40 databases, 10,000
51 tables, of which more than 500 have more than 7 million rows. This is
52 about 50G of mission critical data.
54 The base upon which MySQL is built is a set of routines that have been
55 used in a highly demanding production environment for many years.
56 While MySQL is still in development, it already offers a rich and
57 highly useful function set.
60 MySQL est un serveur de bases de donnees SQL vraiment multi-usagers et
61 multi-taches. Le langage SQL est le langage de bases de donnees le
62 plus populaire au monde. MySQL est une implementation client/serveur
63 qui consiste en un serveur (mysqld) et differents
64 programmes/bibliotheques clientes.
66 Les objectifs principaux de MySQL sont: vitesse, robustesse et
67 facilite d'utilisation. MySQL fut originalement developpe parce que
68 nous, chez Tcx, avions besoin d'un serveur SQL qui pouvait gerer de
69 tres grandes bases de donnees avec une vitesse d'un ordre de magnitude
70 superieur a ce que n'importe quel vendeur pouvait nous offrir. Nous
71 utilisons MySQL depuis 1996 dans un environnement avec plus de 40
72 bases de donnees, 10000 tables, desquelles plus de 500 ont plus de 7
73 millions de lignes. Ceci represente environ 50G de donnees critiques.
75 A la base de la conception de MySQL, on retrouve une serie de routines
76 qui ont ete utilisees dans un environnement de production pendant
77 plusieurs annees. Meme si MySQL est encore en developpement, il offre
78 deja une riche et utile serie de fonctions.
81 MySQL to wielow±tkowy serwer baz danych SQL.
83 G³ówne zalety MySQL to szybko¶æ, potêga i ³atwo¶æ u¿ytkowania. MySQL
84 jest wykorzystywany m.in. do obs³ugi 40 baz danych, 10 000 tabeli,
85 gdzie ka¿da tabela zawiera 7 milionów pozycji. To ok 50GB danych.
88 O MySQL é um servidor de banco de dados SQL realmente multiusuário e
89 multi-tarefa. A linguagem SQL é a mais popular linguagem para banco de
90 dados no mundo. O MySQL é uma implementação cliente/servidor que
91 consiste de um servidor chamado mysqld e diversos
92 programas/bibliotecas clientes. Os principais objetivos do MySQL são:
93 velocidade, robustez e facilidade de uso. O MySQL foi originalmente
94 desenvolvido porque nós na Tcx precisávamos de um servidor SQL que
95 pudesse lidar com grandes bases de dados e com uma velocidade muito
96 maior do que a que qualquer vendedor podia nos oferecer. Estamos
97 usando o MySQL desde 1996 em um ambiente com mais de 40 bases de dados
98 com 10.000 tabelas, das quais mais de 500 têm mais de 7 milhões de
99 linhas. Isto é o equivalente a aproximadamente 50G de dados críticos.
100 A base da construção do MySQL é uma série de rotinas que foram usadas
101 em um ambiente de produção com alta demanda por muitos anos. Mesmo o
102 MySQL estando ainda em desenvolvimento, ele já oferece um conjunto de
103 funções muito ricas e úteis. Veja a documentação para maiores
107 Summary: MySQL additional utilities
108 Group: Applications/Databases
109 Group(pl): Aplikacje/Bazy Danych
110 Group(pt): Aplicações/Banco_de_Dados
111 Requires: %{name}-libs = %{version}
114 MySQL additional utilities except Perl scripts (they may be found in
115 %{name}-extras-perl package)
118 Summary: MySQL additional utilities written in Perl
119 Group: Applications/Databases
120 Group(pl): Aplikacje/Bazy Danych
121 Group(pt): Aplicações/Banco_de_Dados
122 Requires: %{name}-extras = %{version}
124 %description extras-perl
125 MySQL additional utilities written in Perl.
128 Summary: MySQL - Client
129 Summary(pl): MySQL - Klient
130 Summary(pt): MySQL - Cliente
131 Group: Applications/Databases
132 Group(pl): Aplikacje/Bazy Danych
133 Group(pt): Aplicações/Banco_de_Dados
134 Requires: %{name}-libs = %{version}
135 Obsoletes: MySQL-client
138 This package contains the standard MySQL clients.
140 %description -l fr client
141 Ce package contient les clients MySQL standards.
143 %description -l pl client
144 Standardowe programy klienckie MySQL.
146 %description -l pt_BR client
147 Este pacote contém os clientes padrão para o MySQL.
150 Summary: Shared libraries for MySQL
151 Group: Applications/Databases
154 Shared libraries for MySQL.
157 Summary: MySQL - Development header files and libraries
158 Summary(pl): MySQL - Pliki nag³ówkowe i biblioteki dla programistów
159 Summary(pt): MySQL - Medições de desempenho
160 Group: Development/Libraries
161 Group(fr): Development/Librairies
162 Group(pl): Programowanie/Biblioteki
163 Requires: %{name}-libs = %{version}
164 Obsoletes: MySQL-devel
167 This package contains the development header files and libraries
168 necessary to develop MySQL client applications.
170 %description -l pl devel
171 Pliki nag³ówkowe i biblioteki konieczne do kompilacji aplikacji
174 %description devel -l pt_BR
175 Este pacote contém os arquivos de cabeçalho (header files) e
176 bibliotecas necessárias para desenvolver aplicações clientes do MySQL.
178 %description -l fr devel
179 Ce package contient les fichiers entetes et les librairies de
180 developpement necessaires pour developper des applications clientes
184 Summary: MySQL staic libraris
185 Summary(pl): Biblioteki statyczne MySQL
186 Group: Development/Libraries
187 Group(fr): Development/Librairies
188 Group(pl): Programowanie/Biblioteki
189 Requires: %{name}-devel = %{version}
190 Obsoletes: MySQL-static
193 MySQL staic libraris.
195 %description -l pl static
196 Biblioteki statyczne MySQL.
199 Summary: MySQL - Benchmarks
200 Summary(pl): mySQL - Programy testuj±ce szybko¶æ dzia³ania bazy
201 Summary(pt): MySQL - Medições de desempenho
202 Group: Applications/Databases
203 Group(pl): Aplikacje/Bazy Danych
204 Group(pt): Aplicações/Banco_de_Dados
205 Requires: %{name} = %{version}
206 Requires: %{name}-client
207 Obsoletes: MySQL-bench
210 This package contains MySQL benchmark scripts and data.
212 %description -l pl bench
213 Programy testuj±ce szybko¶æ serwera MySQL.
215 %description -l pt_BR bench
216 Este pacote contém medições de desempenho de scripts e dados do MySQL.
224 chmod +x find-perl-requires
231 CXXFLAGS="$RPM_OPT_FLAGS -fno-rtti -fno-exceptions"
232 export LDFLAGS CXXFLAGS
238 --with-named-curses-libs="-lncurses" \
240 --with-charset=latin2 \
241 --with-mysqld-user=mysql \
242 --with-unix-socket-path=/var/lib/mysql/mysql.sock \
243 --with-comment='Polish Linux Distribution MySQL RPM' \
246 # If you have much RAM you can remove --with-low-memory
248 # To build mysqld as static binary add option
249 # --with-mysqld-ldflags='-all-static'
251 %{__make} benchdir=$RPM_BUILD_ROOT%{_datadir}/sql-bench
252 (cd Docs; make info manual.texi)
255 rm -rf $RPM_BUILD_ROOT
256 install -d $RPM_BUILD_ROOT%{_sysconfdir}/{logrotate.d,rc.d/init.d,sysconfig} \
257 $RPM_BUILD_ROOT/var/{log/mysql,lib/mysql}
260 %{__make} install DESTDIR=$RPM_BUILD_ROOT benchdir=%{_datadir}/sql-bench
262 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql
263 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/mysql
264 install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/mysql
265 install %{SOURCE4} $RPM_BUILD_ROOT/etc/mysqld.conf
266 touch $RPM_BUILD_ROOT/var/log/mysql/{err,log,update,isamlog}
268 find Docs -type f ! -name \*.gif ! -name \*.html -exec rm -f {} \;
269 find . -name ./CVS -exec rm -rf {} \;
270 # remove mysqld's *.po files
271 find . $RPM_BUILD_ROOT%{_datadir}/mysql -name \*.txt | xargs -n 100 rm -f
273 mv $RPM_BUILD_ROOT%{_libdir}/mysql/lib* $RPM_BUILD_ROOT%{_libdir}
274 strip --strip-unneeded $RPM_BUILD_ROOT%{_libdir}/lib*.so*.*
276 gzip -9nf $RPM_BUILD_ROOT{%{_mandir}/man1/*,%{_infodir}/mysql.info*}
279 if [ -n "`getgid mysql`" ]; then
280 if [ "`getgid mysql`" != "89" ]; then
281 echo "Warning:group mysql haven't gid=89. Corect this before install mysql" 1>&2
285 /usr/sbin/groupadd -g 89 -r -f mysql
286 if [ -f /var/db/group.db ]; then
287 /usr/bin/update-db 1>&2
290 if [ -n "`id -u mysql 2>/dev/null`" ]; then
291 if [ "`id -u mysql`" != "89" ]; then
292 echo "Warning:user mysql haven't uid=89. Corect this before install mysql" 1>&2
296 /usr/sbin/useradd -u 89 -r -d /var/lib/mysql -s /bin/false -c "MySQL User" -g mysql mysql 1>&2
297 if [ -f /var/db/passwd.db ]; then
298 /usr/bin/update-db 1>&2
303 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
304 /sbin/chkconfig --add mysql
305 if [ -f /var/lock/subsys/mysql ]; then
306 /etc/rc.d/init.d/mysql restart >&2
308 echo "Run \"/etc/rc.d/init.d/mysql start\" to start mysql." >&2
312 if [ "$1" = "0" ]; then
313 if [ -f /var/lock/subsys/mysql ]; then
314 /etc/rc.d/init.d/mysql stop
316 /sbin/chkconfig --del mysql
320 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
321 if [ "$1" = "0" ]; then
322 /usr/sbin/userdel mysql
323 if [ -f /var/db/passwd.db ]; then
326 /usr/sbin/groupdel mysql
327 if [ -f /var/db/group.db ]; then
332 %post libs -p /sbin/ldconfig
333 %postun libs -p /sbin/ldconfig
336 rm -rf $RPM_BUILD_ROOT
339 %defattr(644,root,root,755)
340 %attr(640,root,root) %config(noreplace) %verify(not md5 size mtime) /etc/logrotate.d/mysql
341 %attr(754,root,root) /etc/rc.d/init.d/mysql
342 %attr(640,root,root) %config(noreplace) %verify(not md5 size mtime) /etc/sysconfig/mysql
343 %attr(640,root,root) %config(noreplace) %verify(not md5 size mtime) /etc/mysqld.conf
344 %attr(755,root,root) %{_bindir}/isamchk
345 %attr(755,root,root) %{_bindir}/isamlog
346 %attr(755,root,root) %{_bindir}/mysqladmin
347 %attr(755,root,root) %{_bindir}/mysqlbug
348 %attr(755,root,root) %{_sbindir}/mysqld
350 %attr(751,mysql,mysql) %dir /var/lib/mysql
351 %attr(750,mysql,mysql) %dir /var/log/mysql
352 %attr(640,mysql,mysql) %config(noreplace) %verify(not md5 size mtime) /var/log/mysql/*
354 %{_infodir}/mysql.info*
355 %dir %{_datadir}/mysql
356 %{_datadir}/mysql/english
357 %lang(cs) %{_datadir}/mysql/czech
358 %lang(da) %{_datadir}/mysql/danish
359 %lang(nl) %{_datadir}/mysql/dutch
360 %lang(et) %{_datadir}/mysql/estonia
361 %lang(fr) %{_datadir}/mysql/french
362 %lang(de) %{_datadir}/mysql/german
363 %lang(el) %{_datadir}/mysql/greek
364 %lang(hu) %{_datadir}/mysql/hungarian
365 %lang(it) %{_datadir}/mysql/italian
366 %lang(ja) %{_datadir}/mysql/japanese
367 %lang(ko) %{_datadir}/mysql/korean
368 %lang(no) %{_datadir}/mysql/norwegian
369 %lang(no@nynorsk) %{_datadir}/mysql/norwegian-ny
370 %lang(pl) %{_datadir}/mysql/polish
371 %lang(pt) %{_datadir}/mysql/portuguese
372 %lang(ru) %{_datadir}/mysql/russian
373 %lang(sk) %{_datadir}/mysql/slovak
374 %lang(es) %{_datadir}/mysql/spanish
375 %lang(sv) %{_datadir}/mysql/swedish
378 %defattr(644,root,root,755)
379 %attr(755,root,root) %{_bindir}/msql2mysql
380 %attr(755,root,root) %{_bindir}/mysql_fix_privilege_tables
381 %attr(755,root,root) %{_bindir}/perror
382 %attr(755,root,root) %{_bindir}/print_defaults
383 %attr(755,root,root) %{_bindir}/replace
384 %attr(755,root,root) %{_bindir}/resolveip
387 %defattr(644,root,root,755)
388 %attr(755,root,root) %{_bindir}/mysql_setpermission
389 %attr(755,root,root) %{_bindir}/mysql_zap
390 %attr(755,root,root) %{_bindir}/mysql_find_rows
391 %attr(755,root,root) %{_bindir}/mysqlaccess
394 %defattr(644,root,root,755)
395 %attr(755,root,root) %{_bindir}/mysql
396 %attr(755,root,root) %{_bindir}/mysqlbug
397 %attr(755,root,root) %{_bindir}/mysqldump
398 %attr(755,root,root) %{_bindir}/mysqlimport
399 %attr(755,root,root) %{_bindir}/mysqlshow
400 %{_mandir}/man1/mysql.1*
403 %defattr(644,root,root,755)
404 %attr(755,root,root) %{_libdir}/lib*.so.*.*
407 %defattr(644,root,root,755)
408 %attr(755,root,root) %{_libdir}/lib*.la
409 %attr(755,root,root) %{_libdir}/lib*.so
413 %defattr(644,root,root,755)
417 %defattr(644,root,root,755)
418 %attr(-,root,root) %{_datadir}/sql-bench