]> git.pld-linux.org Git - packages/mysql.git/blob - mysql.spec
- include fill_help_tables.sql in %doc
[packages/mysql.git] / mysql.spec
1 # TODO:
2 # - trigger that prepares system from pre-cluster into cluster
3 # - trigger /etc/mysqld.conf into /etc/mysql/mysqld.conf. Solve possible
4 #   conflict with /var/lib/mysql/mysqld.conf
5 #
6 # Conditional build:
7 %bcond_with     bdb     # Berkeley DB support
8 %bcond_without  innodb  # Without InnoDB support
9 %bcond_without  isam    # Without ISAM table format (used in mysql 3.22)
10 %bcond_without  raid    # Without raid
11 %bcond_without  ssl     # Without OpenSSL
12 %bcond_without  tcpd    # Without libwrap (tcp_wrappers) support
13 %bcond_with             big_tables      # enable '--with-big-tables', some performance loss on 32bit arch, but can do >= 4GB database tables.
14 #
15 %include        /usr/lib/rpm/macros.perl
16 Summary:        MySQL: a very fast and reliable SQL database engine
17 Summary(fr):    MySQL: un serveur SQL rapide et fiable
18 Summary(pl):    MySQL: bardzo szybka i niezawodna baza danych (SQL)
19 Summary(de):    MySQL: ist eine SQL-Datenbank
20 Summary(pt_BR): MySQL: Um servidor SQL rápido e confiável
21 Summary(ru):    MySQL - ÂÙÓÔÒÙÊ SQL-ÓÅÒ×ÅÒ
22 Summary(uk):    MySQL - Û×ÉÄËÉÊ SQL-ÓÅÒ×ÅÒ
23 Summary(zh_CN): MySQLÊý¾Ý¿â·þÎñÆ÷
24 Name:           mysql
25 Group:          Applications/Databases
26 Version:        4.1.12
27 Release:        1.4
28 License:        GPL + MySQL FLOSS Exception
29 Source0:        http://mysql.dataphone.se/Downloads/MySQL-4.1/%{name}-%{version}.tar.gz
30 # Source0-md5:  56a6f5cacd97ae290e07bbe19f279af1
31 Source1:        %{name}.init
32 Source2:        %{name}.sysconfig
33 Source3:        %{name}.logrotate
34 Source4:        %{name}d.conf
35 Source5:        %{name}-clusters.conf
36 Source6:        %{name}.monitrc
37 Source7:        %{name}-ndb.init
38 Source8:        %{name}-ndb.sysconfig
39 Source9:        %{name}-ndb-mgm.init
40 Source10:       %{name}-ndb-mgm.sysconfig
41 Source11:       %{name}-ndb-cpc.init
42 Source12:       %{name}-ndb-cpc.sysconfig
43 Source13:       %{name}-client.conf
44 Patch0:         %{name}-libs.patch
45 Patch1:         %{name}-libwrap.patch
46 Patch2:         %{name}-c++.patch
47 Patch3:         %{name}-info.patch
48 Patch4:         %{name}-sql-cxx-pic.patch
49 Patch5:         %{name}-noproc.patch
50 Patch6:         %{name}-fix_privilege_tables.patch
51 Patch7:         %{name}-align.patch
52 Patch8:         %{name}-client-config.patch
53 Icon:           mysql.gif
54 URL:            http://www.mysql.com/
55 #BuildRequires: ORBit-devel
56 BuildRequires:  autoconf
57 BuildRequires:  automake
58 %{?with_bdb:BuildRequires:      db3-devel}
59 BuildRequires:  libstdc++-devel >= 5:3.0
60 BuildRequires:  libtool
61 %{?with_tcpd:BuildRequires:     libwrap-devel}
62 BuildRequires:  ncurses-devel >= 4.2
63 %{?with_ssl:BuildRequires:      openssl-devel >= 0.9.7d}
64 BuildRequires:  perl-DBI
65 BuildRequires:  perl-devel >= 1:5.6.1
66 BuildRequires:  readline-devel >= 4.2
67 BuildRequires:  rpm-perlprov >= 4.1-13
68 BuildRequires:  rpmbuild(macros) >= 1.202
69 BuildRequires:  texinfo
70 BuildRequires:  zlib-devel
71 PreReq:         rc-scripts >= 0.2.0
72 Requires(pre):  /usr/bin/getgid
73 Requires(pre):  /bin/id
74 Requires(pre):  /usr/sbin/groupadd
75 Requires(pre):  /usr/sbin/useradd
76 Requires(postun):       /usr/sbin/userdel
77 Requires(postun):       /usr/sbin/groupdel
78 Requires(post,preun):   /sbin/chkconfig
79 Requires(triggerpostun):        sed >= 4.0
80 Requires:       %{name}-libs = %{version}-%{release}
81 Requires:       /usr/bin/setsid
82 Provides:       MySQL-server
83 Provides:       group(mysql)
84 Provides:       msqlormysql
85 Provides:       user(mysql)
86 Obsoletes:      MySQL
87 Obsoletes:      mysql-server
88 Obsoletes:      mysql-doc < 4.1.12
89 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
90
91 %define         _libexecdir     %{_sbindir}
92 %define         _localstatedir  /var/lib/mysql
93 %define         _mysqlhome      /home/services/mysql
94
95 %define         _noautoreqdep   'perl(DBD::mysql)'
96
97 %description
98 MySQL is a true multi-user, multi-threaded SQL (Structured Query
99 Language) database server. SQL is the most popular database language
100 in the world. MySQL is a client/server implementation that consists of
101 a server daemon mysqld and many different client programs/libraries.
102
103 The main goals of MySQL are speed, robustness and easy to use. MySQL
104 was originally developed because we at Tcx needed a SQL server that
105 could handle very big databases with magnitude higher speed than what
106 any database vendor could offer to us. We have now been using MySQL
107 since 1996 in a environment with more than 40 databases, 10,000
108 tables, of which more than 500 have more than 7 million rows. This is
109 about 50G of mission critical data.
110
111 The base upon which MySQL is built is a set of routines that have been
112 used in a highly demanding production environment for many years.
113 While MySQL is still in development, it already offers a rich and
114 highly useful function set.
115
116 %description -l fr
117 MySQL est un serveur de bases de donnees SQL vraiment multi-usagers et
118 multi-taches. Le langage SQL est le langage de bases de donnees le
119 plus populaire au monde. MySQL est une implementation client/serveur
120 qui consiste en un serveur (mysqld) et differents
121 programmes/bibliotheques clientes.
122
123 Les objectifs principaux de MySQL sont: vitesse, robustesse et
124 facilite d'utilisation. MySQL fut originalement developpe parce que
125 nous, chez Tcx, avions besoin d'un serveur SQL qui pouvait gerer de
126 tres grandes bases de donnees avec une vitesse d'un ordre de magnitude
127 superieur a ce que n'importe quel vendeur pouvait nous offrir. Nous
128 utilisons MySQL depuis 1996 dans un environnement avec plus de 40
129 bases de donnees, 10000 tables, desquelles plus de 500 ont plus de 7
130 millions de lignes. Ceci represente environ 50G de donnees critiques.
131
132 A la base de la conception de MySQL, on retrouve une serie de routines
133 qui ont ete utilisees dans un environnement de production pendant
134 plusieurs annees. Meme si MySQL est encore en developpement, il offre
135 deja une riche et utile serie de fonctions.
136
137 %description -l pl
138 MySQL to prawdziwie wielou¿ytkownikowy, wielow±tkowy serwer baz danych
139 SQL. SQL jest najpopularniejszym na ¶wiecie jêzykiem u¿ywanym do baz
140 danych. MySQL to implementacja klient/serwer sk³adaj±ca siê z demona
141 mysqld i wielu ró¿nych programów i bibliotek klienckich.
142
143 G³ównymi celami MySQL-a s± szybko¶æ, potêga i ³atwo¶æ u¿ytkowania.
144 MySQL oryginalnie by³ tworzony, poniewa¿ autorzy w Tcx potrzebowali
145 serwera SQL do obs³ugi bardzo du¿ych baz danych z szybko¶ci± o wiele
146 wiêksz±, ni¿ mogli zaoferowaæ inni producenci baz danych. U¿ywaj± go
147 od 1996 roku w ¶rodowisku z ponad 40 bazami danych, 10 000 tabel, z
148 których ponad 500 zawiera ponad 7 milionów rekordów - w sumie oko³o
149 50GB krytycznych danych.
150
151 Baza, na której oparty jest MySQL, sk³ada siê ze zbioru procedur,
152 które by³y u¿ywane w bardzo wymagaj±cym ¶rodowisku produkcyjnym przez
153 wiele lat. Pomimo, ¿e MySQL jest ci±gle rozwijany, ju¿ oferuje bogaty
154 i u¿yteczny zbiór funkcji.
155
156 %description -l de
157 MySQL ist eine SQL-Datenbank. Allerdings ist sie im Gegensatz zu
158 Oracle, DB2 oder PostgreSQL keine relationale Datenbank. Die Daten
159 werden zwar in zweidimensionalen Tabellen gespeichert und können mit
160 einem Primärschlüssel versehen werden. Es ist aber keine Definition
161 eines Fremdschlüssels möglich. Der Benutzer ist somit bei einer
162 MySQL-Datenbank völlig allein für die (referenzielle) Integrität der
163 Daten verantwortlich. Allein durch die Nutzung externer
164 Tabellenformate, wie InnoDB bzw Berkeley DB wird eine Relationalität
165 ermöglicht. Diese Projekte sind aber getrennt von MySQL zu betrachten.
166
167 %description -l pt_BR
168 O MySQL é um servidor de banco de dados SQL realmente multiusuário e
169 multi-tarefa. A linguagem SQL é a mais popular linguagem para banco de
170 dados no mundo. O MySQL é uma implementação cliente/servidor que
171 consiste de um servidor chamado mysqld e diversos
172 programas/bibliotecas clientes. Os principais objetivos do MySQL são:
173 velocidade, robustez e facilidade de uso. O MySQL foi originalmente
174 desenvolvido porque nós na Tcx precisávamos de um servidor SQL que
175 pudesse lidar com grandes bases de dados e com uma velocidade muito
176 maior do que a que qualquer vendedor podia nos oferecer. Estamos
177 usando o MySQL desde 1996 em um ambiente com mais de 40 bases de dados
178 com 10.000 tabelas, das quais mais de 500 têm mais de 7 milhões de
179 linhas. Isto é o equivalente a aproximadamente 50G de dados críticos.
180 A base da construção do MySQL é uma série de rotinas que foram usadas
181 em um ambiente de produção com alta demanda por muitos anos. Mesmo o
182 MySQL estando ainda em desenvolvimento, ele já oferece um conjunto de
183 funções muito ricas e úteis. Veja a documentação para maiores
184 informações.
185
186 %description -l ru
187 MySQL - ÜÔÏ SQL (Structured Query Language) ÓÅÒ×ÅÒ ÂÁÚÙ ÄÁÎÎÙÈ. MySQL
188 ÂÙÌÁ ÎÁÐÉÓÁÎÁ Michael'ÏÍ (monty) Widenius'ÏÍ. óÍ. ÆÁÊÌ CREDITS ×
189 ÄÉÓÔÒÉÂÕÔÉ×Å ÎÁ ÐÒÅÄÍÅÔ ÄÒÕÇÉÈ ÕÞÁÓÔÎÉËÏ× ÐÒÏÅËÔÁ É ÐÒÏÞÅÊ ÉÎÆÏÒÍÁÃÉÉ
190 Ï MySQL.
191
192 %description -l uk
193 MySQL - ÃÅ SQL (Structured Query Language) ÓÅÒ×ÅÒ ÂÁÚÉ ÄÁÎÉÈ. MySQL
194 ÂÕÌÏ ÎÁÐÉÓÁÎÏ Michael'ÏÍ (monty) Widenius'ÏÍ. äÉ×. ÆÁÊÌ CREDITS ×
195 ÄÉÓÔÒÉÂÕÔÉצ ÄÌÑ ¦ÎÆÏÒÍÁ槠ÐÒÏ ¦ÎÛÉÈ ÕÞÁÓÎÉ˦נÐÒÏÅËÔÕ ÔÁ ¦ÎÛϧ
196 ¦ÎÆÏÒÍÁæ§.
197
198 %package extras
199 Summary:        MySQL additional utilities
200 Summary(pl):    Dodatkowe narzêdzia do MySQL
201 Group:          Applications/Databases
202 Requires:       %{name}-libs = %{version}-%{release}
203
204 %description extras
205 MySQL additional utilities except Perl scripts (they may be found in
206 %{name}-extras-perl package).
207
208 %description extras -l pl
209 Dodatkowe narzêdzia do MySQL - z wyj±tkiem skryptów Perla (które s± w
210 pakiecie %{name}-extras-perl).
211
212 %package extras-perl
213 Summary:        MySQL additional utilities written in Perl
214 Summary(pl):    Dodatkowe narzêdzia do MySQL napisane w Perlu
215 Group:          Applications/Databases
216 Requires:       %{name}-extras = %{version}-%{release}
217 Requires:       perl(DBD::mysql)
218
219 %description extras-perl
220 MySQL additional utilities written in Perl.
221
222 %description extras-perl -l pl
223 Dodatkowe narzêdzia do MySQL napisane w Perlu.
224
225 %package client
226 Summary:        MySQL - Client
227 Summary(pl):    MySQL - Klient
228 Summary(pt):    MySQL - Cliente
229 Summary(ru):    MySQL ËÌÉÅÎÔ
230 Summary(uk):    MySQL Ë̦¤ÎÔ
231 Group:          Applications/Databases
232 Requires:       %{name}-libs = %{version}-%{release}
233 Obsoletes:      MySQL-client
234
235 %description client
236 This package contains the standard MySQL clients.
237
238 %description client -l fr
239 Ce package contient les clients MySQL standards.
240
241 %description client -l pl
242 Standardowe programy klienckie MySQL.
243
244 %description client -l pt_BR
245 Este pacote contém os clientes padrão para o MySQL.
246
247 %description client -l ru
248 üÔÏÔ ÐÁËÅÔ ÓÏÄÅÒÖÉÔ ÔÏÌØËÏ ËÌÉÅÎÔ MySQL.
249
250 %description client -l uk
251 ãÅÊ ÐÁËÅԠͦÓÔÉÔØ Ô¦ÌØËÉ Ë̦¤ÎÔÁ MySQL.
252
253 %package libs
254 Summary:        Shared libraries for MySQL
255 Summary(pl):    Biblioteki dzielone MySQL
256 Group:          Applications/Databases
257 Obsoletes:      libmysql10
258
259 %description libs
260 Shared libraries for MySQL.
261
262 %description libs -l pl
263 Biblioteki dzielone MySQL.
264
265 %package devel
266 Summary:        MySQL - Development header files and libraries
267 Summary(pl):    MySQL - Pliki nag³ówkowe i biblioteki dla programistów
268 Summary(pt):    MySQL - Medições de desempenho
269 Summary(ru):    MySQL - ÈÅÄÅÒÙ É ÂÉÂÌÉÏÔÅËÉ ÒÁÚÒÁÂÏÔÞÉËÁ
270 Summary(uk):    MySQL - ÈÅÄÅÒÉ ÔÁ Â¦Â̦ÏÔÅËÉ ÐÒÏÇÒÁͦÓÔÁ
271 Group:          Development/Libraries
272 Requires:       %{name}-libs = %{version}-%{release}
273 %{?with_ssl:Requires:   openssl-devel}
274 Requires:       zlib-devel
275 Obsoletes:      MySQL-devel
276 Obsoletes:      libmysql10-devel
277
278 %description devel
279 This package contains the development header files and libraries
280 necessary to develop MySQL client applications.
281
282 %description devel -l fr
283 Ce package contient les fichiers entetes et les librairies de
284 developpement necessaires pour developper des applications clientes
285 MySQL.
286
287 %description devel -l pl
288 Pliki nag³ówkowe i biblioteki konieczne do kompilacji aplikacji
289 klienckich MySQL.
290
291 %description devel -l pt_BR
292 Este pacote contém os arquivos de cabeçalho (header files) e
293 bibliotecas necessárias para desenvolver aplicações clientes do MySQL.
294
295 %description devel -l ru
296 üÔÏÔ ÐÁËÅÔ ÓÏÄÅÒÖÉÔ ÈÅÄÅÒÙ É ÂÉÂÌÉÏÔÅËÉ ÒÁÚÒÁÂÏÔÞÉËÁ, ÎÅÏÂÈÏÄÉÍÙÅ ÄÌÑ
297 ÒÁÚÒÁÂÏÔËÉ ËÌÉÅÎÔÓËÉÈ ÐÒÉÌÏÖÅÎÉÊ.
298
299 %description devel -l uk
300 ãÅÊ ÐÁËÅԠͦÓÔÉÔØ ÈÅÄÅÒÉ ÔÁ Â¦Â̦ÏÔÅËÉ ÐÒÏÇÒÁͦÓÔÁ, ÎÅÏÂȦÄΦ ÄÌÑ
301 ÒÏÚÒÏÂËÉ ÐÒÏÇÒÁÍ-Ë̦¤ÎÔ¦×.
302
303 %package static
304 Summary:        MySQL static libraries
305 Summary(pl):    Biblioteki statyczne MySQL
306 Summary(ru):    MySQL - ÓÔÁÔÉÞÅÓËÉÅ ÂÉÂÌÉÏÔÅËÉ
307 Summary(uk):    MySQL - ÓÔÁÔÉÞΦ Â¦Â̦ÏÔÅËÉ
308 Group:          Development/Libraries
309 Requires:       %{name}-devel = %{version}-%{release}
310 Obsoletes:      MySQL-static
311
312 %description static
313 MySQL static libraries.
314
315 %description static -l pl
316 Biblioteki statyczne MySQL.
317
318 %description static -l ru
319 üÔÏÔ ÐÁËÅÔ ÓÏÄÅÒÖÉÔ ÓÔÁÔÉÞÅÓËÉÅ ÂÉÂÌÉÏÔÅËÉ ÒÁÚÒÁÂÏÔÞÉËÁ, ÎÅÏÂÈÏÄÉÍÙÅ
320 ÄÌÑ ÒÁÚÒÁÂÏÔËÉ ËÌÉÅÎÔÓËÉÈ ÐÒÉÌÏÖÅÎÉÊ.
321
322 %description static -l uk
323 ãÅÊ ÐÁËÅԠͦÓÔÉÔØ ÓÔÁÔÉÞΦ Â¦Â̦ÏÔÅËÉ ÐÒÏÇÒÁͦÓÔÁ, ÎÅÏÂȦÄΦ ÄÌÑ
324 ÒÏÚÒÏÂËÉ ÐÒÏÇÒÁÍ-Ë̦¤ÎÔ¦×.
325
326 %package bench
327 Summary:        MySQL - Benchmarks
328 Summary(pl):    MySQL - Programy testuj±ce szybko¶æ dzia³ania bazy
329 Summary(pt):    MySQL - Medições de desempenho
330 Summary(ru):    MySQL - ÂÅÎÞÍÁÒËÉ
331 Summary(uk):    MySQL - ÂÅÎÞÍÁÒËÉ
332 Group:          Applications/Databases
333 Requires:       %{name} = %{version}-%{release}
334 Requires:       %{name}-client
335 Requires:       perl(DBD::mysql)
336 Obsoletes:      MySQL-bench
337
338 %description bench
339 This package contains MySQL benchmark scripts and data.
340
341 %description bench -l pl
342 Programy testuj±ce szybko¶æ serwera MySQL.
343
344 %description bench -l pt_BR
345 Este pacote contém medições de desempenho de scripts e dados do MySQL.
346
347 %description bench -l ru
348 üÔÏÔ ÐÁËÅÔ ÓÏÄÅÒÖÉÔ ÓËÒÉÐÔÙ É ÄÁÎÎÙÅ ÄÌÑ ÏÃÅÎËÉ ÐÒÏÉÚ×ÏÄÉÔÅÌØÎÏÓÔÉ
349 MySQL.
350
351 %description bench -l uk
352 ãÅÊ ÐÁËÅԠͦÓÔÉÔØ ÓËÒÉÐÔÉ ÔÁ ÄÁΦ ÄÌÑ ÏæÎËÉ ÐÒÏÄÕËÔÉ×ÎÏÓÔ¦ MySQL.
353
354 %package doc
355 Summary:        MySQL manual
356 Summary(pl):    Podrêcznik u¿ytkownika MySQL
357 Group:          Applications/Databases
358
359 %description doc
360 This package contains manual in HTML format.
361
362 %description doc -l pl
363 Podrêcznik MySQL-a w formacie HTML.
364
365 %package ndb
366 Summary:        MySQL - NDB Storage Engine Daemon
367 Summary(pl):    MySQL - demon silnika przechowywania danych NDB
368 Group:          Applications/Databases
369 Requires:       %{name}-libs = %{version}-%{release}
370
371 %description ndb
372 This package contains the standard MySQL NDB Storage Engine Daemon.
373
374 %description ndb -l pl
375 Ten pakiet zawiera standardowego demona silnika przechowywania danych
376 NDB.
377
378 %package ndb-client
379 Summary:        MySQL - NDB Clients
380 Summary(pl):    MySQL - programy klienckie NDB
381 Group:          Applications/Databases
382 Requires:       %{name}-libs = %{version}-%{release}
383
384 %description ndb-client
385 This package contains the standard MySQL NDB Clients.
386
387 %description ndb-client -l pl
388 Ten pakiet zawiera standardowe programy klienckie MySQL NDB.
389
390 %package ndb-mgm
391 Summary:        MySQL - NDB Management Daemon
392 Summary(pl):    MySQL - demon zarz±dzaj±cy NDB
393 Group:          Applications/Databases
394 Requires:       %{name}-libs = %{version}-%{release}
395
396 %description ndb-mgm
397 This package contains the standard MySQL NDB Management Daemon.
398
399 %description ndb-mgm -l pl
400 Ten pakiet zawiera standardowego demona zarz±dzaj±cego MySQL NDB.
401
402 %package ndb-cpc
403 Summary:        MySQL - NDB CPC Daemon
404 Summary(pl):    MySQL - demon NDB CPC
405 Group:          Applications/Databases
406 Requires:       %{name}-libs = %{version}-%{release}
407
408 %description ndb-cpc
409 This package contains the standard MySQL NDB CPC Daemon.
410
411 %description ndb-cpc -l pl
412 Ten pakiet zawiera standardowego demona MySQL NDB CPC.
413
414 %prep
415 %setup -q
416 %patch0 -p1
417 %{?with_tcpd:%patch1 -p1}
418 %patch2 -p1
419 %patch3 -p1
420 %ifarch alpha
421 # this is strange: mysqld functions for UDF modules are not explicitly defined,
422 # so -rdynamic is used; in such case gcc3+ld on alpha doesn't like C++ vtables
423 # in objects compiled without -fPIC
424 %patch4 -p1
425 %endif
426 %patch5 -p1
427 %patch6 -p1
428 %patch7 -p1
429 %patch8 -p1
430
431 %{__perl} -pi -e 's@(ndb_bin_am_ldflags)="-static"@$1=""@' configure.in
432
433 %build
434 %{__libtoolize}
435 %{__aclocal}
436 %{__automake}
437 %{__autoconf}
438 # The compiler flags are as per their "official" spec ;)
439 CXXFLAGS="%{rpmcflags} -felide-constructors -fno-rtti -fno-exceptions %{!?debug:-fomit-frame-pointer}"
440 CFLAGS="%{rpmcflags} %{!?debug:-fomit-frame-pointer}"
441
442 # NOTE: the PS, FIND_PROC, KILL, CHECK_PID are not used by PLD Linux
443 # and therefore do not add BR on these. These are here just to satisfy
444 # configure.
445 %configure \
446         PS='/bin/ps' \
447         FIND_PROC='/bin/ps p $$PID' \
448         KILL='/bin/kill' \
449         CHECK_PID='/bin/kill -0 $$PID' \
450         --enable-assembler \
451         --enable-shared \
452         --enable-static \
453         --enable-thread-safe-client \
454         --with%{!?with_bdb:out}-berkeley-db \
455         --with%{!?with_innodb:out}-innodb \
456         --with%{!?with_isam:out}-isam \
457         --with%{!?with_raid:out}-raid \
458         --with%{!?with_ssl:out}-openssl \
459         --with%{!?with_tcpd:out}-libwrap \
460         %{?with_big_tables:--with-big-tables} \
461         --with-comment="PLD Linux Distribution MySQL RPM" \
462         --with%{!?debug:out}-debug \
463         --with-embedded-server \
464         --with-extra-charsets=all \
465         --with-low-memory \
466         --with-mysqld-user=mysql \
467         --with-named-curses-libs="-lncurses" \
468         --with-named-thread-libs="-lpthread" \
469         --with-unix-socket-path=/var/lib/mysql/mysql.sock \
470         --with-vio \
471         --with-ndbcluster \
472         --without-readline \
473         --without-libedit \
474         --without-docs
475 #       --with-mysqlfs
476 #       --with-ndb-test --with-ndb-docs
477
478 # NOTE that /var/lib/mysql/mysql.sock is symlink to real sock file
479 # (it defaults to first cluster but user may change it to whatever
480 # cluster it wants)
481
482 echo -e "all:\ninstall:\nclean:\nlink_sources:\n" > libmysqld/examples/Makefile
483
484 %{__make} \
485         benchdir=$RPM_BUILD_ROOT%{_datadir}/sql-bench
486
487 %{__make} -C Docs mysql.info
488
489 %install
490 rm -rf $RPM_BUILD_ROOT
491 install -d $RPM_BUILD_ROOT/etc/{logrotate.d,rc.d/init.d,sysconfig,mysql,monit} \
492            $RPM_BUILD_ROOT/var/{log/{archiv,}/mysql,lib/mysql} \
493            $RPM_BUILD_ROOT{%{_infodir},%{_mysqlhome}}
494
495 %if %{with bdb}
496 install -d $RPM_BUILD_ROOT/var/lib/mysql/bdb/{log,tmp}
497 %endif
498
499 # Make install
500 %{__make} install \
501         DESTDIR=$RPM_BUILD_ROOT \
502         benchdir=%{_datadir}/sql-bench \
503         libsdir=/tmp
504 # libsdir is to avoid installing innodb static libs in $RPM_BUILD_ROOT../libs
505
506 install Docs/mysql.info $RPM_BUILD_ROOT%{_infodir}
507
508 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql
509 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/mysql
510 install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/mysql
511 # This is template for configuration file which is created after 'service mysql init'
512 install %{SOURCE4} mysqld.conf
513 install %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/mysql/clusters.conf
514 install %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/monit
515 touch $RPM_BUILD_ROOT/var/log/mysql/{err,log,update,isamlog.log}
516
517 # remove innodb directives from mysqld.conf if mysqld is configured without
518 %if %{without innodb}
519         cp mysqld.conf mysqld.tmp
520         awk 'BEGIN { RS="\n\n" } !/innodb/ { printf("%s\n\n", $0) }' < mysqld.tmp > mysqld.conf
521 %endif
522
523 # remove berkeley-db directives from mysqld.conf if mysqld is configured without
524 %if %{without bdb}
525         cp mysqld.conf mysqld.tmp
526         awk 'BEGIN { RS="\n\n" } !/bdb/ { printf("%s\n\n", $0) }' < mysqld.tmp > mysqld.conf
527 %endif
528
529 install mysqld.conf $RPM_BUILD_ROOT%{_datadir}/mysql/mysqld.conf
530 install %{SOURCE13} $RPM_BUILD_ROOT%{_sysconfdir}/mysql/mysql-client.conf
531
532 # NDB
533 install %{SOURCE7} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql-ndb
534 install %{SOURCE8} $RPM_BUILD_ROOT/etc/sysconfig/mysql-ndb
535 install %{SOURCE9} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql-ndb-mgm
536 install %{SOURCE10} $RPM_BUILD_ROOT/etc/sysconfig/mysql-ndb-mgm
537 install %{SOURCE11} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql-ndb-cpc
538 install %{SOURCE12} $RPM_BUILD_ROOT/etc/sysconfig/mysql-ndb-cpc
539
540 # remove .txt variants for .sys messages
541 rm -f $RPM_BUILD_ROOT%{_datadir}/%{name}/*/*.txt
542
543 mv -f $RPM_BUILD_ROOT%{_libdir}/mysql/lib* $RPM_BUILD_ROOT%{_libdir}
544 %{__perl} -pi -e 's,%{_libdir}/mysql,%{_libdir},;' $RPM_BUILD_ROOT%{_libdir}/libmysqlclient.la
545
546 # remove known unpackaged files
547 rm -rf $RPM_BUILD_ROOT%{_prefix}/mysql-test
548
549 # rename not to be so generic name
550 mv $RPM_BUILD_ROOT%{_bindir}/{,mysql_}comp_err
551 mv $RPM_BUILD_ROOT%{_bindir}/{,mysql_}resolve_stack_dump
552
553 # not our OS
554 rm $RPM_BUILD_ROOT%{_bindir}/make_win_*_distribution
555 rm $RPM_BUILD_ROOT%{_datadir}/%{name}/*.plist
556 # unuseful stuff
557 rm $RPM_BUILD_ROOT%{_datadir}/%{name}/*.spec
558
559 # functionality in initscript / rpm
560 rm $RPM_BUILD_ROOT%{_bindir}/mysql_create_system_tables
561 rm $RPM_BUILD_ROOT%{_bindir}/mysql_install_db
562 rm $RPM_BUILD_ROOT%{_bindir}/mysqld_safe
563 rm $RPM_BUILD_ROOT%{_bindir}/mysqld_multi
564 rm $RPM_BUILD_ROOT%{_mandir}/man1/mysqld_{multi,safe}*
565 rm $RPM_BUILD_ROOT%{_datadir}/%{name}/fill_help_tables.sql
566 rm $RPM_BUILD_ROOT%{_datadir}/%{name}/mysql-log-rotate
567 rm $RPM_BUILD_ROOT%{_datadir}/%{name}/mysql.server
568 rm $RPM_BUILD_ROOT%{_datadir}/%{name}/{pre,post}install
569 rm $RPM_BUILD_ROOT%{_bindir}/mysql_waitpid
570
571 # in %doc
572 rm $RPM_BUILD_ROOT%{_datadir}/%{name}/*.{ini,cnf}
573
574 %clean
575 rm -rf $RPM_BUILD_ROOT
576
577 %pre
578 %groupadd -g 89 mysql
579 %useradd -u 89 -d %{_mysqlhome} -s /bin/sh -g mysql -c "MySQL Server" mysql
580
581 %post
582 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
583 /sbin/chkconfig --add mysql
584 if [ -f /var/lock/subsys/mysql ]; then
585         /etc/rc.d/init.d/mysql restart >&2 || :
586 else
587         echo "Run \"/etc/rc.d/init.d/mysql start\" to start mysql." >&2
588 fi
589
590 %preun
591 if [ "$1" = "0" ]; then
592         if [ -f /var/lock/subsys/mysql ]; then
593                 /etc/rc.d/init.d/mysql stop
594         fi
595         /sbin/chkconfig --del mysql
596 fi
597
598 %postun
599 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
600 if [ "$1" = "0" ]; then
601         %userremove mysql
602         %groupremove mysql
603 fi
604
605 %post ndb
606 /sbin/chkconfig --add mysql-ndb
607 if [ -f /var/lock/subsys/mysql-ndb ]; then
608         /etc/rc.d/init.d/mysql-ndb restart >&2
609 else
610         echo "Run \"/etc/rc.d/init.d/mysql-ndb start\" to start mysql NDB engine." >&2
611 fi
612
613 %preun ndb
614 if [ "$1" = "0" ]; then
615         if [ -f /var/lock/subsys/mysql-ndb ]; then
616                 /etc/rc.d/init.d/mysql-ndb stop
617         fi
618         /sbin/chkconfig --del mysql-ndb
619 fi
620
621 %post ndb-mgm
622 /sbin/chkconfig --add mysql-ndb-mgm
623 if [ -f /var/lock/subsys/mysql-ndb-mgm ]; then
624         /etc/rc.d/init.d/mysql-ndb-mgm restart >&2
625 else
626         echo "Run \"/etc/rc.d/init.d/mysql-ndb-mgm start\" to start mysql NDB management node." >&2
627 fi
628
629 %preun ndb-mgm
630 if [ "$1" = "0" ]; then
631         if [ -f /var/lock/subsys/mysql-ndb-mgm ]; then
632                 /etc/rc.d/init.d/mysql-ndb-mgm stop
633         fi
634         /sbin/chkconfig --del mysql-ndb-mgm
635 fi
636
637 %post ndb-cpc
638 /sbin/chkconfig --add mysql-ndb-cpc
639 if [ -f /var/lock/subsys/mysql-ndb-cpc ]; then
640         /etc/rc.d/init.d/mysql-ndb-cpc restart >&2
641 else
642         echo "Run \"/etc/rc.d/init.d/mysql-ndb-cpc start\" to start mysql NDB CPC." >&2
643 fi
644
645 %preun ndb-cpc
646 if [ "$1" = "0" ]; then
647         if [ -f /var/lock/subsys/mysql-ndb-cpc ]; then
648                 /etc/rc.d/init.d/mysql-ndb-cpc stop
649         fi
650         /sbin/chkconfig --del mysql-ndb-cpc
651 fi
652
653 %post   libs -p /sbin/ldconfig
654 %postun libs -p /sbin/ldconfig
655
656 %triggerpostun -- mysql <= 4.0.20-2
657 # For clusters in /etc/mysql/clusters.conf
658 if [ -f "/etc/sysconfig/mysql" ]; then
659         . /etc/sysconfig/mysql
660         if [ -n "$MYSQL_DB_CLUSTERS" ]; then
661                 for i in "$MYSQL_DB_CLUSTERS"; do
662                         echo "$i/mysqld.conf=$i" >> /etc/mysql/clusters.conf
663                 done
664                 echo "# Do not use **obsolete** option MYSQL_DB_CLUSTERS" >> /etc/sysconfig/mysql
665                 echo "# USE /etc/mysql/clusters.conf instead" >> /etc/sysconfig/mysql
666                 echo "Converted clusters from MYSQL_DB_CLUSTERS to /etc/mysql/clusters.conf."
667                 echo "You NEED to fix your /etc/sysconfig/mysql and verify /etc/mysql/clusters.conf."
668         fi
669 fi
670
671 %triggerpostun -- mysql <= 4.1.1
672 # For better compatibility with prevoius versions:
673 for config in $(awk -F= '!/^#/ && /=/{print $1}' /etc/mysql/clusters.conf); do
674         if echo "$config" | grep -q '^/'; then
675                 config_file="$config"
676         elif [ -f "/etc/mysql/$config" ]; then
677                 config_file=/etc/mysql/$config
678         else
679                 clusterdir=$(awk -F= "/^$config/{print \$2}" /etc/mysql/clusters.conf)
680                 config_file="$clusterdir/mysqld.conf"
681         fi
682         echo "Adding option old-passwords to config: $config_file"
683         echo "If you want to use new, better passwords - remove it"
684
685         # sed magic to add 'old-passwords' to [mysqld] section
686         sed -i -e '/./{H;$!d;};x;/\[mysqld\]/{
687                 a
688                 a; Compatibility options:
689                 aold-passwords
690         }
691         ' $config_file
692 done
693
694 %files
695 %defattr(644,root,root,755)
696 %doc support-files/*.cnf support-files/*.ini scripts/fill_help_tables.sql
697 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/mysql
698 %attr(754,root,root) /etc/rc.d/init.d/mysql
699 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mysql
700 %attr(640,root,mysql) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mysql/clusters.conf
701 %attr(750,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/monit/*.monitrc
702 %attr(755,root,root) %{_bindir}/isamchk
703 %attr(755,root,root) %{_bindir}/isamlog
704 %attr(755,root,root) %{_bindir}/myisamchk
705 %attr(755,root,root) %{_bindir}/myisamlog
706 %attr(755,root,root) %{_bindir}/myisampack
707 %attr(755,root,root) %{_bindir}/mysql_fix_privilege_tables
708 %attr(755,root,root) %{_bindir}/pack_isam
709 %attr(755,root,root) %{_bindir}/my_print_defaults
710 %attr(755,root,root) %{_sbindir}/mysqld
711 %{_mandir}/man1/isamchk.1*
712 %{_mandir}/man1/isamlog.1*
713 %{_mandir}/man1/mysql_fix_privilege_tables.1*
714 %{_mandir}/man1/mysqld.1*
715
716 %attr(700,mysql,mysql) %{_mysqlhome}
717 # root:root is proper here for AC mysql.rpm while mysql:mysql is potential security hole
718 %attr(751,root,root) /var/lib/mysql
719 %attr(750,mysql,mysql) %dir /var/log/mysql
720 %attr(750,mysql,mysql) %dir /var/log/archiv/mysql
721 %attr(640,mysql,mysql) %config(noreplace) %verify(not md5 mtime size) /var/log/mysql/*
722
723 %{_infodir}/mysql.info*
724 %dir %{_datadir}/mysql
725 # This is template for configuration file which is created after 'service mysql init'
726 %{_datadir}/mysql/mysqld.conf
727 %{_datadir}/mysql/charsets
728 %{_datadir}/mysql/english
729 %{_datadir}/mysql/mysql_fix_privilege_tables.sql
730 %lang(cs) %{_datadir}/mysql/czech
731 %lang(da) %{_datadir}/mysql/danish
732 %lang(de) %{_datadir}/mysql/german
733 %lang(el) %{_datadir}/mysql/greek
734 %lang(es) %{_datadir}/mysql/spanish
735 %lang(et) %{_datadir}/mysql/estonian
736 %lang(fr) %{_datadir}/mysql/french
737 %lang(hu) %{_datadir}/mysql/hungarian
738 %lang(it) %{_datadir}/mysql/italian
739 %lang(ja) %{_datadir}/mysql/japanese
740 %lang(ja) %{_datadir}/mysql/japanese-sjis
741 %lang(ko) %{_datadir}/mysql/korean
742 %lang(nl) %{_datadir}/mysql/dutch
743 %lang(nb) %{_datadir}/mysql/norwegian
744 %lang(nn) %{_datadir}/mysql/norwegian-ny
745 %lang(pl) %{_datadir}/mysql/polish
746 %lang(pt) %{_datadir}/mysql/portuguese
747 %lang(ro) %{_datadir}/mysql/romanian
748 %lang(ru) %{_datadir}/mysql/russian
749 %lang(sr) %{_datadir}/mysql/serbian
750 %lang(sk) %{_datadir}/mysql/slovak
751 %lang(sv) %{_datadir}/mysql/swedish
752 %lang(uk) %{_datadir}/mysql/ukrainian
753
754 %files extras
755 %defattr(644,root,root,755)
756 %attr(755,root,root) %{_bindir}/msql2mysql
757 %attr(755,root,root) %{_bindir}/perror
758 %attr(755,root,root) %{_bindir}/replace
759 %attr(755,root,root) %{_bindir}/resolveip
760 %attr(755,root,root) %{_bindir}/myisam_ftdump
761 %attr(755,root,root) %{_bindir}/mysql_secure_installation
762 %attr(755,root,root) %{_bindir}/mysql_tzinfo_to_sql
763 %attr(755,root,root) %{_bindir}/mysqlcheck
764 %{_mandir}/man1/perror.1*
765 %{_mandir}/man1/replace.1*
766
767 %files extras-perl
768 %defattr(644,root,root,755)
769 %attr(755,root,root) %{_bindir}/mysql_convert_table_format
770 %attr(755,root,root) %{_bindir}/mysqldumpslow
771 %attr(755,root,root) %{_bindir}/mysqlhotcopy
772 %attr(755,root,root) %{_bindir}/mysql_setpermission
773 %attr(755,root,root) %{_bindir}/mysql_zap
774 %attr(755,root,root) %{_bindir}/mysql_find_rows
775 %attr(755,root,root) %{_bindir}/mysqlaccess
776 %attr(755,root,root) %{_bindir}/mysql_fix_extensions
777 %attr(755,root,root) %{_bindir}/mysql_explain_log
778 %attr(755,root,root) %{_bindir}/mysql_tableinfo
779 %{_mandir}/man1/mysql_zap.1*
780 %{_mandir}/man1/mysqlaccess.1*
781
782 %files client
783 %defattr(644,root,root,755)
784 %attr(755,root,root) %{_bindir}/mysql
785 %attr(755,root,root) %{_bindir}/mysqlbug
786 %attr(755,root,root) %{_bindir}/mysqldump
787 %attr(755,root,root) %{_bindir}/mysqlimport
788 %attr(755,root,root) %{_bindir}/mysqlmanager*
789 %attr(755,root,root) %{_bindir}/mysqlshow
790 %attr(755,root,root) %{_bindir}/mysqlbinlog
791 %attr(755,root,root) %{_bindir}/mysqladmin
792 %{_mandir}/man1/mysql.1*
793 %{_mandir}/man1/mysqladmin.1*
794 %{_mandir}/man1/mysqldump.1*
795 %{_mandir}/man1/mysqlshow.1*
796
797 %files libs
798 %defattr(644,root,root,755)
799 %doc EXCEPTIONS-CLIENT
800 %attr(755,root,root) %{_libdir}/lib*.so.*.*
801 %attr(751,root,root) %dir %{_sysconfdir}/mysql
802 %attr(644,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mysql/mysql-client.conf
803
804 %files devel
805 %defattr(644,root,root,755)
806 %attr(755,root,root) %{_bindir}/mysql_config
807 %attr(755,root,root) %{_libdir}/lib*.so
808 %attr(755,root,root) %{_bindir}/*comp_err
809 %attr(755,root,root) %{_bindir}/*resolve_stack_dump
810 %{_libdir}/lib*.la
811 %{_libdir}/lib*[!tr].a
812 %{_includedir}/mysql
813
814 %files static
815 %defattr(644,root,root,755)
816 %{_libdir}/lib*[tr].a
817
818 %files bench
819 %defattr(644,root,root,755)
820 %attr(755,root,root) %{_bindir}/mysqltest
821 %attr(755,root,root) %{_bindir}/mysql_client_test
822 %dir %{_datadir}/sql-bench
823 %{_datadir}/sql-bench/[CDRl]*
824 %attr(755,root,root) %{_datadir}/sql-bench/[bcgirst]*
825 # wrong dir?
826 %{_datadir}/mysql/mi_test_all.res
827 %attr(755,root,root) %{_datadir}/mysql/mi_test_all
828
829 #%files doc
830 #%defattr(644,root,root,755)
831 #%doc Docs/manual.html Docs/manual_toc.html
832
833 %files ndb
834 %defattr(644,root,root,755)
835 %attr(755,root,root) %{_sbindir}/ndbd
836 %attr(754,root,root) /etc/rc.d/init.d/mysql-ndb
837 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mysql-ndb
838
839 %files ndb-client
840 %defattr(644,root,root,755)
841 %attr(755,root,root) %{_bindir}/ndb_*
842
843 %files ndb-mgm
844 %defattr(644,root,root,755)
845 %attr(755,root,root) %{_sbindir}/ndb_mgmd
846 %attr(754,root,root) /etc/rc.d/init.d/mysql-ndb-mgm
847 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mysql-ndb-mgm
848
849 %files ndb-cpc
850 %defattr(644,root,root,755)
851 %attr(755,root,root) %{_sbindir}/ndb_cpcd
852 %attr(754,root,root) /etc/rc.d/init.d/mysql-ndb-cpc
853 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mysql-ndb-cpc
This page took 0.146519 seconds and 4 git commands to generate.