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: %{name}.sysconfig
17 Source3: %{name}.logrotate
18 Source4: %{name}d.conf
19 Patch0: %{name}-info.patch
20 Patch1: %{name}-no_libbind.patch
21 Patch2: %{name}-perldep.patch
22 Patch3: %{name}-gethostbyname_r_is_in_libc_aka_no_libnsl.patch
24 URL: http://www.mysql.com/
25 Requires: %{name}-libs = %{version}
26 BuildRequires: libstdc++-devel
27 BuildRequires: zlib-devel
28 BuildRequires: ncurses-devel
29 BuildRequires: readline-devel
30 BuildRequires: texinfo
31 BuildRequires: rpm-perlprov
32 Requires: rc-scripts >= 0.2.0
34 Provides: msqlormysql MySQL-server
36 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38 %define _libexecdir %{_sbindir}
39 %define _localstatedir /var/lib/mysql
42 MySQL is a true multi-user, multi-threaded SQL (Structured Query
43 Language) database server. SQL is the most popular database language
44 in the world. MySQL is a client/server implementation that consists of
45 a server daemon mysqld and many different client programs/libraries.
47 The main goals of MySQL are speed, robustness and easy to use. MySQL
48 was originally developed because we at Tcx needed a SQL server that
49 could handle very big databases with magnitude higher speed than what
50 any database vendor could offer to us. We have now been using MySQL
51 since 1996 in a environment with more than 40 databases, 10,000
52 tables, of which more than 500 have more than 7 million rows. This is
53 about 50G of mission critical data.
55 The base upon which MySQL is built is a set of routines that have been
56 used in a highly demanding production environment for many years.
57 While MySQL is still in development, it already offers a rich and
58 highly useful function set.
61 MySQL est un serveur de bases de donnees SQL vraiment multi-usagers et
62 multi-taches. Le langage SQL est le langage de bases de donnees le
63 plus populaire au monde. MySQL est une implementation client/serveur
64 qui consiste en un serveur (mysqld) et differents
65 programmes/bibliotheques clientes.
67 Les objectifs principaux de MySQL sont: vitesse, robustesse et
68 facilite d'utilisation. MySQL fut originalement developpe parce que
69 nous, chez Tcx, avions besoin d'un serveur SQL qui pouvait gerer de
70 tres grandes bases de donnees avec une vitesse d'un ordre de magnitude
71 superieur a ce que n'importe quel vendeur pouvait nous offrir. Nous
72 utilisons MySQL depuis 1996 dans un environnement avec plus de 40
73 bases de donnees, 10000 tables, desquelles plus de 500 ont plus de 7
74 millions de lignes. Ceci represente environ 50G de donnees critiques.
76 A la base de la conception de MySQL, on retrouve une serie de routines
77 qui ont ete utilisees dans un environnement de production pendant
78 plusieurs annees. Meme si MySQL est encore en developpement, il offre
79 deja une riche et utile serie de fonctions.
82 MySQL to wielow±tkowy serwer baz danych SQL.
84 G³ówne zalety MySQL to szybko¶æ, potêga i ³atwo¶æ u¿ytkowania. MySQL
85 jest wykorzystywany m.in. do obs³ugi 40 baz danych, 10 000 tabeli,
86 gdzie ka¿da tabela zawiera 7 milionów pozycji. To ok 50GB danych.
89 O MySQL é um servidor de banco de dados SQL realmente multiusuário e
90 multi-tarefa. A linguagem SQL é a mais popular linguagem para banco de
91 dados no mundo. O MySQL é uma implementação cliente/servidor que
92 consiste de um servidor chamado mysqld e diversos
93 programas/bibliotecas clientes. Os principais objetivos do MySQL são:
94 velocidade, robustez e facilidade de uso. O MySQL foi originalmente
95 desenvolvido porque nós na Tcx precisávamos de um servidor SQL que
96 pudesse lidar com grandes bases de dados e com uma velocidade muito
97 maior do que a que qualquer vendedor podia nos oferecer. Estamos
98 usando o MySQL desde 1996 em um ambiente com mais de 40 bases de dados
99 com 10.000 tabelas, das quais mais de 500 têm mais de 7 milhões de
100 linhas. Isto é o equivalente a aproximadamente 50G de dados críticos.
101 A base da construção do MySQL é uma série de rotinas que foram usadas
102 em um ambiente de produção com alta demanda por muitos anos. Mesmo o
103 MySQL estando ainda em desenvolvimento, ele já oferece um conjunto de
104 funções muito ricas e úteis. Veja a documentação para maiores
108 Summary: MySQL additional utilities
109 Group: Applications/Databases
110 Group(pl): Aplikacje/Bazy danych
111 Group(pt): Aplicações/Banco_de_Dados
112 Requires: %{name}-libs = %{version}
115 MySQL additional utilities except Perl scripts (they may be found in
116 %{name}-extras-perl package)
119 Summary: MySQL additional utilities written in Perl
120 Group: Applications/Databases
121 Group(pl): Aplikacje/Bazy danych
122 Group(pt): Aplicações/Banco_de_Dados
123 Requires: %{name}-extras = %{version}
125 %description extras-perl
126 MySQL additional utilities written in Perl.
129 Summary: MySQL - Client
130 Summary(pl): MySQL - Klient
131 Summary(pt): MySQL - Cliente
132 Group: Applications/Databases
133 Group(pl): Aplikacje/Bazy danych
134 Group(pt): Aplicações/Banco_de_Dados
135 Requires: %{name}-libs = %{version}
136 Obsoletes: MySQL-client
139 This package contains the standard MySQL clients.
141 %description -l fr client
142 Ce package contient les clients MySQL standards.
144 %description -l pl client
145 Standardowe programy klienckie MySQL.
147 %description -l pt_BR client
148 Este pacote contém os clientes padrão para o MySQL.
151 Summary: Shared libraries for MySQL
152 Group: Applications/Databases
153 Group(pl): Aplikacje/Bazy danych
156 Shared libraries for MySQL.
159 Summary: MySQL - Development header files and libraries
160 Summary(pl): MySQL - Pliki nag³ówkowe i biblioteki dla programistów
161 Summary(pt): MySQL - Medições de desempenho
162 Group: Development/Libraries
163 Group(pl): Programowanie/Biblioteki
164 Group(fr): Development/Librairies
165 Requires: %{name}-libs = %{version}
166 Obsoletes: MySQL-devel
169 This package contains the development header files and libraries
170 necessary to develop MySQL client applications.
172 %description -l pl devel
173 Pliki nag³ówkowe i biblioteki konieczne do kompilacji aplikacji
176 %description devel -l pt_BR
177 Este pacote contém os arquivos de cabeçalho (header files) e
178 bibliotecas necessárias para desenvolver aplicações clientes do MySQL.
180 %description -l fr devel
181 Ce package contient les fichiers entetes et les librairies de
182 developpement necessaires pour developper des applications clientes
186 Summary: MySQL staic libraris
187 Summary(pl): Biblioteki statyczne MySQL
188 Group: Development/Libraries
189 Group(pl): Programowanie/Biblioteki
190 Group(fr): Development/Librairies
191 Requires: %{name}-devel = %{version}
192 Obsoletes: MySQL-static
195 MySQL staic libraris.
197 %description -l pl static
198 Biblioteki statyczne MySQL.
201 Summary: MySQL - Benchmarks
202 Summary(pl): mySQL - Programy testuj±ce szybko¶æ dzia³ania bazy
203 Summary(pt): MySQL - Medições de desempenho
204 Group: Applications/Databases
205 Group(pl): Aplikacje/Bazy danych
206 Group(pt): Aplicações/Banco_de_Dados
207 Requires: %{name} = %{version}
208 Requires: %{name}-client
209 Obsoletes: MySQL-bench
212 This package contains MySQL benchmark scripts and data.
214 %description -l pl bench
215 Programy testuj±ce szybko¶æ serwera MySQL.
217 %description -l pt_BR bench
218 Este pacote contém medições de desempenho de scripts e dados do MySQL.
227 chmod +x find-perl-requires
234 CXXFLAGS="$RPM_OPT_FLAGS -fno-rtti -fno-exceptions"
235 export LDFLAGS CXXFLAGS
241 --with-named-curses-libs="-lncurses" \
243 --with-charset=latin2 \
244 --with-mysqld-user=mysql \
245 --with-unix-socket-path=/var/lib/mysql/mysql.sock \
246 --with-comment='Polish Linux Distribution MySQL RPM' \
249 # If you have much RAM you can remove --with-low-memory
251 # To build mysqld as static binary add option
252 # --with-mysqld-ldflags='-all-static'
254 %{__make} benchdir=$RPM_BUILD_ROOT%{_datadir}/sql-bench
255 (cd Docs; make info manual.texi)
258 rm -rf $RPM_BUILD_ROOT
259 install -d $RPM_BUILD_ROOT%{_sysconfdir}/{logrotate.d,rc.d/init.d,sysconfig} \
260 $RPM_BUILD_ROOT/var/{log/mysql,lib/mysql}
263 %{__make} install DESTDIR=$RPM_BUILD_ROOT benchdir=%{_datadir}/sql-bench
265 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql
266 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/mysql
267 install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/mysql
268 install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/mysqld.conf
269 touch $RPM_BUILD_ROOT/var/log/mysql/{err,log,update,isamlog}
271 find Docs -type f ! -name \*.gif ! -name \*.html -exec rm -f {} \;
272 find . -name ./CVS -exec rm -rf {} \;
273 # remove mysqld's *.po files
274 find . $RPM_BUILD_ROOT%{_datadir}/mysql -name \*.txt | xargs -n 100 rm -f
276 mv $RPM_BUILD_ROOT%{_libdir}/mysql/lib* $RPM_BUILD_ROOT%{_libdir}
277 strip --strip-unneeded $RPM_BUILD_ROOT%{_libdir}/lib*.so*.*
279 gzip -9nf $RPM_BUILD_ROOT{%{_mandir}/man1/*,%{_infodir}/mysql.info*}
282 if [ -n "`getgid mysql`" ]; then
283 if [ "`getgid mysql`" != "89" ]; then
284 echo "Warning:group mysql haven't gid=89. Corect this before install mysql" 1>&2
288 /usr/sbin/groupadd -g 89 -r -f mysql
289 if [ -f /var/db/group.db ]; then
290 /usr/bin/update-db 1>&2
293 if [ -n "`id -u mysql 2>/dev/null`" ]; then
294 if [ "`id -u mysql`" != "89" ]; then
295 echo "Warning:user mysql haven't uid=89. Corect this before install mysql" 1>&2
299 /usr/sbin/useradd -u 89 -r -d /var/lib/mysql -s /bin/false -c "MySQL User" -g mysql mysql 1>&2
300 if [ -f /var/db/passwd.db ]; then
301 /usr/bin/update-db 1>&2
306 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
307 /sbin/chkconfig --add mysql
308 if [ -f /var/lock/subsys/mysql ]; then
309 /etc/rc.d/init.d/mysql restart >&2
311 echo "Run \"/etc/rc.d/init.d/mysql start\" to start mysql." >&2
315 if [ "$1" = "0" ]; then
316 if [ -f /var/lock/subsys/mysql ]; then
317 /etc/rc.d/init.d/mysql stop
319 /sbin/chkconfig --del mysql
323 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
324 if [ "$1" = "0" ]; then
325 /usr/sbin/userdel mysql
326 if [ -f /var/db/passwd.db ]; then
329 /usr/sbin/groupdel mysql
330 if [ -f /var/db/group.db ]; then
335 %post libs -p /sbin/ldconfig
336 %postun libs -p /sbin/ldconfig
339 rm -rf $RPM_BUILD_ROOT
342 %defattr(644,root,root,755)
343 %attr(640,root,root) %config(noreplace) %verify(not md5 size mtime) /etc/logrotate.d/mysql
344 %attr(754,root,root) /etc/rc.d/init.d/mysql
345 %attr(640,root,root) %config(noreplace) %verify(not md5 size mtime) /etc/sysconfig/mysql
346 %attr(640,root,root) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/mysqld.conf
347 %attr(755,root,root) %{_bindir}/isamchk
348 %attr(755,root,root) %{_bindir}/isamlog
349 %attr(755,root,root) %{_bindir}/mysqladmin
350 %attr(755,root,root) %{_bindir}/mysqlbug
351 %attr(755,root,root) %{_sbindir}/mysqld
353 %attr(751,mysql,mysql) %dir /var/lib/mysql
354 %attr(750,mysql,mysql) %dir /var/log/mysql
355 %attr(640,mysql,mysql) %config(noreplace) %verify(not md5 size mtime) /var/log/mysql/*
357 %{_infodir}/mysql.info*
358 %dir %{_datadir}/mysql
359 %{_datadir}/mysql/english
360 %lang(cs) %{_datadir}/mysql/czech
361 %lang(da) %{_datadir}/mysql/danish
362 %lang(nl) %{_datadir}/mysql/dutch
363 %lang(et) %{_datadir}/mysql/estonia
364 %lang(fr) %{_datadir}/mysql/french
365 %lang(de) %{_datadir}/mysql/german
366 %lang(el) %{_datadir}/mysql/greek
367 %lang(hu) %{_datadir}/mysql/hungarian
368 %lang(it) %{_datadir}/mysql/italian
369 %lang(ja) %{_datadir}/mysql/japanese
370 %lang(ko) %{_datadir}/mysql/korean
371 %lang(no) %{_datadir}/mysql/norwegian
372 %lang(no@nynorsk) %{_datadir}/mysql/norwegian-ny
373 %lang(pl) %{_datadir}/mysql/polish
374 %lang(pt) %{_datadir}/mysql/portuguese
375 %lang(ru) %{_datadir}/mysql/russian
376 %lang(sk) %{_datadir}/mysql/slovak
377 %lang(es) %{_datadir}/mysql/spanish
378 %lang(sv) %{_datadir}/mysql/swedish
381 %defattr(644,root,root,755)
382 %attr(755,root,root) %{_bindir}/msql2mysql
383 %attr(755,root,root) %{_bindir}/mysql_fix_privilege_tables
384 %attr(755,root,root) %{_bindir}/perror
385 %attr(755,root,root) %{_bindir}/print_defaults
386 %attr(755,root,root) %{_bindir}/replace
387 %attr(755,root,root) %{_bindir}/resolveip
390 %defattr(644,root,root,755)
391 %attr(755,root,root) %{_bindir}/mysql_setpermission
392 %attr(755,root,root) %{_bindir}/mysql_zap
393 %attr(755,root,root) %{_bindir}/mysql_find_rows
394 %attr(755,root,root) %{_bindir}/mysqlaccess
397 %defattr(644,root,root,755)
398 %attr(755,root,root) %{_bindir}/mysql
399 %attr(755,root,root) %{_bindir}/mysqlbug
400 %attr(755,root,root) %{_bindir}/mysqldump
401 %attr(755,root,root) %{_bindir}/mysqlimport
402 %attr(755,root,root) %{_bindir}/mysqlshow
403 %{_mandir}/man1/mysql.1*
406 %defattr(644,root,root,755)
407 %attr(755,root,root) %{_libdir}/lib*.so.*.*
410 %defattr(644,root,root,755)
411 %attr(755,root,root) %{_libdir}/lib*.la
412 %attr(755,root,root) %{_libdir}/lib*.so
416 %defattr(644,root,root,755)
420 %defattr(644,root,root,755)
421 %attr(-,root,root) %{_datadir}/sql-bench