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