1 %include /usr/lib/rpm/macros.perl
2 %define __find_requires %{_builddir}/%{buildsubdir}/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
14 Source0: http://www.mysql.com/Downloads/MySQL-3.23/%{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
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
31 BuildRequires: perl-DBI
32 BuildRequires: rpm-perlprov
33 Prereq: rc-scripts >= 0.2.0
35 Provides: msqlormysql MySQL-server
37 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39 %define _libexecdir %{_sbindir}
40 %define _localstatedir /var/lib/mysql
43 MySQL is a true multi-user, multi-threaded SQL (Structured Query
44 Language) database server. SQL is the most popular database language
45 in the world. MySQL is a client/server implementation that consists of
46 a server daemon mysqld and many different client programs/libraries.
48 The main goals of MySQL are speed, robustness and easy to use. MySQL
49 was originally developed because we at Tcx needed a SQL server that
50 could handle very big databases with magnitude higher speed than what
51 any database vendor could offer to us. We have now been using MySQL
52 since 1996 in a environment with more than 40 databases, 10,000
53 tables, of which more than 500 have more than 7 million rows. This is
54 about 50G of mission critical data.
56 The base upon which MySQL is built is a set of routines that have been
57 used in a highly demanding production environment for many years.
58 While MySQL is still in development, it already offers a rich and
59 highly useful function set.
62 MySQL est un serveur de bases de donnees SQL vraiment multi-usagers et
63 multi-taches. Le langage SQL est le langage de bases de donnees le
64 plus populaire au monde. MySQL est une implementation client/serveur
65 qui consiste en un serveur (mysqld) et differents
66 programmes/bibliotheques clientes.
68 Les objectifs principaux de MySQL sont: vitesse, robustesse et
69 facilite d'utilisation. MySQL fut originalement developpe parce que
70 nous, chez Tcx, avions besoin d'un serveur SQL qui pouvait gerer de
71 tres grandes bases de donnees avec une vitesse d'un ordre de magnitude
72 superieur a ce que n'importe quel vendeur pouvait nous offrir. Nous
73 utilisons MySQL depuis 1996 dans un environnement avec plus de 40
74 bases de donnees, 10000 tables, desquelles plus de 500 ont plus de 7
75 millions de lignes. Ceci represente environ 50G de donnees critiques.
77 A la base de la conception de MySQL, on retrouve une serie de routines
78 qui ont ete utilisees dans un environnement de production pendant
79 plusieurs annees. Meme si MySQL est encore en developpement, il offre
80 deja une riche et utile serie de fonctions.
83 MySQL to wielow±tkowy serwer baz danych SQL.
85 G³ówne zalety MySQL to szybko¶æ, potêga i ³atwo¶æ u¿ytkowania. MySQL
86 jest wykorzystywany m.in. do obs³ugi 40 baz danych, 10 000 tabeli,
87 gdzie ka¿da tabela zawiera 7 milionów pozycji. To ok 50GB danych.
90 O MySQL é um servidor de banco de dados SQL realmente multiusuário e
91 multi-tarefa. A linguagem SQL é a mais popular linguagem para banco de
92 dados no mundo. O MySQL é uma implementação cliente/servidor que
93 consiste de um servidor chamado mysqld e diversos
94 programas/bibliotecas clientes. Os principais objetivos do MySQL são:
95 velocidade, robustez e facilidade de uso. O MySQL foi originalmente
96 desenvolvido porque nós na Tcx precisávamos de um servidor SQL que
97 pudesse lidar com grandes bases de dados e com uma velocidade muito
98 maior do que a que qualquer vendedor podia nos oferecer. Estamos
99 usando o MySQL desde 1996 em um ambiente com mais de 40 bases de dados
100 com 10.000 tabelas, das quais mais de 500 têm mais de 7 milhões de
101 linhas. Isto é o equivalente a aproximadamente 50G de dados críticos.
102 A base da construção do MySQL é uma série de rotinas que foram usadas
103 em um ambiente de produção com alta demanda por muitos anos. Mesmo o
104 MySQL estando ainda em desenvolvimento, ele já oferece um conjunto de
105 funções muito ricas e úteis. Veja a documentação para maiores
109 Summary: MySQL additional utilities
110 Group: Applications/Databases
111 Group(pl): Aplikacje/Bazy danych
112 Group(pt): Aplicações/Banco_de_Dados
113 Requires: %{name}-libs = %{version}
116 MySQL additional utilities except Perl scripts (they may be found in
117 %{name}-extras-perl package)
120 Summary: MySQL additional utilities written in Perl
121 Group: Applications/Databases
122 Group(pl): Aplikacje/Bazy danych
123 Group(pt): Aplicações/Banco_de_Dados
124 Requires: %{name}-extras = %{version}
126 %description extras-perl
127 MySQL additional utilities written in Perl.
130 Summary: MySQL - Client
131 Summary(pl): MySQL - Klient
132 Summary(pt): MySQL - Cliente
133 Group: Applications/Databases
134 Group(pl): Aplikacje/Bazy danych
135 Group(pt): Aplicações/Banco_de_Dados
136 Requires: %{name}-libs = %{version}
137 Obsoletes: MySQL-client
140 This package contains the standard MySQL clients.
142 %description -l fr client
143 Ce package contient les clients MySQL standards.
145 %description -l pl client
146 Standardowe programy klienckie MySQL.
148 %description -l pt_BR client
149 Este pacote contém os clientes padrão para o MySQL.
152 Summary: Shared libraries for MySQL
153 Group: Applications/Databases
154 Group(pl): Aplikacje/Bazy danych
157 Shared libraries for MySQL.
160 Summary: MySQL - Development header files and libraries
161 Summary(pl): MySQL - Pliki nag³ówkowe i biblioteki dla programistów
162 Summary(pt): MySQL - Medições de desempenho
163 Group: Development/Libraries
164 Group(de): Entwicklung/Libraries
165 Group(fr): Development/Librairies
166 Group(pl): Programowanie/Biblioteki
167 Requires: %{name}-libs = %{version}
168 Obsoletes: MySQL-devel
171 This package contains the development header files and libraries
172 necessary to develop MySQL client applications.
174 %description -l pl devel
175 Pliki nag³ówkowe i biblioteki konieczne do kompilacji aplikacji
178 %description devel -l pt_BR
179 Este pacote contém os arquivos de cabeçalho (header files) e
180 bibliotecas necessárias para desenvolver aplicações clientes do MySQL.
182 %description -l fr devel
183 Ce package contient les fichiers entetes et les librairies de
184 developpement necessaires pour developper des applications clientes
188 Summary: MySQL staic libraris
189 Summary(pl): Biblioteki statyczne MySQL
190 Group: Development/Libraries
191 Group(de): Entwicklung/Libraries
192 Group(fr): Development/Librairies
193 Group(pl): Programowanie/Biblioteki
194 Requires: %{name}-devel = %{version}
195 Obsoletes: MySQL-static
198 MySQL staic libraris.
200 %description -l pl static
201 Biblioteki statyczne MySQL.
204 Summary: MySQL - Benchmarks
205 Summary(pl): mySQL - Programy testuj±ce szybko¶æ dzia³ania bazy
206 Summary(pt): MySQL - Medições de desempenho
207 Group: Applications/Databases
208 Group(pl): Aplikacje/Bazy danych
209 Group(pt): Aplicações/Banco_de_Dados
210 Requires: %{name} = %{version}
211 Requires: %{name}-client
212 Obsoletes: MySQL-bench
215 This package contains MySQL benchmark scripts and data.
217 %description -l pl bench
218 Programy testuj±ce szybko¶æ serwera MySQL.
220 %description -l pt_BR bench
221 Este pacote contém medições de desempenho de scripts e dados do MySQL.
224 %setup -q -n %{name}-%{version}
229 chmod +x find-perl-requires
235 CXXFLAGS="%{?debug:-O -g}%{!?debug:$RPM_OPT_FLAGS} -fno-rtti -fno-exceptions -fomit-frame-pointer"
236 CFLAGS="%{?debug:-O -g}%{!?debug:$RPM_OPT_FLAGS} -fomit-frame-pointer"
242 --with-named-curses-libs="-lncurses" \
245 --with-charset=latin2 \
246 --with-mysqld-user=mysql \
247 --with-unix-socket-path=/var/lib/mysql/mysql.sock \
249 --without-berkeley-db \
252 --with-comment="Polish Linux Distribution MySQL RPM"
253 # If you have much RAM you can remove --with-low-memory
255 # To build mysqld as static binary add option
256 # --with-mysqld-ldflags='-all-static'
258 %{__make} benchdir=$RPM_BUILD_ROOT%{_datadir}/sql-bench
259 %{__make} -C Docs mysql.info
262 rm -rf $RPM_BUILD_ROOT
263 install -d $RPM_BUILD_ROOT%{_sysconfdir}/{logrotate.d,rc.d/init.d,sysconfig} \
264 $RPM_BUILD_ROOT/var/{log/{archiv,}/mysql,lib/mysql} \
265 $RPM_BUILD_ROOT%{_infodir}
268 %{__make} install DESTDIR=$RPM_BUILD_ROOT benchdir=%{_datadir}/sql-bench
269 install Docs/mysql.info $RPM_BUILD_ROOT%{_infodir}
271 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql
272 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/mysql
273 install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/mysql
274 install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/mysqld.conf
275 touch $RPM_BUILD_ROOT/var/log/mysql/{err,log,update,isamlog}
277 # remove mysqld's *.po files
278 find . $RPM_BUILD_ROOT%{_datadir}/%{name} -name \*.txt | xargs -n 100 rm -f
279 mv -f $RPM_BUILD_ROOT%{_libdir}/mysql/lib* $RPM_BUILD_ROOT%{_libdir}
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
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
300 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
301 /sbin/chkconfig --add mysql
302 if [ -f /var/lock/subsys/mysql ]; then
303 /etc/rc.d/init.d/mysql restart >&2
305 echo "Run \"/etc/rc.d/init.d/mysql start\" to start mysql." >&2
309 if [ "$1" = "0" ]; then
310 if [ -f /var/lock/subsys/mysql ]; then
311 /etc/rc.d/init.d/mysql stop
313 /sbin/chkconfig --del mysql
317 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
318 if [ "$1" = "0" ]; then
319 /usr/sbin/userdel mysql
320 /usr/sbin/groupdel mysql
323 %post libs -p /sbin/ldconfig
324 %postun libs -p /sbin/ldconfig
327 rm -rf $RPM_BUILD_ROOT
330 %defattr(644,root,root,755)
331 %attr(640,root,root) %config(noreplace) %verify(not md5 size mtime) /etc/logrotate.d/mysql
332 %attr(754,root,root) /etc/rc.d/init.d/mysql
333 %attr(640,root,root) %config(noreplace) %verify(not md5 size mtime) /etc/sysconfig/mysql
334 %attr(640,root,root) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/mysqld.conf
335 %attr(755,root,root) %{_bindir}/isamchk
336 %attr(755,root,root) %{_bindir}/isamlog
337 %attr(755,root,root) %{_bindir}/mysqladmin
338 %attr(755,root,root) %{_bindir}/mysqlbug
339 %attr(755,root,root) %{_bindir}/myisamchk
340 %attr(755,root,root) %{_bindir}/myisamlog
341 %attr(755,root,root) %{_bindir}/myisampack
342 %attr(755,root,root) %{_bindir}/pack_isam
343 %attr(755,root,root) %{_sbindir}/mysqld
345 %attr(751,mysql,mysql) %dir /var/lib/mysql
346 %attr(750,mysql,mysql) %dir /var/log/mysql
347 %attr(750,mysql,mysql) %dir /var/log/archiv/mysql
348 %attr(640,mysql,mysql) %config(noreplace) %verify(not md5 size mtime) /var/log/mysql/*
350 %{_infodir}/mysql.info*
351 %dir %{_datadir}/mysql
352 %{_datadir}/mysql/charsets
353 %{_datadir}/mysql/english
354 %lang(cs) %{_datadir}/mysql/czech
355 %lang(da) %{_datadir}/mysql/danish
356 %lang(nl) %{_datadir}/mysql/dutch
357 %lang(et) %{_datadir}/mysql/estonian
358 %lang(fr) %{_datadir}/mysql/french
359 %lang(de) %{_datadir}/mysql/german
360 %lang(el) %{_datadir}/mysql/greek
361 %lang(hu) %{_datadir}/mysql/hungarian
362 %lang(it) %{_datadir}/mysql/italian
363 %lang(ja) %{_datadir}/mysql/japanese
364 %lang(ko) %{_datadir}/mysql/korean
365 %lang(no) %{_datadir}/mysql/norwegian
366 %lang(no@nynorsk) %{_datadir}/mysql/norwegian-ny
367 %lang(pl) %{_datadir}/mysql/polish
368 %lang(pt) %{_datadir}/mysql/portuguese
369 %lang(ro) %{_datadir}/mysql/romanian
370 %lang(ru) %{_datadir}/mysql/russian
371 %lang(sk) %{_datadir}/mysql/slovak
372 %lang(es) %{_datadir}/mysql/spanish
373 %lang(sv) %{_datadir}/mysql/swedish
376 %defattr(644,root,root,755)
377 %attr(755,root,root) %{_bindir}/msql2mysql
378 %attr(755,root,root) %{_bindir}/mysql_config
379 %attr(755,root,root) %{_bindir}/mysql_fix_privilege_tables
380 %attr(755,root,root) %{_bindir}/perror
381 %attr(755,root,root) %{_bindir}/my_print_defaults
382 %attr(755,root,root) %{_bindir}/replace
383 %attr(755,root,root) %{_bindir}/resolveip
386 %defattr(644,root,root,755)
387 %attr(755,root,root) %{_bindir}/mysql_convert_table_format
388 %attr(755,root,root) %{_bindir}/mysqldumpslow
389 %attr(755,root,root) %{_bindir}/mysqlhotcopy
390 %attr(755,root,root) %{_bindir}/mysql_setpermission
391 %attr(755,root,root) %{_bindir}/mysql_zap
392 %attr(755,root,root) %{_bindir}/mysql_find_rows
393 %attr(755,root,root) %{_bindir}/mysqlaccess
396 %defattr(644,root,root,755)
397 %attr(755,root,root) %{_bindir}/mysql
398 %attr(755,root,root) %{_bindir}/mysqlbug
399 %attr(755,root,root) %{_bindir}/mysqldump
400 %attr(755,root,root) %{_bindir}/mysqlimport
401 %attr(755,root,root) %{_bindir}/mysqlshow
402 %attr(755,root,root) %{_bindir}/mysqlbinlog
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