]> git.pld-linux.org Git - packages/mysql.git/blob - mysql.spec
- changed all BuildRoot definitons
[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_BR): 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_BR):   Aplicações/Banco_de_Dados
11 Version:        3.22.32
12 Release:        3
13 License:        MySQL FREE PUBLIC LICENSE (See the file PUBLIC)
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 Patch0:         mysql-info.patch
19 Patch1:         mysql-no_libbind.patch
20 Patch2:         mysql-perldep.patch
21 Icon:           mysql.gif
22 URL:            http://www.mysql.com/
23 Requires:       %{name}-libs = %{version}
24 BuildRequires:  libstdc++-devel
25 BuildRequires:  zlib-devel
26 BuildRequires:  ncurses-devel
27 BuildRequires:  readline-devel
28 BuildRequires:  texinfo
29 BuildRequires:  rpm-perlprov
30 Prereq:         shadow
31 Provides:       msqlormysql MySQL-server
32 Obsoletes:      MySQL
33 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34
35 %define         _libexecdir     %{_prefix}/sbin
36 %define         _sysconfdir     /etc
37 %define         _localstatedir  /var/state/mysql
38
39 %description
40 MySQL is a true multi-user, multi-threaded SQL (Structured Query Language)
41 database server. SQL is the most popular database language in the world.
42 MySQL is a client/server implementation that consists of a server daemon
43 mysqld and many different client programs/libraries.
44
45 The main goals of MySQL are speed, robustness and easy to use. MySQL was
46 originally developed because we at Tcx needed a SQL server that could handle
47 very big databases with magnitude higher speed than what any database vendor
48 could offer to us. We have now been using MySQL since 1996 in a environment
49 with more than 40 databases, 10,000 tables, of which more than 500 have more
50 than 7 million rows. This is about 50G of mission critical data.
51
52 The base upon which MySQL is built is a set of routines that have been used
53 in a highly demanding production environment for many years. While MySQL is
54 still in development, it already offers a rich and highly useful function
55 set.
56
57 %description -l fr
58 MySQL est un serveur de bases de donnees SQL vraiment multi-usagers et
59 multi-taches. Le langage SQL est le langage de bases de donnees le plus
60 populaire au monde. MySQL est une implementation client/serveur qui consiste
61 en un serveur (mysqld) et differents programmes/bibliotheques clientes.
62
63 Les objectifs principaux de MySQL sont: vitesse, robustesse et facilite
64 d'utilisation. MySQL fut originalement developpe parce que nous, chez Tcx,
65 avions besoin d'un serveur SQL qui pouvait gerer de tres grandes bases de
66 donnees avec une vitesse d'un ordre de magnitude superieur a ce que
67 n'importe quel vendeur pouvait nous offrir. Nous utilisons MySQL depuis 1996
68 dans un environnement avec plus de 40 bases de donnees, 10000 tables,
69 desquelles plus de 500 ont plus de 7 millions de lignes. Ceci represente
70 environ 50G de donnees critiques.
71
72 A la base de la conception de MySQL, on retrouve une serie de routines qui
73 ont ete utilisees dans un environnement de production pendant plusieurs
74 annees. Meme si MySQL est encore en developpement, il offre deja une riche
75 et utile serie de fonctions.
76
77 %description -l pl
78 MySQL to wielow±tkowy serwer baz danych SQL.
79
80 G³ówne zalety MySQL to szybko¶æ, potêga i ³atwo¶æ u¿ytkowania. MySQL jes
81 wykorzystywany m.in. do obs³ugi 40 baz danych, 10 000 tabeli, gdzie ka¿da
82 tabela zawiera 7 milionów pozycji. To ok 50GB danych.
83
84 %description -l pt_BR
85 O MySQL é um servidor de banco de dados SQL realmente multiusuário e
86 multi-tarefa. A linguagem SQL é a mais popular linguagem para banco de dados
87 no mundo. O MySQL é uma implementação cliente/servidor que consiste de um
88 servidor chamado mysqld e diversos programas/bibliotecas clientes. Os
89 principais objetivos do MySQL são: velocidade, robustez e facilidade de uso. 
90 O MySQL foi originalmente desenvolvido porque nós na Tcx precisávamos de um
91 servidor SQL que pudesse lidar com grandes bases de dados e com uma
92 velocidade muito maior do que a que qualquer vendedor podia nos oferecer.
93 Estamos usando o MySQL desde 1996 em um ambiente com mais de 40 bases de
94 dados com 10.000 tabelas, das quais mais de 500 têm mais de 7 milhões de
95 linhas. Isto é o equivalente a aproximadamente 50G de dados críticos. A base
96 da construção do MySQL é uma série de rotinas que foram usadas em um
97 ambiente de produção com alta demanda por muitos anos. Mesmo o MySQL estando
98 ainda em desenvolvimento, ele já oferece um conjunto de funções muito ricas
99 e úteis. Veja a documentação para maiores informações.
100
101 %package client
102 Summary:        MySQL - Client
103 Summary(pl):    MySQL - Klient
104 Summary(pt_BR): MySQL - Cliente
105 Group:          Applications/Databases
106 Group(pl):      Aplikacje/Bazy Danych
107 Group(pt_BR):   Aplicações/Banco_de_Dados
108 Requires:       %{name}-libs = %{version}
109 Obsoletes:      MySQL-client
110
111 %description client
112 This package contains the standard MySQL clients. 
113
114 %description -l fr client
115 Ce package contient les clients MySQL standards.
116
117 %description -l pl client
118 Standardowe programy klienckie MySQL.
119
120 %description -l pt_BR client
121 Este pacote contém os clientes padrão para o MySQL.
122
123 %package libs
124 Summary:        Shared libraries for MySQL
125 Group:          Applications/Databases
126
127 %description libs
128 Shared libraries for MySQL.
129
130 %package devel
131 Summary:        MySQL - Development header files and libraries
132 Summary(pl):    MySQL - Pliki nag³ówkowe i biblioteki dla developerów
133 Summary(pt_BR): MySQL - Medições de desempenho
134 Group:          Development/Libraries
135 Group(pl):      Programowanie/Biblioteki
136 Requires:       %{name}-libs = %{version}
137 Obsoletes:      MySQL-devel
138
139 %description devel
140 This package contains the development header files and libraries
141 necessary to develop MySQL client applications.
142
143 %description -l pl devel
144 Pliki nag³ówkowe i biblioteki konieczne do rozwijania aplikacji
145 klienckich MySQL.
146
147 %description devel -l pt_BR
148 Este pacote contém os arquivos de cabeçalho (header files) e bibliotecas 
149 necessárias para desenvolver aplicações clientes do MySQL. 
150
151 %description -l fr devel
152 Ce package contient les fichiers entetes et les librairies de developpement
153 necessaires pour developper des applications clientes MySQL.
154
155 %package static
156 Summary:        MySQL staic libraris
157 Summary(pl):    Biblioteki statyczne MySQL
158 Group:          Development/Libraries
159 Group(pl):      Programowanie/Biblioteki
160 Requires:       %{name}-devel = %{version}
161 Obsoletes:      MySQL-static
162
163 %description static
164 MySQL staic libraris.
165
166 %description -l pl static
167 Biblioteki statyczne MySQL.
168
169 %package bench
170 Summary:        MySQL - Benchmarks
171 Summary(pl):    mySQL - Programy testuj±ce szybko¶æ dzia³ania bazy
172 Summary(pt_BR): MySQL - Medições de desempenho
173 Group:          Applications/Databases
174 Group(pl):      Aplikacje/Bazy Danych
175 Group(pt_BR):   Aplicações/Banco_de_Dados
176 Requires:       %{name} = %{version}
177 Requires:       %{name}-client
178 Obsoletes:      MySQL-bench
179
180 %description bench
181 This package contains MySQL benchmark scripts and data.
182
183 %description -l pl bench
184 Programy testuj±ce szybko¶æ serwera MySQL.
185
186 %description -l pt_BR bench
187 Este pacote contém medições de desempenho de scripts e dados do MySQL.
188
189 %prep
190 %setup  -q
191 %patch0 -p1
192 %patch1 -p1
193 %patch2 -p1
194
195 chmod +x find-perl-requires
196
197 %build
198 automake
199 aclocal
200 autoconf
201 LDFLAGS="-s"
202 CXXFLAGS="$RPM_OPT_FLAGS -fno-rtti -fno-exceptions"
203 export LDFLAGS CXXFLAGS
204 %configure \
205         --without-debug \
206         --enable-shared \
207         --enable-static \
208         --with-pthread \
209         --with-named-curses-libs="-lncurses" \
210         --enable-assembler \
211         --with-charset=latin2 \
212         --with-mysqld-user=mysql \
213         --with-unix-socket-path=/var/state/mysql/mysql.sock \
214         --with-comment='Polish Linux Distribution MySQL RPM' \
215         --with-readline \
216         --with-low-memory
217         
218 # If you have much RAM you can remove --with-low-memory
219
220 make benchdir=$RPM_BUILD_ROOT%{_datadir}/sql-bench
221 (cd Docs; make info manual.texi)
222
223 %install
224 rm -rf $RPM_BUILD_ROOT
225 install -d $RPM_BUILD_ROOT%{_sysconfdir}/{logrotate.d,rc.d/init.d,sysconfig} \
226         $RPM_BUILD_ROOT/var/{log,state/mysql}
227
228 # Make install
229 make install DESTDIR=$RPM_BUILD_ROOT benchdir=%{_datadir}/sql-bench
230
231 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql
232 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/mysql
233 install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/mysql
234 touch $RPM_BUILD_ROOT/var/log/mysqld.log
235
236 find Docs -type f ! -name *.gif ! -name *.html -exec rm {} \;
237 find . -name ./CVS -exec rm -rf {} \;
238
239 mv $RPM_BUILD_ROOT%{_libdir}/mysql/lib* $RPM_BUILD_ROOT%{_libdir}
240
241 strip --strip-unneeded $RPM_BUILD_ROOT%{_libdir}/lib*.so*.*
242
243 gzip -9nf $RPM_BUILD_ROOT{%{_mandir}/man1/*,%{_infodir}/mysql.info*}
244
245 %pre
246 if [ -n "`getgid mysql`" ]; then
247         if [ "`getgid mysql`" != "89" ]; then
248                 echo "Warning: group mysql haven't gid=89. Corect this before install mysql" 1>&2
249                 exit 1
250         fi
251 else
252         /usr/sbin/groupadd -g 89 -r -f mysql
253         if [ -f /var/db/group.db ]; then
254                 /usr/bin/update-db 1>&2
255         fi
256 fi
257 if [ -n "`id -u mysql 2>/dev/null`" ]; then
258         if [ "`id -u mysql`" != "89" ]; then
259                 echo "Warning: user mysql haven't uid=89. Corect this before install mysql" 1>&2
260                 exit 1
261         fi
262 else
263         /usr/sbin/useradd -u 89 -r -m -d /var/state/mysql -s /bin/false -c "MySQL User" -g mysql mysql 1>&2
264         if [ -f /var/db/passwd.db ]; then
265                 /usr/bin/update-db 1>&2
266         fi
267 fi
268
269 %post
270 /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
271 /sbin/chkconfig --add mysql
272 if [ -f /var/lock/subsys/mysql ]; then
273         /etc/rc.d/init.d/mysql restart >&2
274 else
275         echo "Run \"/etc/rc.d/init.d/mysql start\" to start mysql." >&2
276 fi
277
278 %preun
279 if [ "$1" = "0" ]; then
280         if [ -f /var/lock/subsys/mysql ]; then
281                 /etc/rc.d/init.d/mysql stop
282         fi
283         /sbin/chkconfig --del mysql
284 fi
285
286 %postun
287 /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
288 if [ "$1" = "0" ]; then
289         /usr/sbin/userdel mysql
290         if [ -f /var/db/passwd.db ]; then
291                 /usr/bin/update-db
292         fi
293         /usr/sbin/groupdel mysql
294         if [ -f /var/db/group.db ]; then
295                 /usr/bin/update-db
296         fi
297 fi
298
299 %post   libs -p /sbin/ldconfig
300 %postun libs -p /sbin/ldconfig
301
302 %clean
303 rm -rf $RPM_BUILD_ROOT
304
305 %files
306 %defattr(644,root,root,755)
307 %attr(755,root,root) %{_bindir}/isamchk
308 %attr(755,root,root) %{_bindir}/isamlog
309 %attr(755,root,root) %{_bindir}/mysql_fix_privilege_tables
310 %attr(755,root,root) %{_bindir}/mysql_setpermission
311 %attr(755,root,root) %{_bindir}/mysql_zap
312 %attr(755,root,root) %{_bindir}/mysqladmin
313 %attr(755,root,root) %{_bindir}/mysqlbug
314 %attr(755,root,root) %{_bindir}/perror
315 %attr(755,root,root) %{_bindir}/replace
316 %attr(755,root,root) %{_bindir}/resolveip
317 %attr(755,root,root) %{_sbindir}/mysqld
318 %attr(640,root,root) /etc/logrotate.d/mysql
319 %attr(754,root,root) /etc/rc.d/init.d/mysql
320 %attr(640,root,root) %config(noreplace) /etc/sysconfig/mysql
321 %{_infodir}/mysql.info*
322 %dir %{_datadir}/mysql
323
324 %attr(750,mysql,mysql) %dir /var/state/mysql
325 %attr(640,mysql,mysql) %config(noreplace) %verify(not md5 size mtime) /var/log/*
326
327 %{_datadir}/mysql/english
328 %lang(cs) %{_datadir}/mysql/czech
329 %lang(da) %{_datadir}/mysql/danish
330 %lang(nl) %{_datadir}/mysql/dutch
331 %lang(et) %{_datadir}/mysql/estonia
332 %lang(fr) %{_datadir}/mysql/french
333 %lang(de) %{_datadir}/mysql/german
334 %lang(el) %{_datadir}/mysql/greek
335 %lang(hu) %{_datadir}/mysql/hungarian
336 %lang(it) %{_datadir}/mysql/italian
337 %lang(ja) %{_datadir}/mysql/japanese
338 %lang(ko) %{_datadir}/mysql/korean
339 %lang(no) %{_datadir}/mysql/norwegian
340 %lang(no@nynorsk) %{_datadir}/mysql/norwegian-ny
341 %lang(pl) %{_datadir}/mysql/polish
342 %lang(pt) %{_datadir}/mysql/portuguese
343 %lang(ru) %{_datadir}/mysql/russian
344 %lang(sk) %{_datadir}/mysql/slovak
345 %lang(es) %{_datadir}/mysql/spanish
346 %lang(sv) %{_datadir}/mysql/swedish
347
348 %files client
349 %attr(755,root,root) %{_bindir}/msql2mysql
350 %attr(755,root,root) %{_bindir}/mysql
351 %attr(755,root,root) %{_bindir}/mysql_find_rows
352 %attr(755,root,root) %{_bindir}/mysqlaccess
353 %attr(755,root,root) %{_bindir}/mysqlbug
354 %attr(755,root,root) %{_bindir}/mysqldump
355 %attr(755,root,root) %{_bindir}/mysqlimport
356 %attr(755,root,root) %{_bindir}/mysqlshow
357 %attr(644,root,root) %{_mandir}/man1/mysql.1*
358
359 %files libs
360 %attr(755,root,root) %{_libdir}/lib*.so.*.*
361
362 %files devel
363 %defattr(644,root,root,755)
364 %attr(755,root,root) %{_libdir}/lib*.la
365 %attr(755,root,root) %{_libdir}/lib*.so
366 %attr(755,root,root) %{_bindir}/comp_err
367 %{_includedir}/mysql
368
369 %files static
370 %attr(644,root,root) %{_libdir}/lib*.a
371
372 %files bench
373 %attr(-,root,root) %{_datadir}/sql-bench
This page took 0.074143 seconds and 4 git commands to generate.