]> git.pld-linux.org Git - packages/mysql.git/blob - mysql.spec
- updated to 3.23.27
[packages/mysql.git] / mysql.spec
1 %include        /usr/lib/rpm/macros.perl
2 %define         __find_requires %{_builddir}/mysql-%{version}-beta/find-perl-requires
3
4 Summary:        MySQL: a very fast and reliable SQL database engine
5 Summary(fr):    MySQL: un serveur SQL rapide et fiable
6 Summary(pl):    MySQL: bardzo szybka i niezawodna baza danych (SQL)
7 Summary(pt):    MySQL: Um servidor SQL rápido e confiável
8 Name:           mysql
9 Group:          Applications/Databases
10 Group(pl):      Aplikacje/Bazy danych
11 Group(pt):      Aplicações/Banco_de_Dados
12 Version:        3.23.27
13 Release:        1
14 License:        GPL/LGPL
15 Source0:        http://www.mysql.com/Downloads/MySQL-3.23/%{name}-%{version}-beta.tar.gz
16 Source1:        %{name}.init
17 Source2:        %{name}.sysconfig
18 Source3:        %{name}.logrotate
19 Source4:        %{name}d.conf
20 Patch0:         %{name}-info.patch
21 Patch1:         %{name}-no_libbind.patch
22 Patch2:         %{name}-perldep.patch
23 Patch3:         %{name}-gethostbyname_r_is_in_libc_aka_no_libnsl.patch
24 Icon:           mysql.gif
25 URL:            http://www.mysql.com/
26 Requires:       %{name}-libs = %{version}
27 BuildRequires:  libstdc++-devel
28 BuildRequires:  zlib-devel
29 BuildRequires:  ncurses-devel
30 BuildRequires:  readline-devel
31 BuildRequires:  texinfo
32 BuildRequires:  rpm-perlprov
33 Requires:       rc-scripts >= 0.2.0
34 Prereq:         shadow
35 Provides:       msqlormysql MySQL-server
36 Obsoletes:      MySQL
37 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38
39 %define         _libexecdir     %{_sbindir}
40 %define         _localstatedir  /var/lib/mysql
41
42 %description
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.
47
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.
55
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.
60
61 %description -l fr
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.
67
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.
76
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.
81
82 %description -l pl
83 MySQL to wielow±tkowy serwer baz danych SQL.
84
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.
88
89 %description -l pt_BR
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
106 informações.
107
108 %package extras
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}
114
115 %description extras
116 MySQL additional utilities except Perl scripts (they may be found in
117 %{name}-extras-perl package)
118
119 %package extras-perl
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}
125
126 %description extras-perl
127 MySQL additional utilities written in Perl.
128
129 %package client
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
138
139 %description client
140 This package contains the standard MySQL clients.
141
142 %description -l fr client
143 Ce package contient les clients MySQL standards.
144
145 %description -l pl client
146 Standardowe programy klienckie MySQL.
147
148 %description -l pt_BR client
149 Este pacote contém os clientes padrão para o MySQL.
150
151 %package libs
152 Summary:        Shared libraries for MySQL
153 Group:          Applications/Databases
154 Group(pl):      Aplikacje/Bazy danych
155
156 %description libs
157 Shared libraries for MySQL.
158
159 %package devel
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(pl):      Programowanie/Biblioteki
165 Group(fr):      Development/Librairies
166 Requires:       %{name}-libs = %{version}
167 Obsoletes:      MySQL-devel
168
169 %description devel
170 This package contains the development header files and libraries
171 necessary to develop MySQL client applications.
172
173 %description -l pl devel
174 Pliki nag³ówkowe i biblioteki konieczne do kompilacji aplikacji
175 klienckich MySQL.
176
177 %description devel -l pt_BR
178 Este pacote contém os arquivos de cabeçalho (header files) e
179 bibliotecas necessárias para desenvolver aplicações clientes do MySQL.
180
181 %description -l fr devel
182 Ce package contient les fichiers entetes et les librairies de
183 developpement necessaires pour developper des applications clientes
184 MySQL.
185
186 %package static
187 Summary:        MySQL staic libraris
188 Summary(pl):    Biblioteki statyczne MySQL
189 Group:          Development/Libraries
190 Group(pl):      Programowanie/Biblioteki
191 Group(fr):      Development/Librairies
192 Requires:       %{name}-devel = %{version}
193 Obsoletes:      MySQL-static
194
195 %description static
196 MySQL staic libraris.
197
198 %description -l pl static
199 Biblioteki statyczne MySQL.
200
201 %package bench
202 Summary:        MySQL - Benchmarks
203 Summary(pl):    mySQL - Programy testuj±ce szybko¶æ dzia³ania bazy
204 Summary(pt):    MySQL - Medições de desempenho
205 Group:          Applications/Databases
206 Group(pl):      Aplikacje/Bazy danych
207 Group(pt):      Aplicações/Banco_de_Dados
208 Requires:       %{name} = %{version}
209 Requires:       %{name}-client
210 Obsoletes:      MySQL-bench
211
212 %description bench
213 This package contains MySQL benchmark scripts and data.
214
215 %description -l pl bench
216 Programy testuj±ce szybko¶æ serwera MySQL.
217
218 %description -l pt_BR bench
219 Este pacote contém medições de desempenho de scripts e dados do MySQL.
220
221 %prep
222 %setup -q -n %{name}-%{version}-beta
223 %patch0 -p1
224 %patch1 -p1
225 %patch2 -p1
226 #%patch3 -p1
227
228 chmod +x find-perl-requires
229
230 %build
231 #automake
232 #aclocal
233 #autoconf
234 CXXFLAGS="$RPM_OPT_FLAGS -fno-rtti -fno-exceptions -fomit-frame-pointer"
235 CFLAGS="$RPM_OPT_FLAGS -fomit-frame-pointer"
236 export LDFLAGS CXXFLAGS CFLAGS
237 %configure \
238         --without-debug \
239         --enable-shared \
240         --enable-static \
241         --with-pthread \
242         --with-named-curses-libs="-lncurses" \
243         --enable-assembler \
244         --with-raid \
245         --with-charset=latin2 \
246         --with-mysqld-user=mysql \
247         --with-unix-socket-path=/var/lib/mysql/mysql.sock \
248         --without-readline \
249         --without-berkeley-db \
250         --without-docs \
251         --with-low-memory  \
252         --with-comment="Polish Linux Distribution MySQL RPM"
253 # If you have much RAM you can remove --with-low-memory
254
255 # To build mysqld as static binary add option
256 #       --with-mysqld-ldflags='-all-static' 
257
258 %{__make} benchdir=$RPM_BUILD_ROOT%{_datadir}/sql-bench
259 %{__make} -C Docs mysql.info
260
261 %install
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}
266
267 # Make install
268 %{__make} install DESTDIR=$RPM_BUILD_ROOT benchdir=%{_datadir}/sql-bench
269 install Docs/mysql.info $RPM_BUILD_ROOT%{_infodir}
270
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}
276
277 # remove mysqld's *.po files
278 find . $RPM_BUILD_ROOT%{_datadir}/%{name} -name \*.txt | xargs -n 100 rm -f
279 mv $RPM_BUILD_ROOT%{_libdir}/mysql/lib* $RPM_BUILD_ROOT%{_libdir}
280
281 %pre
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
285                 exit 1
286         fi
287 else
288         /usr/sbin/groupadd -g 89 -r -f mysql
289         if [ -f /var/db/group.db ]; then
290                 /usr/bin/update-db 1>&2
291         fi
292 fi
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
296                 exit 1
297         fi
298 else
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
302         fi
303 fi
304
305 %post
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
310 else
311         echo "Run \"/etc/rc.d/init.d/mysql start\" to start mysql." >&2
312 fi
313
314 %preun
315 if [ "$1" = "0" ]; then
316         if [ -f /var/lock/subsys/mysql ]; then
317                 /etc/rc.d/init.d/mysql stop
318         fi
319         /sbin/chkconfig --del mysql
320 fi
321
322 %postun
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
327                 /usr/bin/update-db
328         fi
329         /usr/sbin/groupdel mysql
330         if [ -f /var/db/group.db ]; then
331                 /usr/bin/update-db
332         fi
333 fi
334
335 %post   libs -p /sbin/ldconfig
336 %postun libs -p /sbin/ldconfig
337
338 %clean
339 rm -rf $RPM_BUILD_ROOT
340
341 %files
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) %{_bindir}/pack_isam
352 %attr(755,root,root) %{_bindir}/myisamchk
353 %attr(755,root,root) %{_bindir}/myisamlog
354 %attr(755,root,root) %{_bindir}/myisampack
355 %attr(755,root,root) %{_sbindir}/mysqld
356
357 %attr(751,mysql,mysql) %dir /var/lib/mysql
358 %attr(750,mysql,mysql) %dir /var/log/mysql
359 %attr(750,mysql,mysql) %dir /var/log/archiv/mysql
360 %attr(640,mysql,mysql) %config(noreplace) %verify(not md5 size mtime) /var/log/mysql/*
361
362 %{_infodir}/mysql.info*
363 %dir %{_datadir}/mysql
364 %{_datadir}/mysql/charsets
365 %{_datadir}/mysql/english
366 %lang(cs) %{_datadir}/mysql/czech
367 %lang(da) %{_datadir}/mysql/danish
368 %lang(nl) %{_datadir}/mysql/dutch
369 %lang(et) %{_datadir}/mysql/estonian
370 %lang(fr) %{_datadir}/mysql/french
371 %lang(de) %{_datadir}/mysql/german
372 %lang(el) %{_datadir}/mysql/greek
373 %lang(hu) %{_datadir}/mysql/hungarian
374 %lang(it) %{_datadir}/mysql/italian
375 %lang(ja) %{_datadir}/mysql/japanese
376 %lang(ko) %{_datadir}/mysql/korean
377 %lang(no) %{_datadir}/mysql/norwegian
378 %lang(no@nynorsk) %{_datadir}/mysql/norwegian-ny
379 %lang(pl) %{_datadir}/mysql/polish
380 %lang(pt) %{_datadir}/mysql/portuguese
381 %lang(ru) %{_datadir}/mysql/russian
382 %lang(sk) %{_datadir}/mysql/slovak
383 %lang(es) %{_datadir}/mysql/spanish
384 %lang(sv) %{_datadir}/mysql/swedish
385
386 %files extras
387 %defattr(644,root,root,755)
388 %attr(755,root,root) %{_bindir}/msql2mysql
389 %attr(755,root,root) %{_bindir}/mysql_config
390 %attr(755,root,root) %{_bindir}/mysql_fix_privilege_tables
391 %attr(755,root,root) %{_bindir}/perror
392 %attr(755,root,root) %{_bindir}/my_print_defaults
393 %attr(755,root,root) %{_bindir}/replace
394 %attr(755,root,root) %{_bindir}/resolveip
395
396 %files extras-perl
397 %defattr(644,root,root,755)
398 %attr(755,root,root) %{_bindir}/mysql_convert_table_format
399 %attr(755,root,root) %{_bindir}/mysqlhotcopy
400 %attr(755,root,root) %{_bindir}/mysql_setpermission
401 %attr(755,root,root) %{_bindir}/mysql_zap
402 %attr(755,root,root) %{_bindir}/mysql_find_rows
403 %attr(755,root,root) %{_bindir}/mysqlaccess
404
405 %files client
406 %defattr(644,root,root,755)
407 %attr(755,root,root) %{_bindir}/mysql
408 %attr(755,root,root) %{_bindir}/mysqlbug
409 %attr(755,root,root) %{_bindir}/mysqldump
410 %attr(755,root,root) %{_bindir}/mysqlimport
411 %attr(755,root,root) %{_bindir}/mysqlshow
412 %attr(755,root,root) %{_bindir}/mysqlbinlog
413 %{_mandir}/man1/mysql.1*
414
415 %files libs
416 %defattr(644,root,root,755)
417 %attr(755,root,root) %{_libdir}/lib*.so.*.*
418
419 %files devel
420 %defattr(644,root,root,755)
421 %attr(755,root,root) %{_libdir}/lib*.la
422 %attr(755,root,root) %{_libdir}/lib*.so
423 %{_includedir}/mysql
424
425 %files static
426 %defattr(644,root,root,755)
427 %{_libdir}/lib*.a
428
429 %files bench
430 %defattr(644,root,root,755)
431 %attr(-,root,root) %{_datadir}/sql-bench
This page took 0.075475 seconds and 4 git commands to generate.