]> git.pld-linux.org Git - packages/mysql.git/blob - mysql.spec
- typo
[packages/mysql.git] / mysql.spec
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
7 Name:           mysql
8 Group:          Applications/Databases
9 Group(pl):      Aplikacje/Bazy Danych
10 Group(pt):      Aplicações/Banco_de_Dados
11 Version:        3.22.32
12 Release:        7
13 License:        MySQL FREE PUBLIC LICENSE (See the manual)
14 Source0:        http://www.mysql.com/Downloads/MySQL-3.22/%{name}-%{version}.tar.gz
15 Source1:        mysql.init
16 Source2:        mysql.sysconfig
17 Source3:        mysql.logrotate
18 Source4:        mysqld.conf
19 Patch0:         mysql-info.patch
20 Patch1:         mysql-no_libbind.patch
21 Patch2:         mysql-perldep.patch
22 Icon:           mysql.gif
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
32 Prereq:         shadow
33 Provides:       msqlormysql MySQL-server
34 Obsoletes:      MySQL
35 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36
37 %define         _libexecdir     %{_sbindir}
38 %define         _localstatedir  /var/lib/mysql
39
40 %description
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.
45
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.
53
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.
58
59 %description -l fr
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.
65
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.
74
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.
79
80 %description -l pl
81 MySQL to wielow±tkowy serwer baz danych SQL.
82
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.
86
87 %description -l pt_BR
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
104 informações.
105
106 %package extras
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}
112
113 %description extras
114 MySQL additional utilities 
115
116 %package client
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
125
126 %description client
127 This package contains the standard MySQL clients.
128
129 %description -l fr client
130 Ce package contient les clients MySQL standards.
131
132 %description -l pl client
133 Standardowe programy klienckie MySQL.
134
135 %description -l pt_BR client
136 Este pacote contém os clientes padrão para o MySQL.
137
138 %package libs
139 Summary:        Shared libraries for MySQL
140 Group:          Applications/Databases
141
142 %description libs
143 Shared libraries for MySQL.
144
145 %package devel
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
154
155 %description devel
156 This package contains the development header files and libraries
157 necessary to develop MySQL client applications.
158
159 %description -l pl devel
160 Pliki nag³ówkowe i biblioteki konieczne do kompilacji aplikacji
161 klienckich MySQL.
162
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.
166
167 %description -l fr devel
168 Ce package contient les fichiers entetes et les librairies de
169 developpement necessaires pour developper des applications clientes
170 MySQL.
171
172 %package static
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
180
181 %description static
182 MySQL staic libraris.
183
184 %description -l pl static
185 Biblioteki statyczne MySQL.
186
187 %package bench
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
197
198 %description bench
199 This package contains MySQL benchmark scripts and data.
200
201 %description -l pl bench
202 Programy testuj±ce szybko¶æ serwera MySQL.
203
204 %description -l pt_BR bench
205 Este pacote contém medições de desempenho de scripts e dados do MySQL.
206
207 %prep
208 %setup  -q
209 %patch0 -p1
210 %patch1 -p1
211 %patch2 -p1
212
213 chmod +x find-perl-requires
214
215 %build
216 automake
217 aclocal
218 autoconf
219 LDFLAGS="-s"
220 CXXFLAGS="$RPM_OPT_FLAGS -fno-rtti -fno-exceptions"
221 export LDFLAGS CXXFLAGS
222 %configure \
223         --without-debug \
224         --enable-shared \
225         --enable-static \
226         --with-pthread \
227         --with-named-curses-libs="-lncurses" \
228         --enable-assembler \
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' \
233         --without-readline \
234         --with-low-memory
235 # If you have much RAM you can remove --with-low-memory
236
237 # To build mysqld as static binary add option
238 #       --with-mysqld-ldflags='-all-static' 
239
240 %{__make} benchdir=$RPM_BUILD_ROOT%{_datadir}/sql-bench
241 (cd Docs; make info manual.texi)
242
243 %install
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}
247
248 # Make install
249 %{__make} install DESTDIR=$RPM_BUILD_ROOT benchdir=%{_datadir}/sql-bench
250
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}
256
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
261
262 mv $RPM_BUILD_ROOT%{_libdir}/mysql/lib* $RPM_BUILD_ROOT%{_libdir}
263 strip --strip-unneeded $RPM_BUILD_ROOT%{_libdir}/lib*.so*.*
264
265 gzip -9nf $RPM_BUILD_ROOT{%{_mandir}/man1/*,%{_infodir}/mysql.info*}
266
267 %pre
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
271                 exit 1
272         fi
273 else
274         /usr/sbin/groupadd -g 89 -r -f mysql
275         if [ -f /var/db/group.db ]; then
276                 /usr/bin/update-db 1>&2
277         fi
278 fi
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
282                 exit 1
283         fi
284 else
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
288         fi
289 fi
290
291 %post
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
296 else
297         echo "Run \"/etc/rc.d/init.d/mysql start\" to start mysql." >&2
298 fi
299
300 %preun
301 if [ "$1" = "0" ]; then
302         if [ -f /var/lock/subsys/mysql ]; then
303                 /etc/rc.d/init.d/mysql stop
304         fi
305         /sbin/chkconfig --del mysql
306 fi
307
308 %postun
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
313                 /usr/bin/update-db
314         fi
315         /usr/sbin/groupdel mysql
316         if [ -f /var/db/group.db ]; then
317                 /usr/bin/update-db
318         fi
319 fi
320
321 %post   libs -p /sbin/ldconfig
322 %postun libs -p /sbin/ldconfig
323
324 %clean
325 rm -rf $RPM_BUILD_ROOT
326
327 %files
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
338
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/*
342
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
365
366 %files extras
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
375
376 %files client
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*
387
388 %files libs
389 %defattr(644,root,root,755)
390 %attr(755,root,root) %{_libdir}/lib*.so.*.*
391
392 %files devel
393 %defattr(644,root,root,755)
394 %attr(755,root,root) %{_libdir}/lib*.la
395 %attr(755,root,root) %{_libdir}/lib*.so
396 %{_includedir}/mysql
397
398 %files static
399 %defattr(644,root,root,755)
400 %{_libdir}/lib*.a
401
402 %files bench
403 %defattr(644,root,root,755)
404 %attr(-,root,root) %{_datadir}/sql-bench
This page took 0.064383 seconds and 4 git commands to generate.