]> git.pld-linux.org Git - packages/mysql.git/blob - mysql.spec
- set collation to latin2-like, too.
[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.2
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-charset=latin2 \
461         --with-collation=latin2_general_ci \
462         --with-extra-charsets=all \
463         --with-low-memory \
464         --with-mysqld-user=mysql \
465         --with-named-curses-libs="-lncurses" \
466         --with-named-thread-libs="-lpthread" \
467         --with-unix-socket-path=/var/lib/mysql/mysql.sock \
468         --with-vio \
469         --with-ndbcluster \
470         --without-readline \
471         --without-libedit \
472         --without-docs
473 #       --with-mysqlfs
474 #       --with-ndb-test --with-ndb-docs
475
476 # NOTE that /var/lib/mysql/mysql.sock is symlink to real sock file
477 # (it defaults to first cluster but user may change it to whatever
478 # cluster it wants)
479
480 echo -e "all:\ninstall:\nclean:\nlink_sources:\n" > libmysqld/examples/Makefile
481
482 %{__make} \
483         benchdir=$RPM_BUILD_ROOT%{_datadir}/sql-bench
484
485 %{__make} -C Docs mysql.info
486
487 %install
488 rm -rf $RPM_BUILD_ROOT
489 install -d $RPM_BUILD_ROOT/etc/{logrotate.d,rc.d/init.d,sysconfig,mysql,monit} \
490            $RPM_BUILD_ROOT/var/{log/{archiv,}/mysql,lib/mysql} \
491            $RPM_BUILD_ROOT{%{_infodir},%{_mysqlhome}}
492
493 %if %{with bdb}
494 install -d $RPM_BUILD_ROOT/var/lib/mysql/bdb/{log,tmp}
495 %endif
496
497 # Make install
498 %{__make} install \
499         DESTDIR=$RPM_BUILD_ROOT \
500         benchdir=%{_datadir}/sql-bench \
501         libsdir=/tmp
502 # libsdir is to avoid installing innodb static libs in $RPM_BUILD_ROOT../libs
503
504 install Docs/mysql.info $RPM_BUILD_ROOT%{_infodir}
505
506 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql
507 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/mysql
508 install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/mysql
509 # This is template for configuration file which is created after 'service mysql init'
510 install %{SOURCE4} mysqld.conf
511 install %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/mysql/clusters.conf
512 install %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/monit
513 touch $RPM_BUILD_ROOT/var/log/mysql/{err,log,update,isamlog.log}
514
515 # remove innodb directives from mysqld.conf if mysqld is configured without
516 %if %{without innodb}
517         cp mysqld.conf mysqld.tmp
518         awk 'BEGIN { RS="\n\n" } !/innodb/ { printf("%s\n\n", $0) }' < mysqld.tmp > mysqld.conf
519 %endif
520
521 # remove berkeley-db directives from mysqld.conf if mysqld is configured without
522 %if %{without bdb}
523         cp mysqld.conf mysqld.tmp
524         awk 'BEGIN { RS="\n\n" } !/bdb/ { printf("%s\n\n", $0) }' < mysqld.tmp > mysqld.conf
525 %endif
526
527 install mysqld.conf $RPM_BUILD_ROOT%{_datadir}/mysql/mysqld.conf
528
529 # NDB
530 install %{SOURCE7} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql-ndb
531 install %{SOURCE8} $RPM_BUILD_ROOT/etc/sysconfig/mysql-ndb
532 install %{SOURCE9} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql-ndb-mgm
533 install %{SOURCE10} $RPM_BUILD_ROOT/etc/sysconfig/mysql-ndb-mgm
534 install %{SOURCE11} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql-ndb-cpc
535 install %{SOURCE12} $RPM_BUILD_ROOT/etc/sysconfig/mysql-ndb-cpc
536
537 # remove .txt variants for .sys messages
538 rm -f $RPM_BUILD_ROOT%{_datadir}/%{name}/*/*.txt
539
540 mv -f $RPM_BUILD_ROOT%{_libdir}/mysql/lib* $RPM_BUILD_ROOT%{_libdir}
541 %{__perl} -pi -e 's,%{_libdir}/mysql,%{_libdir},;' $RPM_BUILD_ROOT%{_libdir}/libmysqlclient.la
542
543 # remove known unpackaged files
544 rm -rf $RPM_BUILD_ROOT%{_prefix}/mysql-test
545
546 # rename not to be so generic name
547 mv $RPM_BUILD_ROOT%{_bindir}/{,mysql_}comp_err
548 mv $RPM_BUILD_ROOT%{_bindir}/{,mysql_}resolve_stack_dump
549
550 # not our OS
551 rm $RPM_BUILD_ROOT%{_bindir}/make_win_*_distribution
552 rm $RPM_BUILD_ROOT%{_datadir}/%{name}/*.plist
553 # unuseful stuff
554 rm $RPM_BUILD_ROOT%{_datadir}/%{name}/*.spec
555
556 # functionality in initscript / rpm
557 rm $RPM_BUILD_ROOT%{_bindir}/mysql_create_system_tables
558 rm $RPM_BUILD_ROOT%{_bindir}/mysql_install_db
559 rm $RPM_BUILD_ROOT%{_bindir}/mysqld_safe
560 rm $RPM_BUILD_ROOT%{_bindir}/mysqld_multi
561 rm $RPM_BUILD_ROOT%{_mandir}/man1/mysqld_{multi,safe}*
562 rm $RPM_BUILD_ROOT%{_datadir}/%{name}/fill_help_tables.sql
563 rm $RPM_BUILD_ROOT%{_datadir}/%{name}/mysql-log-rotate
564 rm $RPM_BUILD_ROOT%{_datadir}/%{name}/mysql.server
565 rm $RPM_BUILD_ROOT%{_datadir}/%{name}/{pre,post}install
566 rm $RPM_BUILD_ROOT%{_bindir}/mysql_waitpid
567
568 # in %doc
569 rm $RPM_BUILD_ROOT%{_datadir}/%{name}/*.{ini,cnf}
570
571 %clean
572 rm -rf $RPM_BUILD_ROOT
573
574 %pre
575 %groupadd -g 89 mysql
576 %useradd -u 89 -d %{_mysqlhome} -s /bin/sh -g mysql -c "MySQL Server" mysql
577
578 %post
579 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
580 /sbin/chkconfig --add mysql
581 if [ -f /var/lock/subsys/mysql ]; then
582         /etc/rc.d/init.d/mysql restart >&2
583 else
584         echo "Run \"/etc/rc.d/init.d/mysql start\" to start mysql." >&2
585 fi
586
587 %preun
588 if [ "$1" = "0" ]; then
589         if [ -f /var/lock/subsys/mysql ]; then
590                 /etc/rc.d/init.d/mysql stop
591         fi
592         /sbin/chkconfig --del mysql
593 fi
594
595 %postun
596 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
597 if [ "$1" = "0" ]; then
598         %userremove mysql
599         %groupremove mysql
600 fi
601
602 %post ndb
603 /sbin/chkconfig --add mysql-ndb
604 if [ -f /var/lock/subsys/mysql-ndb ]; then
605         /etc/rc.d/init.d/mysql-ndb restart >&2
606 else
607         echo "Run \"/etc/rc.d/init.d/mysql-ndb start\" to start mysql NDB engine." >&2
608 fi
609
610 %preun ndb
611 if [ "$1" = "0" ]; then
612         if [ -f /var/lock/subsys/mysql-ndb ]; then
613                 /etc/rc.d/init.d/mysql-ndb stop
614         fi
615         /sbin/chkconfig --del mysql-ndb
616 fi
617
618 %post ndb-mgm
619 /sbin/chkconfig --add mysql-ndb-mgm
620 if [ -f /var/lock/subsys/mysql-ndb-mgm ]; then
621         /etc/rc.d/init.d/mysql-ndb-mgm restart >&2
622 else
623         echo "Run \"/etc/rc.d/init.d/mysql-ndb-mgm start\" to start mysql NDB management node." >&2
624 fi
625
626 %preun ndb-mgm
627 if [ "$1" = "0" ]; then
628         if [ -f /var/lock/subsys/mysql-ndb-mgm ]; then
629                 /etc/rc.d/init.d/mysql-ndb-mgm stop
630         fi
631         /sbin/chkconfig --del mysql-ndb-mgm
632 fi
633
634 %post ndb-cpc
635 /sbin/chkconfig --add mysql-ndb-cpc
636 if [ -f /var/lock/subsys/mysql-ndb-cpc ]; then
637         /etc/rc.d/init.d/mysql-ndb-cpc restart >&2
638 else
639         echo "Run \"/etc/rc.d/init.d/mysql-ndb-cpc start\" to start mysql NDB CPC." >&2
640 fi
641
642 %preun ndb-cpc
643 if [ "$1" = "0" ]; then
644         if [ -f /var/lock/subsys/mysql-ndb-cpc ]; then
645                 /etc/rc.d/init.d/mysql-ndb-cpc stop
646         fi
647         /sbin/chkconfig --del mysql-ndb-cpc
648 fi
649
650 %post   libs -p /sbin/ldconfig
651 %postun libs -p /sbin/ldconfig
652
653 %triggerpostun -- mysql <= 4.0.20-2
654 # For clusters in /etc/mysql/clusters.conf
655 if [ -f "/etc/sysconfig/mysql" ]; then
656         . /etc/sysconfig/mysql
657         if [ -n "$MYSQL_DB_CLUSTERS" ]; then
658                 for i in "$MYSQL_DB_CLUSTERS"; do
659                         echo "$i/mysqld.conf=$i" >> /etc/mysql/clusters.conf
660                 done
661                 echo "# Do not use **obsolete** option MYSQL_DB_CLUSTERS" >> /etc/sysconfig/mysql
662                 echo "# USE /etc/mysql/clusters.conf instead" >> /etc/sysconfig/mysql
663                 echo "Converted clusters from MYSQL_DB_CLUSTERS to /etc/mysql/clusters.conf."
664                 echo "You NEED to fix your /etc/sysconfig/mysql and verify /etc/mysql/clusters.conf."
665         fi
666 fi
667
668 %triggerpostun -- mysql <= 4.1.1
669 # For better compatibility with prevoius versions:
670 for config in $(awk -F= '!/^#/ && /=/{print $1}' /etc/mysql/clusters.conf); do
671         if echo "$config" | grep -q '^/'; then
672                 config_file="$config"
673         elif [ -f "/etc/mysql/$config" ]; then
674                 config_file=/etc/mysql/$config
675         else
676                 clusterdir=$(awk -F= "/^$config/{print \$2}" /etc/mysql/clusters.conf)
677                 config_file="$clusterdir/mysqld.conf"
678         fi
679         echo "Adding option old-passwords to config: $config_file"
680         echo "If you want to use new, better passwords - remove it"
681
682         # sed magic to add 'old-passwords' to [mysqld] section
683         sed -i -e '/./{H;$!d;};x;/\[mysqld\]/{
684                 a
685                 a; Compatibility options:
686                 aold-passwords
687         }
688         ' $config_file
689 done
690
691 %files
692 %defattr(644,root,root,755)
693 %doc support-files/*.cnf support-files/*.ini
694 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/mysql
695 %attr(754,root,root) /etc/rc.d/init.d/mysql
696 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mysql
697 %attr(751,root,root) %dir %{_sysconfdir}/mysql
698 %attr(640,root,mysql) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mysql/clusters.conf
699 %attr(750,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/monit/*.monitrc
700 %attr(755,root,root) %{_bindir}/isamchk
701 %attr(755,root,root) %{_bindir}/isamlog
702 %attr(755,root,root) %{_bindir}/myisamchk
703 %attr(755,root,root) %{_bindir}/myisamlog
704 %attr(755,root,root) %{_bindir}/myisampack
705 %attr(755,root,root) %{_bindir}/mysql_fix_privilege_tables
706 %attr(755,root,root) %{_bindir}/pack_isam
707 %attr(755,root,root) %{_bindir}/my_print_defaults
708 %attr(755,root,root) %{_sbindir}/mysqld
709 %{_mandir}/man1/isamchk.1*
710 %{_mandir}/man1/isamlog.1*
711 %{_mandir}/man1/mysql_fix_privilege_tables.1*
712 %{_mandir}/man1/mysqld.1*
713
714 %attr(700,mysql,mysql) %{_mysqlhome}
715 # root:root is proper here for AC mysql.rpm while mysql:mysql is potential security hole
716 %attr(751,root,root) /var/lib/mysql
717 %attr(750,mysql,mysql) %dir /var/log/mysql
718 %attr(750,mysql,mysql) %dir /var/log/archiv/mysql
719 %attr(640,mysql,mysql) %config(noreplace) %verify(not md5 mtime size) /var/log/mysql/*
720
721 %{_infodir}/mysql.info*
722 %dir %{_datadir}/mysql
723 # This is template for configuration file which is created after 'service mysql init'
724 %{_datadir}/mysql/mysqld.conf
725 %{_datadir}/mysql/charsets
726 %{_datadir}/mysql/english
727 %{_datadir}/mysql/mysql_fix_privilege_tables.sql
728 %lang(cs) %{_datadir}/mysql/czech
729 %lang(da) %{_datadir}/mysql/danish
730 %lang(de) %{_datadir}/mysql/german
731 %lang(el) %{_datadir}/mysql/greek
732 %lang(es) %{_datadir}/mysql/spanish
733 %lang(et) %{_datadir}/mysql/estonian
734 %lang(fr) %{_datadir}/mysql/french
735 %lang(hu) %{_datadir}/mysql/hungarian
736 %lang(it) %{_datadir}/mysql/italian
737 %lang(ja) %{_datadir}/mysql/japanese
738 %lang(ja) %{_datadir}/mysql/japanese-sjis
739 %lang(ko) %{_datadir}/mysql/korean
740 %lang(nl) %{_datadir}/mysql/dutch
741 %lang(nb) %{_datadir}/mysql/norwegian
742 %lang(nn) %{_datadir}/mysql/norwegian-ny
743 %lang(pl) %{_datadir}/mysql/polish
744 %lang(pt) %{_datadir}/mysql/portuguese
745 %lang(ro) %{_datadir}/mysql/romanian
746 %lang(ru) %{_datadir}/mysql/russian
747 %lang(sr) %{_datadir}/mysql/serbian
748 %lang(sk) %{_datadir}/mysql/slovak
749 %lang(sv) %{_datadir}/mysql/swedish
750 %lang(uk) %{_datadir}/mysql/ukrainian
751
752 %files extras
753 %defattr(644,root,root,755)
754 %attr(755,root,root) %{_bindir}/msql2mysql
755 %attr(755,root,root) %{_bindir}/perror
756 %attr(755,root,root) %{_bindir}/replace
757 %attr(755,root,root) %{_bindir}/resolveip
758 %attr(755,root,root) %{_bindir}/myisam_ftdump
759 %attr(755,root,root) %{_bindir}/mysql_secure_installation
760 %attr(755,root,root) %{_bindir}/mysql_tzinfo_to_sql
761 %attr(755,root,root) %{_bindir}/mysqlcheck
762 %{_mandir}/man1/perror.1*
763 %{_mandir}/man1/replace.1*
764
765 %files extras-perl
766 %defattr(644,root,root,755)
767 %attr(755,root,root) %{_bindir}/mysql_convert_table_format
768 %attr(755,root,root) %{_bindir}/mysqldumpslow
769 %attr(755,root,root) %{_bindir}/mysqlhotcopy
770 %attr(755,root,root) %{_bindir}/mysql_setpermission
771 %attr(755,root,root) %{_bindir}/mysql_zap
772 %attr(755,root,root) %{_bindir}/mysql_find_rows
773 %attr(755,root,root) %{_bindir}/mysqlaccess
774 %attr(755,root,root) %{_bindir}/mysql_fix_extensions
775 %attr(755,root,root) %{_bindir}/mysql_explain_log
776 %attr(755,root,root) %{_bindir}/mysql_tableinfo
777 %{_mandir}/man1/mysql_zap.1*
778 %{_mandir}/man1/mysqlaccess.1*
779
780 %files client
781 %defattr(644,root,root,755)
782 %attr(755,root,root) %{_bindir}/mysql
783 %attr(755,root,root) %{_bindir}/mysqlbug
784 %attr(755,root,root) %{_bindir}/mysqldump
785 %attr(755,root,root) %{_bindir}/mysqlimport
786 %attr(755,root,root) %{_bindir}/mysqlmanager*
787 %attr(755,root,root) %{_bindir}/mysqlshow
788 %attr(755,root,root) %{_bindir}/mysqlbinlog
789 %attr(755,root,root) %{_bindir}/mysqladmin
790 %{_mandir}/man1/mysql.1*
791 %{_mandir}/man1/mysqladmin.1*
792 %{_mandir}/man1/mysqldump.1*
793 %{_mandir}/man1/mysqlshow.1*
794
795 %files libs
796 %defattr(644,root,root,755)
797 %doc EXCEPTIONS-CLIENT
798 %attr(755,root,root) %{_libdir}/lib*.so.*.*
799
800 %files devel
801 %defattr(644,root,root,755)
802 %attr(755,root,root) %{_bindir}/mysql_config
803 %attr(755,root,root) %{_libdir}/lib*.so
804 %attr(755,root,root) %{_bindir}/*comp_err
805 %attr(755,root,root) %{_bindir}/*resolve_stack_dump
806 %{_libdir}/lib*.la
807 %{_libdir}/lib*[!tr].a
808 %{_includedir}/mysql
809
810 %files static
811 %defattr(644,root,root,755)
812 %{_libdir}/lib*[tr].a
813
814 %files bench
815 %defattr(644,root,root,755)
816 %attr(755,root,root) %{_bindir}/mysqltest
817 %attr(755,root,root) %{_bindir}/mysql_client_test
818 %dir %{_datadir}/sql-bench
819 %{_datadir}/sql-bench/[CDRl]*
820 %attr(755,root,root) %{_datadir}/sql-bench/[bcgirst]*
821 # wrong dir?
822 %{_datadir}/mysql/mi_test_all.res
823 %attr(755,root,root) %{_datadir}/mysql/mi_test_all
824
825 #%files doc
826 #%defattr(644,root,root,755)
827 #%doc Docs/manual.html Docs/manual_toc.html
828
829 %files ndb
830 %defattr(644,root,root,755)
831 %attr(755,root,root) %{_sbindir}/ndbd
832 %attr(754,root,root) /etc/rc.d/init.d/mysql-ndb
833 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mysql-ndb
834
835 %files ndb-client
836 %defattr(644,root,root,755)
837 %attr(755,root,root) %{_bindir}/ndb_*
838
839 %files ndb-mgm
840 %defattr(644,root,root,755)
841 %attr(755,root,root) %{_sbindir}/ndb_mgmd
842 %attr(754,root,root) /etc/rc.d/init.d/mysql-ndb-mgm
843 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mysql-ndb-mgm
844
845 %files ndb-cpc
846 %defattr(644,root,root,755)
847 %attr(755,root,root) %{_sbindir}/ndb_cpcd
848 %attr(754,root,root) /etc/rc.d/init.d/mysql-ndb-cpc
849 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mysql-ndb-cpc
This page took 0.098083 seconds and 4 git commands to generate.