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