1 %include /usr/lib/rpm/macros.perl
2 Summary: MySQL: a very fast and reliable SQL database engine
3 Summary(fr): MySQL: un serveur SQL rapide et fiable
4 Summary(pl): MySQL: bardzo szybka i niezawodna baza danych (SQL)
5 Summary(pt): MySQL: Um servidor SQL rápido e confiável
7 Group: Applications/Databases
8 Group(de): Applikationen/Dateibanken
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_libnsl.patch
21 Patch2: %{name}-opt.patch
22 Patch3: %{name}-moreincludes.patch
23 Patch4: %{name}-amfix.patch
25 URL: http://www.mysql.com/
26 Requires: %{name}-libs = %{version}
27 BuildRequires: libstdc++-devel
28 BuildRequires: ncurses-devel >= 4.2
29 BuildRequires: perl-devel >= 5.6.1
30 BuildRequires: perl-DBI
31 BuildRequires: readline-devel >= 4.2
32 BuildRequires: rpm-perlprov
33 BuildRequires: texinfo
34 BuildRequires: zlib-devel
35 BuildRequires: autoconf
36 Prereq: rc-scripts >= 0.2.0
38 Provides: msqlormysql MySQL-server
39 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41 Obsoletes: mysql-server
43 %define _libexecdir %{_sbindir}
44 %define _localstatedir /var/lib/mysql
47 MySQL is a true multi-user, multi-threaded SQL (Structured Query
48 Language) database server. SQL is the most popular database language
49 in the world. MySQL is a client/server implementation that consists of
50 a server daemon mysqld and many different client programs/libraries.
52 The main goals of MySQL are speed, robustness and easy to use. MySQL
53 was originally developed because we at Tcx needed a SQL server that
54 could handle very big databases with magnitude higher speed than what
55 any database vendor could offer to us. We have now been using MySQL
56 since 1996 in a environment with more than 40 databases, 10,000
57 tables, of which more than 500 have more than 7 million rows. This is
58 about 50G of mission critical data.
60 The base upon which MySQL is built is a set of routines that have been
61 used in a highly demanding production environment for many years.
62 While MySQL is still in development, it already offers a rich and
63 highly useful function set.
66 MySQL est un serveur de bases de donnees SQL vraiment multi-usagers et
67 multi-taches. Le langage SQL est le langage de bases de donnees le
68 plus populaire au monde. MySQL est une implementation client/serveur
69 qui consiste en un serveur (mysqld) et differents
70 programmes/bibliotheques clientes.
72 Les objectifs principaux de MySQL sont: vitesse, robustesse et
73 facilite d'utilisation. MySQL fut originalement developpe parce que
74 nous, chez Tcx, avions besoin d'un serveur SQL qui pouvait gerer de
75 tres grandes bases de donnees avec une vitesse d'un ordre de magnitude
76 superieur a ce que n'importe quel vendeur pouvait nous offrir. Nous
77 utilisons MySQL depuis 1996 dans un environnement avec plus de 40
78 bases de donnees, 10000 tables, desquelles plus de 500 ont plus de 7
79 millions de lignes. Ceci represente environ 50G de donnees critiques.
81 A la base de la conception de MySQL, on retrouve une serie de routines
82 qui ont ete utilisees dans un environnement de production pendant
83 plusieurs annees. Meme si MySQL est encore en developpement, il offre
84 deja une riche et utile serie de fonctions.
87 MySQL to wielow±tkowy serwer baz danych SQL.
89 G³ówne zalety MySQL to szybko¶æ, potêga i ³atwo¶æ u¿ytkowania. MySQL
90 jest wykorzystywany m.in. do obs³ugi 40 baz danych, 10 000 tabeli,
91 gdzie ka¿da tabela zawiera 7 milionów pozycji. To ok 50GB danych.
94 O MySQL é um servidor de banco de dados SQL realmente multiusuário e
95 multi-tarefa. A linguagem SQL é a mais popular linguagem para banco de
96 dados no mundo. O MySQL é uma implementação cliente/servidor que
97 consiste de um servidor chamado mysqld e diversos
98 programas/bibliotecas clientes. Os principais objetivos do MySQL são:
99 velocidade, robustez e facilidade de uso. O MySQL foi originalmente
100 desenvolvido porque nós na Tcx precisávamos de um servidor SQL que
101 pudesse lidar com grandes bases de dados e com uma velocidade muito
102 maior do que a que qualquer vendedor podia nos oferecer. Estamos
103 usando o MySQL desde 1996 em um ambiente com mais de 40 bases de dados
104 com 10.000 tabelas, das quais mais de 500 têm mais de 7 milhões de
105 linhas. Isto é o equivalente a aproximadamente 50G de dados críticos.
106 A base da construção do MySQL é uma série de rotinas que foram usadas
107 em um ambiente de produção com alta demanda por muitos anos. Mesmo o
108 MySQL estando ainda em desenvolvimento, ele já oferece um conjunto de
109 funções muito ricas e úteis. Veja a documentação para maiores
113 Summary: MySQL additional utilities
114 Summary(pl): Dodatkowe narzêdzia do MySQL
115 Group: Applications/Databases
116 Group(de): Applikationen/Dateibanken
117 Group(pl): Aplikacje/Bazy danych
118 Group(pt): Aplicações/Banco_de_Dados
119 Requires: %{name}-libs = %{version}
122 MySQL additional utilities except Perl scripts (they may be found in
123 %{name}-extras-perl package)
125 %description -l pl extras
126 Dodatkowe narzêdzia do MySQL - z wyj±tkiem skryptów Perla (które s± w
127 pakiecie %{name}-extras-perl).
130 Summary: MySQL additional utilities written in Perl
131 Summary(pl): Dodatkowe narzêdzia do MySQL napisane w Perlu
132 Group: Applications/Databases
133 Group(de): Applikationen/Dateibanken
134 Group(pl): Aplikacje/Bazy danych
135 Group(pt): Aplicações/Banco_de_Dados
136 Requires: %{name}-extras = %{version}
138 %description extras-perl
139 MySQL additional utilities written in Perl.
141 %description -l pl extras-perl
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 Group(de): Applikationen/Dateibanken
150 Group(pl): Aplikacje/Bazy danych
151 Group(pt): Aplicações/Banco_de_Dados
152 Requires: %{name}-libs = %{version}
153 Obsoletes: MySQL-client
156 This package contains the standard MySQL clients.
158 %description -l fr client
159 Ce package contient les clients MySQL standards.
161 %description -l pl client
162 Standardowe programy klienckie MySQL.
164 %description -l pt_BR client
165 Este pacote contém os clientes padrão para o MySQL.
168 Summary: Shared libraries for MySQL
169 Summary(pl): Biblioteki dzielone MySQL
170 Group: Applications/Databases
171 Group(de): Applikationen/Dateibanken
172 Group(pl): Aplikacje/Bazy danych
175 Shared libraries for MySQL.
177 %description -l pl libs
178 Biblioteki dzielone MySQL.
181 Summary: MySQL - Development header files and libraries
182 Summary(pl): MySQL - Pliki nag³ówkowe i biblioteki dla programistów
183 Summary(pt): MySQL - Medições de desempenho
184 Group: Development/Libraries
185 Group(de): Entwicklung/Libraries
186 Group(fr): Development/Librairies
187 Group(pl): Programowanie/Biblioteki
188 Requires: %{name}-libs = %{version}
189 Obsoletes: MySQL-devel
192 This package contains the development header files and libraries
193 necessary to develop MySQL client applications.
195 %description -l pl devel
196 Pliki nag³ówkowe i biblioteki konieczne do kompilacji aplikacji
199 %description devel -l pt_BR
200 Este pacote contém os arquivos de cabeçalho (header files) e
201 bibliotecas necessárias para desenvolver aplicações clientes do MySQL.
203 %description -l fr devel
204 Ce package contient les fichiers entetes et les librairies de
205 developpement necessaires pour developper des applications clientes
209 Summary: MySQL staic libraris
210 Summary(pl): Biblioteki statyczne MySQL
211 Group: Development/Libraries
212 Group(de): Entwicklung/Libraries
213 Group(fr): Development/Librairies
214 Group(pl): Programowanie/Biblioteki
215 Requires: %{name}-devel = %{version}
216 Obsoletes: MySQL-static
219 MySQL static libraris.
221 %description -l pl static
222 Biblioteki statyczne MySQL.
225 Summary: MySQL - Benchmarks
226 Summary(pl): mySQL - Programy testuj±ce szybko¶æ dzia³ania bazy
227 Summary(pt): MySQL - Medições de desempenho
228 Group: Applications/Databases
229 Group(de): Applikationen/Dateibanken
230 Group(pl): Aplikacje/Bazy danych
231 Group(pt): Aplicações/Banco_de_Dados
232 Requires: %{name} = %{version}
233 Requires: %{name}-client
234 Obsoletes: MySQL-bench
237 This package contains MySQL benchmark scripts and data.
239 %description -l pl bench
240 Programy testuj±ce szybko¶æ serwera MySQL.
242 %description -l pt_BR bench
243 Este pacote contém medições de desempenho de scripts e dados do MySQL.
246 %setup -q -n %{name}-%{version}
255 #libtoolize --copy --force
259 CXXFLAGS="%{rpmcflags} -fno-rtti -fno-exceptions -fomit-frame-pointer"
260 CFLAGS="%{rpmcflags} -fomit-frame-pointer"
262 %{?_with_innodb:--with-innodb} \
263 %{?_with_bdb:--with-berkeley-db} \
269 --with-named-curses-libs="-lncurses" \
272 --with-extra-charsets=all \
273 --with-mysqld-user=mysql \
274 --with-unix-socket-path=/var/lib/mysql/mysql.sock \
278 --with-comment="Polish Linux Distribution MySQL RPM"
280 %{__make} benchdir=$RPM_BUILD_ROOT%{_datadir}/sql-bench
281 %{__make} -C Docs mysql.info
284 rm -rf $RPM_BUILD_ROOT
285 install -d $RPM_BUILD_ROOT/etc/{logrotate.d,rc.d/init.d,sysconfig} \
286 $RPM_BUILD_ROOT/var/{log/{archiv,}/mysql,lib/mysql/db} \
287 $RPM_BUILD_ROOT%{_infodir}
289 %if %{?_with_innodb:1}%{!?_with_innodb:0}
290 install -d $RPM_BUILD_ROOT/var/lib/mysql/innodb/{data,log}
293 %if %{?_with_bdb:1}%{!?_with_bdb:0}
294 install -d $RPM_BUILD_ROOT/var/lib/mysql/bdb/{log,tmp}
298 %{__make} install DESTDIR=$RPM_BUILD_ROOT benchdir=%{_datadir}/sql-bench
299 install Docs/mysql.info $RPM_BUILD_ROOT%{_infodir}
301 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql
302 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/mysql
303 install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/mysql
304 install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/mysqld.conf
305 touch $RPM_BUILD_ROOT/var/log/mysql/{err,log,update,isamlog}
307 # remove mysqld's *.po files
308 find . $RPM_BUILD_ROOT%{_datadir}/%{name} -name \*.txt | xargs -n 100 rm -f
309 mv -f $RPM_BUILD_ROOT%{_libdir}/mysql/lib* $RPM_BUILD_ROOT%{_libdir}
310 perl -pi -e 's,%{_libdir}/mysql,%{_libdir},;' $RPM_BUILD_ROOT%{_libdir}/libmysqlclient.la
313 if [ -n "`getgid mysql`" ]; then
314 if [ "`getgid mysql`" != "89" ]; then
315 echo "Warning: group mysql haven't gid=89. Correct this before installing mysql" 1>&2
319 /usr/sbin/groupadd -g 89 -r -f mysql
321 if [ -n "`id -u mysql 2>/dev/null`" ]; then
322 if [ "`id -u mysql`" != "89" ]; then
323 echo "Warning: user mysql haven't uid=89. Correct this before installing mysql" 1>&2
327 /usr/sbin/useradd -u 89 -r -d /var/lib/mysql -s /bin/false -c "MySQL User" -g mysql mysql 1>&2
331 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
332 /sbin/chkconfig --add mysql
333 if [ -f /var/lock/subsys/mysql ]; then
334 /etc/rc.d/init.d/mysql restart >&2
336 echo "Run \"/etc/rc.d/init.d/mysql start\" to start mysql." >&2
340 if [ "$1" = "0" ]; then
341 if [ -f /var/lock/subsys/mysql ]; then
342 /etc/rc.d/init.d/mysql stop
344 /sbin/chkconfig --del mysql
348 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
349 if [ "$1" = "0" ]; then
350 /usr/sbin/userdel mysql
351 /usr/sbin/groupdel mysql
354 %post libs -p /sbin/ldconfig
355 %postun libs -p /sbin/ldconfig
358 rm -rf $RPM_BUILD_ROOT
361 %defattr(644,root,root,755)
362 %attr(640,root,root) %config(noreplace) %verify(not md5 size mtime) /etc/logrotate.d/mysql
363 %attr(754,root,root) /etc/rc.d/init.d/mysql
364 %attr(640,root,root) %config(noreplace) %verify(not md5 size mtime) /etc/sysconfig/mysql
365 %attr(640,root,root) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/mysqld.conf
366 %attr(755,root,root) %{_bindir}/isamchk
367 %attr(755,root,root) %{_bindir}/isamlog
368 %attr(755,root,root) %{_bindir}/mysqladmin
369 %attr(755,root,root) %{_bindir}/mysqlbug
370 %attr(755,root,root) %{_bindir}/myisamchk
371 %attr(755,root,root) %{_bindir}/myisamlog
372 %attr(755,root,root) %{_bindir}/myisampack
373 %attr(755,root,root) %{_bindir}/pack_isam
374 %attr(755,root,root) %{_sbindir}/mysqld
376 %attr(751,mysql,mysql) /var/lib/mysql
377 %attr(750,mysql,mysql) %dir /var/log/mysql
378 %attr(750,mysql,mysql) %dir /var/log/archiv/mysql
379 %attr(640,mysql,mysql) %config(noreplace) %verify(not md5 size mtime) /var/log/mysql/*
381 %{_infodir}/mysql.info*
382 %dir %{_datadir}/mysql
383 %{_datadir}/mysql/charsets
384 %{_datadir}/mysql/english
385 %lang(cs) %{_datadir}/mysql/czech
386 %lang(da) %{_datadir}/mysql/danish
387 %lang(nl) %{_datadir}/mysql/dutch
388 %lang(et) %{_datadir}/mysql/estonian
389 %lang(fr) %{_datadir}/mysql/french
390 %lang(de) %{_datadir}/mysql/german
391 %lang(el) %{_datadir}/mysql/greek
392 %lang(hu) %{_datadir}/mysql/hungarian
393 %lang(it) %{_datadir}/mysql/italian
394 %lang(ja) %{_datadir}/mysql/japanese
395 %lang(ko) %{_datadir}/mysql/korean
396 %lang(no) %{_datadir}/mysql/norwegian
397 %lang(no@nynorsk) %{_datadir}/mysql/norwegian-ny
398 %lang(pl) %{_datadir}/mysql/polish
399 %lang(pt) %{_datadir}/mysql/portuguese
400 %lang(ro) %{_datadir}/mysql/romanian
401 %lang(ru) %{_datadir}/mysql/russian
402 %lang(sk) %{_datadir}/mysql/slovak
403 %lang(es) %{_datadir}/mysql/spanish
404 %lang(sv) %{_datadir}/mysql/swedish
407 %defattr(644,root,root,755)
408 %attr(755,root,root) %{_bindir}/msql2mysql
409 %attr(755,root,root) %{_bindir}/mysql_config
410 %attr(755,root,root) %{_bindir}/mysql_fix_privilege_tables
411 %attr(755,root,root) %{_bindir}/perror
412 %attr(755,root,root) %{_bindir}/my_print_defaults
413 %attr(755,root,root) %{_bindir}/replace
414 %attr(755,root,root) %{_bindir}/resolveip
417 %defattr(644,root,root,755)
418 %attr(755,root,root) %{_bindir}/mysql_convert_table_format
419 %attr(755,root,root) %{_bindir}/mysqldumpslow
420 %attr(755,root,root) %{_bindir}/mysqlhotcopy
421 %attr(755,root,root) %{_bindir}/mysql_setpermission
422 %attr(755,root,root) %{_bindir}/mysql_zap
423 %attr(755,root,root) %{_bindir}/mysql_find_rows
424 %attr(755,root,root) %{_bindir}/mysqlaccess
427 %defattr(644,root,root,755)
428 %attr(755,root,root) %{_bindir}/mysql
429 %attr(755,root,root) %{_bindir}/mysqlbug
430 %attr(755,root,root) %{_bindir}/mysqldump
431 %attr(755,root,root) %{_bindir}/mysqlimport
432 %attr(755,root,root) %{_bindir}/mysqlshow
433 %attr(755,root,root) %{_bindir}/mysqlbinlog
434 %{_mandir}/man1/mysql.1*
437 %defattr(644,root,root,755)
438 %attr(755,root,root) %{_libdir}/lib*.so.*.*
441 %defattr(644,root,root,755)
442 %attr(755,root,root) %{_libdir}/lib*.la
443 %attr(755,root,root) %{_libdir}/lib*.so
447 %defattr(644,root,root,755)
451 %defattr(644,root,root,755)
452 %attr(-,root,root) %{_datadir}/sql-bench