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
117 Summary: MySQL - Client
118 Summary(pl): MySQL - Klient
119 Summary(pt): MySQL - Cliente
120 Group: Applications/Databases
121 Group(pl): Aplikacje/Bazy Danych
122 Group(pt): Aplicações/Banco_de_Dados
123 Requires: %{name}-libs = %{version}
124 Obsoletes: MySQL-client
127 This package contains the standard MySQL clients.
129 %description -l fr client
130 Ce package contient les clients MySQL standards.
132 %description -l pl client
133 Standardowe programy klienckie MySQL.
135 %description -l pt_BR client
136 Este pacote contém os clientes padrão para o MySQL.
139 Summary: Shared libraries for MySQL
140 Group: Applications/Databases
143 Shared libraries for MySQL.
146 Summary: MySQL - Development header files and libraries
147 Summary(pl): MySQL - Pliki nag³ówkowe i biblioteki dla programistów
148 Summary(pt): MySQL - Medições de desempenho
149 Group: Development/Libraries
150 Group(fr): Development/Librairies
151 Group(pl): Programowanie/Biblioteki
152 Requires: %{name}-libs = %{version}
153 Obsoletes: MySQL-devel
156 This package contains the development header files and libraries
157 necessary to develop MySQL client applications.
159 %description -l pl devel
160 Pliki nag³ówkowe i biblioteki konieczne do kompilacji aplikacji
163 %description devel -l pt_BR
164 Este pacote contém os arquivos de cabeçalho (header files) e
165 bibliotecas necessárias para desenvolver aplicações clientes do MySQL.
167 %description -l fr devel
168 Ce package contient les fichiers entetes et les librairies de
169 developpement necessaires pour developper des applications clientes
173 Summary: MySQL staic libraris
174 Summary(pl): Biblioteki statyczne MySQL
175 Group: Development/Libraries
176 Group(fr): Development/Librairies
177 Group(pl): Programowanie/Biblioteki
178 Requires: %{name}-devel = %{version}
179 Obsoletes: MySQL-static
182 MySQL staic libraris.
184 %description -l pl static
185 Biblioteki statyczne MySQL.
188 Summary: MySQL - Benchmarks
189 Summary(pl): mySQL - Programy testuj±ce szybko¶æ dzia³ania bazy
190 Summary(pt): MySQL - Medições de desempenho
191 Group: Applications/Databases
192 Group(pl): Aplikacje/Bazy Danych
193 Group(pt): Aplicações/Banco_de_Dados
194 Requires: %{name} = %{version}
195 Requires: %{name}-client
196 Obsoletes: MySQL-bench
199 This package contains MySQL benchmark scripts and data.
201 %description -l pl bench
202 Programy testuj±ce szybko¶æ serwera MySQL.
204 %description -l pt_BR bench
205 Este pacote contém medições de desempenho de scripts e dados do MySQL.
213 chmod +x find-perl-requires
220 CXXFLAGS="$RPM_OPT_FLAGS -fno-rtti -fno-exceptions"
221 export LDFLAGS CXXFLAGS
227 --with-named-curses-libs="-lncurses" \
229 --with-charset=latin2 \
230 --with-mysqld-user=mysql \
231 --with-unix-socket-path=/var/lib/mysql/mysql.sock \
232 --with-comment='Polish Linux Distribution MySQL RPM' \
235 # If you have much RAM you can remove --with-low-memory
237 # To build mysqld as static binary add option
238 # --with-mysqld-ldflags='-all-static'
240 %{__make} benchdir=$RPM_BUILD_ROOT%{_datadir}/sql-bench
241 (cd Docs; make info manual.texi)
244 rm -rf $RPM_BUILD_ROOT
245 install -d $RPM_BUILD_ROOT%{_sysconfdir}/{logrotate.d,rc.d/init.d,sysconfig} \
246 $RPM_BUILD_ROOT/var/{log/mysql,lib/mysql}
249 %{__make} install DESTDIR=$RPM_BUILD_ROOT benchdir=%{_datadir}/sql-bench
251 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql
252 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/mysql
253 install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/mysql
254 install %{SOURCE4} $RPM_BUILD_ROOT/etc/mysqld.conf
255 touch $RPM_BUILD_ROOT/var/log/mysql/{err,log,update,isamlog}
257 find Docs -type f ! -name \*.gif ! -name \*.html -exec rm -f {} \;
258 find . -name ./CVS -exec rm -rf {} \;
259 # remove mysqld's *.po files
260 find . $RPM_BUILD_ROOT%{_datadir}/mysql -name \*.txt | xargs -n 100 rm -f
262 mv $RPM_BUILD_ROOT%{_libdir}/mysql/lib* $RPM_BUILD_ROOT%{_libdir}
263 strip --strip-unneeded $RPM_BUILD_ROOT%{_libdir}/lib*.so*.*
265 gzip -9nf $RPM_BUILD_ROOT{%{_mandir}/man1/*,%{_infodir}/mysql.info*}
268 if [ -n "`getgid mysql`" ]; then
269 if [ "`getgid mysql`" != "89" ]; then
270 echo "Warning:group mysql haven't gid=89. Corect this before install mysql" 1>&2
274 /usr/sbin/groupadd -g 89 -r -f mysql
275 if [ -f /var/db/group.db ]; then
276 /usr/bin/update-db 1>&2
279 if [ -n "`id -u mysql 2>/dev/null`" ]; then
280 if [ "`id -u mysql`" != "89" ]; then
281 echo "Warning:user mysql haven't uid=89. Corect this before install mysql" 1>&2
285 /usr/sbin/useradd -u 89 -r -d /var/lib/mysql -s /bin/false -c "MySQL User" -g mysql mysql 1>&2
286 if [ -f /var/db/passwd.db ]; then
287 /usr/bin/update-db 1>&2
292 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
293 /sbin/chkconfig --add mysql
294 if [ -f /var/lock/subsys/mysql ]; then
295 /etc/rc.d/init.d/mysql restart >&2
297 echo "Run \"/etc/rc.d/init.d/mysql start\" to start mysql." >&2
301 if [ "$1" = "0" ]; then
302 if [ -f /var/lock/subsys/mysql ]; then
303 /etc/rc.d/init.d/mysql stop
305 /sbin/chkconfig --del mysql
309 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
310 if [ "$1" = "0" ]; then
311 /usr/sbin/userdel mysql
312 if [ -f /var/db/passwd.db ]; then
315 /usr/sbin/groupdel mysql
316 if [ -f /var/db/group.db ]; then
321 %post libs -p /sbin/ldconfig
322 %postun libs -p /sbin/ldconfig
325 rm -rf $RPM_BUILD_ROOT
328 %defattr(644,root,root,755)
329 %attr(640,root,root) %config(noreplace) %verify(not md5 size mtime) /etc/logrotate.d/mysql
330 %attr(754,root,root) /etc/rc.d/init.d/mysql
331 %attr(640,root,root) %config(noreplace) %verify(not md5 size mtime) /etc/sysconfig/mysql
332 %attr(640,root,root) %config(noreplace) %verify(not md5 size mtime) /etc/mysqld.conf
333 %attr(755,root,root) %{_bindir}/isamchk
334 %attr(755,root,root) %{_bindir}/isamlog
335 %attr(755,root,root) %{_bindir}/mysqladmin
336 %attr(755,root,root) %{_bindir}/mysqlbug
337 %attr(755,root,root) %{_sbindir}/mysqld
339 %attr(751,mysql,mysql) %dir /var/lib/mysql
340 %attr(750,mysql,mysql) %dir /var/log/mysql
341 %attr(640,mysql,mysql) %config(noreplace) %verify(not md5 size mtime) /var/log/mysql/*
343 %{_infodir}/mysql.info*
344 %dir %{_datadir}/mysql
345 %{_datadir}/mysql/english
346 %lang(cs) %{_datadir}/mysql/czech
347 %lang(da) %{_datadir}/mysql/danish
348 %lang(nl) %{_datadir}/mysql/dutch
349 %lang(et) %{_datadir}/mysql/estonia
350 %lang(fr) %{_datadir}/mysql/french
351 %lang(de) %{_datadir}/mysql/german
352 %lang(el) %{_datadir}/mysql/greek
353 %lang(hu) %{_datadir}/mysql/hungarian
354 %lang(it) %{_datadir}/mysql/italian
355 %lang(ja) %{_datadir}/mysql/japanese
356 %lang(ko) %{_datadir}/mysql/korean
357 %lang(no) %{_datadir}/mysql/norwegian
358 %lang(no@nynorsk) %{_datadir}/mysql/norwegian-ny
359 %lang(pl) %{_datadir}/mysql/polish
360 %lang(pt) %{_datadir}/mysql/portuguese
361 %lang(ru) %{_datadir}/mysql/russian
362 %lang(sk) %{_datadir}/mysql/slovak
363 %lang(es) %{_datadir}/mysql/spanish
364 %lang(sv) %{_datadir}/mysql/swedish
367 %defattr(644,root,root,755)
368 %attr(755,root,root) %{_bindir}/mysql_fix_privilege_tables
369 %attr(755,root,root) %{_bindir}/mysql_setpermission
370 %attr(755,root,root) %{_bindir}/mysql_zap
371 %attr(755,root,root) %{_bindir}/perror
372 %attr(755,root,root) %{_bindir}/print_defaults
373 %attr(755,root,root) %{_bindir}/replace
374 %attr(755,root,root) %{_bindir}/resolveip
377 %defattr(644,root,root,755)
378 %attr(755,root,root) %{_bindir}/msql2mysql
379 %attr(755,root,root) %{_bindir}/mysql
380 %attr(755,root,root) %{_bindir}/mysql_find_rows
381 %attr(755,root,root) %{_bindir}/mysqlaccess
382 %attr(755,root,root) %{_bindir}/mysqlbug
383 %attr(755,root,root) %{_bindir}/mysqldump
384 %attr(755,root,root) %{_bindir}/mysqlimport
385 %attr(755,root,root) %{_bindir}/mysqlshow
386 %{_mandir}/man1/mysql.1*
389 %defattr(644,root,root,755)
390 %attr(755,root,root) %{_libdir}/lib*.so.*.*
393 %defattr(644,root,root,755)
394 %attr(755,root,root) %{_libdir}/lib*.la
395 %attr(755,root,root) %{_libdir}/lib*.so
399 %defattr(644,root,root,755)
403 %defattr(644,root,root,755)
404 %attr(-,root,root) %{_datadir}/sql-bench