]> git.pld-linux.org Git - packages/mysql.git/blob - mysql.spec
- server does not require -libs
[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.15
27 Release:        3
28 License:        GPL + MySQL FLOSS Exception
29 Source0:        http://mysql.dataphone.se/Downloads/MySQL-4.1/%{name}-%{version}.tar.gz
30 # Source0-md5:  65a0841e592641b8816f9212aaa40176
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.228
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:       /usr/bin/setsid
81 Provides:       MySQL-server
82 Provides:       group(mysql)
83 Provides:       msqlormysql
84 Provides:       user(mysql)
85 Obsoletes:      MySQL
86 Obsoletes:      mysql-server
87 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
88
89 %define         _libexecdir     %{_sbindir}
90 %define         _localstatedir  /var/lib/mysql
91 %define         _mysqlhome      /home/services/mysql
92
93 %define         _noautoreqdep   'perl(DBD::mysql)'
94
95 %description
96 MySQL is a true multi-user, multi-threaded SQL (Structured Query
97 Language) database server. SQL is the most popular database language
98 in the world. MySQL is a client/server implementation that consists of
99 a server daemon mysqld and many different client programs/libraries.
100
101 The main goals of MySQL are speed, robustness and easy to use. MySQL
102 was originally developed because we at Tcx needed a SQL server that
103 could handle very big databases with magnitude higher speed than what
104 any database vendor could offer to us. We have now been using MySQL
105 since 1996 in a environment with more than 40 databases, 10,000
106 tables, of which more than 500 have more than 7 million rows. This is
107 about 50G of mission critical data.
108
109 The base upon which MySQL is built is a set of routines that have been
110 used in a highly demanding production environment for many years.
111 While MySQL is still in development, it already offers a rich and
112 highly useful function set.
113
114 %description -l fr
115 MySQL est un serveur de bases de donnees SQL vraiment multi-usagers et
116 multi-taches. Le langage SQL est le langage de bases de donnees le
117 plus populaire au monde. MySQL est une implementation client/serveur
118 qui consiste en un serveur (mysqld) et differents
119 programmes/bibliotheques clientes.
120
121 Les objectifs principaux de MySQL sont: vitesse, robustesse et
122 facilite d'utilisation. MySQL fut originalement developpe parce que
123 nous, chez Tcx, avions besoin d'un serveur SQL qui pouvait gerer de
124 tres grandes bases de donnees avec une vitesse d'un ordre de magnitude
125 superieur a ce que n'importe quel vendeur pouvait nous offrir. Nous
126 utilisons MySQL depuis 1996 dans un environnement avec plus de 40
127 bases de donnees, 10000 tables, desquelles plus de 500 ont plus de 7
128 millions de lignes. Ceci represente environ 50G de donnees critiques.
129
130 A la base de la conception de MySQL, on retrouve une serie de routines
131 qui ont ete utilisees dans un environnement de production pendant
132 plusieurs annees. Meme si MySQL est encore en developpement, il offre
133 deja une riche et utile serie de fonctions.
134
135 %description -l pl
136 MySQL to prawdziwie wielou¿ytkownikowy, wielow±tkowy serwer baz danych
137 SQL. SQL jest najpopularniejszym na ¶wiecie jêzykiem u¿ywanym do baz
138 danych. MySQL to implementacja klient/serwer sk³adaj±ca siê z demona
139 mysqld i wielu ró¿nych programów i bibliotek klienckich.
140
141 G³ównymi celami MySQL-a s± szybko¶æ, potêga i ³atwo¶æ u¿ytkowania.
142 MySQL oryginalnie by³ tworzony, poniewa¿ autorzy w Tcx potrzebowali
143 serwera SQL do obs³ugi bardzo du¿ych baz danych z szybko¶ci± o wiele
144 wiêksz±, ni¿ mogli zaoferowaæ inni producenci baz danych. U¿ywaj± go
145 od 1996 roku w ¶rodowisku z ponad 40 bazami danych, 10 000 tabel, z
146 których ponad 500 zawiera ponad 7 milionów rekordów - w sumie oko³o
147 50GB krytycznych danych.
148
149 Baza, na której oparty jest MySQL, sk³ada siê ze zbioru procedur,
150 które by³y u¿ywane w bardzo wymagaj±cym ¶rodowisku produkcyjnym przez
151 wiele lat. Pomimo, ¿e MySQL jest ci±gle rozwijany, ju¿ oferuje bogaty
152 i u¿yteczny zbiór funkcji.
153
154 %description -l de
155 MySQL ist eine SQL-Datenbank. Allerdings ist sie im Gegensatz zu
156 Oracle, DB2 oder PostgreSQL keine relationale Datenbank. Die Daten
157 werden zwar in zweidimensionalen Tabellen gespeichert und können mit
158 einem Primärschlüssel versehen werden. Es ist aber keine Definition
159 eines Fremdschlüssels möglich. Der Benutzer ist somit bei einer
160 MySQL-Datenbank völlig allein für die (referenzielle) Integrität der
161 Daten verantwortlich. Allein durch die Nutzung externer
162 Tabellenformate, wie InnoDB bzw Berkeley DB wird eine Relationalität
163 ermöglicht. Diese Projekte sind aber getrennt von MySQL zu betrachten.
164
165 %description -l pt_BR
166 O MySQL é um servidor de banco de dados SQL realmente multiusuário e
167 multi-tarefa. A linguagem SQL é a mais popular linguagem para banco de
168 dados no mundo. O MySQL é uma implementação cliente/servidor que
169 consiste de um servidor chamado mysqld e diversos
170 programas/bibliotecas clientes. Os principais objetivos do MySQL são:
171 velocidade, robustez e facilidade de uso. O MySQL foi originalmente
172 desenvolvido porque nós na Tcx precisávamos de um servidor SQL que
173 pudesse lidar com grandes bases de dados e com uma velocidade muito
174 maior do que a que qualquer vendedor podia nos oferecer. Estamos
175 usando o MySQL desde 1996 em um ambiente com mais de 40 bases de dados
176 com 10.000 tabelas, das quais mais de 500 têm mais de 7 milhões de
177 linhas. Isto é o equivalente a aproximadamente 50G de dados críticos.
178 A base da construção do MySQL é uma série de rotinas que foram usadas
179 em um ambiente de produção com alta demanda por muitos anos. Mesmo o
180 MySQL estando ainda em desenvolvimento, ele já oferece um conjunto de
181 funções muito ricas e úteis. Veja a documentação para maiores
182 informações.
183
184 %description -l ru
185 MySQL - ÜÔÏ SQL (Structured Query Language) ÓÅÒ×ÅÒ ÂÁÚÙ ÄÁÎÎÙÈ. MySQL
186 ÂÙÌÁ ÎÁÐÉÓÁÎÁ Michael'ÏÍ (monty) Widenius'ÏÍ. óÍ. ÆÁÊÌ CREDITS ×
187 ÄÉÓÔÒÉÂÕÔÉ×Å ÎÁ ÐÒÅÄÍÅÔ ÄÒÕÇÉÈ ÕÞÁÓÔÎÉËÏ× ÐÒÏÅËÔÁ É ÐÒÏÞÅÊ ÉÎÆÏÒÍÁÃÉÉ
188 Ï MySQL.
189
190 %description -l uk
191 MySQL - ÃÅ SQL (Structured Query Language) ÓÅÒ×ÅÒ ÂÁÚÉ ÄÁÎÉÈ. MySQL
192 ÂÕÌÏ ÎÁÐÉÓÁÎÏ Michael'ÏÍ (monty) Widenius'ÏÍ. äÉ×. ÆÁÊÌ CREDITS ×
193 ÄÉÓÔÒÉÂÕÔÉצ ÄÌÑ ¦ÎÆÏÒÍÁ槠ÐÒÏ ¦ÎÛÉÈ ÕÞÁÓÎÉ˦נÐÒÏÅËÔÕ ÔÁ ¦ÎÛϧ
194 ¦ÎÆÏÒÍÁæ§.
195
196 %package extras
197 Summary:        MySQL additional utilities
198 Summary(pl):    Dodatkowe narzêdzia do MySQL
199 Group:          Applications/Databases
200 Requires:       %{name}-libs = %{version}-%{release}
201
202 %description extras
203 MySQL additional utilities except Perl scripts (they may be found in
204 %{name}-extras-perl package).
205
206 %description extras -l pl
207 Dodatkowe narzêdzia do MySQL - z wyj±tkiem skryptów Perla (które s± w
208 pakiecie %{name}-extras-perl).
209
210 %package extras-perl
211 Summary:        MySQL additional utilities written in Perl
212 Summary(pl):    Dodatkowe narzêdzia do MySQL napisane w Perlu
213 Group:          Applications/Databases
214 Requires:       %{name}-extras = %{version}-%{release}
215 Requires:       perl(DBD::mysql)
216
217 %description extras-perl
218 MySQL additional utilities written in Perl.
219
220 %description extras-perl -l pl
221 Dodatkowe narzêdzia do MySQL napisane w Perlu.
222
223 %package client
224 Summary:        MySQL - Client
225 Summary(pl):    MySQL - Klient
226 Summary(pt):    MySQL - Cliente
227 Summary(ru):    MySQL ËÌÉÅÎÔ
228 Summary(uk):    MySQL Ë̦¤ÎÔ
229 Group:          Applications/Databases
230 Requires:       %{name}-libs = %{version}-%{release}
231 Obsoletes:      MySQL-client
232
233 %description client
234 This package contains the standard MySQL clients.
235
236 %description client -l fr
237 Ce package contient les clients MySQL standards.
238
239 %description client -l pl
240 Standardowe programy klienckie MySQL.
241
242 %description client -l pt_BR
243 Este pacote contém os clientes padrão para o MySQL.
244
245 %description client -l ru
246 üÔÏÔ ÐÁËÅÔ ÓÏÄÅÒÖÉÔ ÔÏÌØËÏ ËÌÉÅÎÔ MySQL.
247
248 %description client -l uk
249 ãÅÊ ÐÁËÅԠͦÓÔÉÔØ Ô¦ÌØËÉ Ë̦¤ÎÔÁ MySQL.
250
251 %package libs
252 Summary:        Shared libraries for MySQL
253 Summary(pl):    Biblioteki dzielone MySQL
254 Group:          Applications/Databases
255 Obsoletes:      libmysql10
256 Obsoletes:      mysql-doc < 4.1.12
257
258 %description libs
259 Shared libraries for MySQL.
260
261 %description libs -l pl
262 Biblioteki dzielone MySQL.
263
264 %package devel
265 Summary:        MySQL - Development header files and libraries
266 Summary(pl):    MySQL - Pliki nag³ówkowe i biblioteki dla programistów
267 Summary(pt):    MySQL - Medições de desempenho
268 Summary(ru):    MySQL - ÈÅÄÅÒÙ É ÂÉÂÌÉÏÔÅËÉ ÒÁÚÒÁÂÏÔÞÉËÁ
269 Summary(uk):    MySQL - ÈÅÄÅÒÉ ÔÁ Â¦Â̦ÏÔÅËÉ ÐÒÏÇÒÁͦÓÔÁ
270 Group:          Development/Libraries
271 Requires:       %{name}-libs = %{version}-%{release}
272 %{?with_ssl:Requires:   openssl-devel}
273 Requires:       zlib-devel
274 Obsoletes:      MySQL-devel
275 Obsoletes:      libmysql10-devel
276
277 %description devel
278 This package contains the development header files and libraries
279 necessary to develop MySQL client applications.
280
281 %description devel -l fr
282 Ce package contient les fichiers entetes et les librairies de
283 developpement necessaires pour developper des applications clientes
284 MySQL.
285
286 %description devel -l pl
287 Pliki nag³ówkowe i biblioteki konieczne do kompilacji aplikacji
288 klienckich MySQL.
289
290 %description devel -l pt_BR
291 Este pacote contém os arquivos de cabeçalho (header files) e
292 bibliotecas necessárias para desenvolver aplicações clientes do MySQL.
293
294 %description devel -l ru
295 üÔÏÔ ÐÁËÅÔ ÓÏÄÅÒÖÉÔ ÈÅÄÅÒÙ É ÂÉÂÌÉÏÔÅËÉ ÒÁÚÒÁÂÏÔÞÉËÁ, ÎÅÏÂÈÏÄÉÍÙÅ ÄÌÑ
296 ÒÁÚÒÁÂÏÔËÉ ËÌÉÅÎÔÓËÉÈ ÐÒÉÌÏÖÅÎÉÊ.
297
298 %description devel -l uk
299 ãÅÊ ÐÁËÅԠͦÓÔÉÔØ ÈÅÄÅÒÉ ÔÁ Â¦Â̦ÏÔÅËÉ ÐÒÏÇÒÁͦÓÔÁ, ÎÅÏÂȦÄΦ ÄÌÑ
300 ÒÏÚÒÏÂËÉ ÐÒÏÇÒÁÍ-Ë̦¤ÎÔ¦×.
301
302 %package static
303 Summary:        MySQL static libraries
304 Summary(pl):    Biblioteki statyczne MySQL
305 Summary(ru):    MySQL - ÓÔÁÔÉÞÅÓËÉÅ ÂÉÂÌÉÏÔÅËÉ
306 Summary(uk):    MySQL - ÓÔÁÔÉÞΦ Â¦Â̦ÏÔÅËÉ
307 Group:          Development/Libraries
308 Requires:       %{name}-devel = %{version}-%{release}
309 Obsoletes:      MySQL-static
310
311 %description static
312 MySQL static libraries.
313
314 %description static -l pl
315 Biblioteki statyczne MySQL.
316
317 %description static -l ru
318 üÔÏÔ ÐÁËÅÔ ÓÏÄÅÒÖÉÔ ÓÔÁÔÉÞÅÓËÉÅ ÂÉÂÌÉÏÔÅËÉ ÒÁÚÒÁÂÏÔÞÉËÁ, ÎÅÏÂÈÏÄÉÍÙÅ
319 ÄÌÑ ÒÁÚÒÁÂÏÔËÉ ËÌÉÅÎÔÓËÉÈ ÐÒÉÌÏÖÅÎÉÊ.
320
321 %description static -l uk
322 ãÅÊ ÐÁËÅԠͦÓÔÉÔØ ÓÔÁÔÉÞΦ Â¦Â̦ÏÔÅËÉ ÐÒÏÇÒÁͦÓÔÁ, ÎÅÏÂȦÄΦ ÄÌÑ
323 ÒÏÚÒÏÂËÉ ÐÒÏÇÒÁÍ-Ë̦¤ÎÔ¦×.
324
325 %package bench
326 Summary:        MySQL - Benchmarks
327 Summary(pl):    MySQL - Programy testuj±ce szybko¶æ dzia³ania bazy
328 Summary(pt):    MySQL - Medições de desempenho
329 Summary(ru):    MySQL - ÂÅÎÞÍÁÒËÉ
330 Summary(uk):    MySQL - ÂÅÎÞÍÁÒËÉ
331 Group:          Applications/Databases
332 Requires:       %{name} = %{version}-%{release}
333 Requires:       %{name}-client
334 Requires:       perl(DBD::mysql)
335 Obsoletes:      MySQL-bench
336
337 %description bench
338 This package contains MySQL benchmark scripts and data.
339
340 %description bench -l pl
341 Programy testuj±ce szybko¶æ serwera MySQL.
342
343 %description bench -l pt_BR
344 Este pacote contém medições de desempenho de scripts e dados do MySQL.
345
346 %description bench -l ru
347 üÔÏÔ ÐÁËÅÔ ÓÏÄÅÒÖÉÔ ÓËÒÉÐÔÙ É ÄÁÎÎÙÅ ÄÌÑ ÏÃÅÎËÉ ÐÒÏÉÚ×ÏÄÉÔÅÌØÎÏÓÔÉ
348 MySQL.
349
350 %description bench -l uk
351 ãÅÊ ÐÁËÅԠͦÓÔÉÔØ ÓËÒÉÐÔÉ ÔÁ ÄÁΦ ÄÌÑ ÏæÎËÉ ÐÒÏÄÕËÔÉ×ÎÏÓÔ¦ MySQL.
352
353 %package doc
354 Summary:        MySQL manual
355 Summary(pl):    Podrêcznik u¿ytkownika MySQL
356 Group:          Applications/Databases
357
358 %description doc
359 This package contains manual in HTML format.
360
361 %description doc -l pl
362 Podrêcznik MySQL-a w formacie HTML.
363
364 %package ndb
365 Summary:        MySQL - NDB Storage Engine Daemon
366 Summary(pl):    MySQL - demon silnika przechowywania danych NDB
367 Group:          Applications/Databases
368 Requires:       %{name}-libs = %{version}-%{release}
369
370 %description ndb
371 This package contains the standard MySQL NDB Storage Engine Daemon.
372
373 %description ndb -l pl
374 Ten pakiet zawiera standardowego demona silnika przechowywania danych
375 NDB.
376
377 %package ndb-client
378 Summary:        MySQL - NDB Clients
379 Summary(pl):    MySQL - programy klienckie NDB
380 Group:          Applications/Databases
381 Requires:       %{name}-libs = %{version}-%{release}
382
383 %description ndb-client
384 This package contains the standard MySQL NDB Clients.
385
386 %description ndb-client -l pl
387 Ten pakiet zawiera standardowe programy klienckie MySQL NDB.
388
389 %package ndb-mgm
390 Summary:        MySQL - NDB Management Daemon
391 Summary(pl):    MySQL - demon zarz±dzaj±cy NDB
392 Group:          Applications/Databases
393 Requires:       %{name}-libs = %{version}-%{release}
394
395 %description ndb-mgm
396 This package contains the standard MySQL NDB Management Daemon.
397
398 %description ndb-mgm -l pl
399 Ten pakiet zawiera standardowego demona zarz±dzaj±cego MySQL NDB.
400
401 %package ndb-cpc
402 Summary:        MySQL - NDB CPC Daemon
403 Summary(pl):    MySQL - demon NDB CPC
404 Group:          Applications/Databases
405 Requires:       %{name}-libs = %{version}-%{release}
406
407 %description ndb-cpc
408 This package contains the standard MySQL NDB CPC Daemon.
409
410 %description ndb-cpc -l pl
411 Ten pakiet zawiera standardowego demona MySQL NDB CPC.
412
413 %prep
414 %setup -q
415 %patch0 -p1
416 %{?with_tcpd:%patch1 -p1}
417 %patch2 -p1
418 %patch3 -p1
419 %ifarch alpha
420 # this is strange: mysqld functions for UDF modules are not explicitly defined,
421 # so -rdynamic is used; in such case gcc3+ld on alpha doesn't like C++ vtables
422 # in objects compiled without -fPIC
423 %patch4 -p1
424 %endif
425 %patch5 -p1
426 %patch6 -p1
427 %patch7 -p1
428 %patch8 -p1
429
430 %{__perl} -pi -e 's@(ndb_bin_am_ldflags)="-static"@$1=""@' configure.in
431
432 %build
433 %{__libtoolize}
434 %{__aclocal}
435 %{__automake}
436 %{__autoconf}
437 # The compiler flags are as per their "official" spec ;)
438 CXXFLAGS="%{rpmcflags} -felide-constructors -fno-rtti -fno-exceptions %{!?debug:-fomit-frame-pointer}"
439 CFLAGS="%{rpmcflags} %{!?debug:-fomit-frame-pointer}"
440
441 # NOTE: the PS, FIND_PROC, KILL, CHECK_PID are not used by PLD Linux
442 # and therefore do not add BR on these. These are here just to satisfy
443 # configure.
444 %configure \
445         PS='/bin/ps' \
446         FIND_PROC='/bin/ps p $$PID' \
447         KILL='/bin/kill' \
448         CHECK_PID='/bin/kill -0 $$PID' \
449         --enable-assembler \
450         --enable-shared \
451         --enable-static \
452         --enable-thread-safe-client \
453         --with%{!?with_bdb:out}-berkeley-db \
454         --with%{!?with_innodb:out}-innodb \
455         --with%{!?with_isam:out}-isam \
456         --with%{!?with_raid:out}-raid \
457         --with%{!?with_ssl:out}-openssl \
458         --with%{!?with_tcpd:out}-libwrap \
459         %{?with_big_tables:--with-big-tables} \
460         --with-comment="PLD Linux Distribution MySQL RPM" \
461         --with%{!?debug:out}-debug \
462         --with-embedded-server \
463         --with-extra-charsets=all \
464         --with-low-memory \
465         --with-mysqld-user=mysql \
466         --with-named-curses-libs="-lncurses" \
467         --with-named-thread-libs="-lpthread" \
468         --with-unix-socket-path=/var/lib/mysql/mysql.sock \
469         --with-archive-storage-engine \
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 # functionality in initscript / rpm
554 rm $RPM_BUILD_ROOT%{_bindir}/mysql_create_system_tables
555 rm $RPM_BUILD_ROOT%{_bindir}/mysql_install_db
556 rm $RPM_BUILD_ROOT%{_bindir}/mysqld_safe
557 rm $RPM_BUILD_ROOT%{_bindir}/mysqld_multi
558 rm $RPM_BUILD_ROOT%{_mandir}/man1/mysqld_{multi,safe}*
559 rm $RPM_BUILD_ROOT%{_datadir}/%{name}/fill_help_tables.sql
560 rm $RPM_BUILD_ROOT%{_datadir}/%{name}/mysql-log-rotate
561 rm $RPM_BUILD_ROOT%{_datadir}/%{name}/mysql.server
562 rm $RPM_BUILD_ROOT%{_datadir}/%{name}/binary-configure
563 rm $RPM_BUILD_ROOT%{_bindir}/mysql_waitpid
564
565 # in %doc
566 rm $RPM_BUILD_ROOT%{_datadir}/%{name}/*.{ini,cnf}
567
568 %clean
569 rm -rf $RPM_BUILD_ROOT
570
571 %pre
572 %groupadd -g 89 mysql
573 %useradd -u 89 -d %{_mysqlhome} -s /bin/sh -g mysql -c "MySQL Server" mysql
574
575 %post
576 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
577 /sbin/chkconfig --add mysql
578
579 if [ "$1" = 1 ]; then
580         %banner -e %{name}-4.1.x <<-EOF
581         If you want to use new help tables in mysql 4.1.x then you'll need to import the help data:
582         zcat %{_docdir}/%{name}-%{version}/fill_help_tables.sql.gz | mysql mysql
583 EOF
584 #'
585 fi
586
587 %service mysql restart || :
588
589 %preun
590 if [ "$1" = "0" ]; then
591         %service -q mysql stop
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                 if [ -z "$clusterdir" ]; then
678                         echo >&2 "Can't find cluster dir for $config!"
679                         echo >&2 "Please remove extra (leading) spaces from /etc/mysql/clusters.conf"
680                         exit 1
681                 fi
682                 config_file="$clusterdir/mysqld.conf"
683         fi
684
685         if [ ! -f "$config_file" ]; then
686                         echo >&2 "Lost myself! Please report this (with above errors, if any) to http://bugs.pld-linux.org/"
687                         exit 1
688         fi
689         echo "Adding option old-passwords to config: $config_file"
690         echo "If you want to use new, better passwords - remove it"
691
692         # sed magic to add 'old-passwords' to [mysqld] section
693         sed -i -e '/./{H;$!d;};x;/\[mysqld\]/{
694                 a
695                 a; Compatibility options:
696                 aold-passwords
697         }
698         ' $config_file
699 done
700
701 %banner -e %{name}-4.1.x <<-EOF
702         If you want to use new help tables in mysql 4.1.x then you'll need to import the help data:
703         zcat %{_docdir}/%{name}-%{version}/fill_help_tables.sql.gz | mysql mysql
704 EOF
705 #'
706
707 %files
708 %defattr(644,root,root,755)
709 %doc support-files/*.cnf support-files/*.ini scripts/fill_help_tables.sql
710 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/mysql
711 %attr(754,root,root) /etc/rc.d/init.d/mysql
712 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mysql
713 %attr(640,root,mysql) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mysql/clusters.conf
714 %attr(750,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/monit/*.monitrc
715 %attr(755,root,root) %{_bindir}/isamchk
716 %attr(755,root,root) %{_bindir}/isamlog
717 %attr(755,root,root) %{_bindir}/myisamchk
718 %attr(755,root,root) %{_bindir}/myisamlog
719 %attr(755,root,root) %{_bindir}/myisampack
720 %attr(755,root,root) %{_bindir}/mysql_fix_privilege_tables
721 %attr(755,root,root) %{_bindir}/pack_isam
722 %attr(755,root,root) %{_bindir}/my_print_defaults
723 %attr(755,root,root) %{_sbindir}/mysqld
724 %{_mandir}/man1/isamchk.1*
725 %{_mandir}/man1/isamlog.1*
726 %{_mandir}/man1/mysql_fix_privilege_tables.1*
727 %{_mandir}/man1/mysqld.1*
728
729 %attr(700,mysql,mysql) %{_mysqlhome}
730 # root:root is proper here for AC mysql.rpm while mysql:mysql is potential security hole
731 %attr(751,root,root) /var/lib/mysql
732 %attr(750,mysql,mysql) %dir /var/log/mysql
733 %attr(750,mysql,mysql) %dir /var/log/archiv/mysql
734 %attr(640,mysql,mysql) %ghost /var/log/mysql/*
735
736 %{_infodir}/mysql.info*
737 %dir %{_datadir}/mysql
738 # This is template for configuration file which is created after 'service mysql init'
739 %{_datadir}/mysql/mysqld.conf
740 %{_datadir}/mysql/charsets
741 %{_datadir}/mysql/english
742 %{_datadir}/mysql/mysql_fix_privilege_tables.sql
743 %lang(cs) %{_datadir}/mysql/czech
744 %lang(da) %{_datadir}/mysql/danish
745 %lang(de) %{_datadir}/mysql/german
746 %lang(el) %{_datadir}/mysql/greek
747 %lang(es) %{_datadir}/mysql/spanish
748 %lang(et) %{_datadir}/mysql/estonian
749 %lang(fr) %{_datadir}/mysql/french
750 %lang(hu) %{_datadir}/mysql/hungarian
751 %lang(it) %{_datadir}/mysql/italian
752 %lang(ja) %{_datadir}/mysql/japanese
753 %lang(ja) %{_datadir}/mysql/japanese-sjis
754 %lang(ko) %{_datadir}/mysql/korean
755 %lang(nl) %{_datadir}/mysql/dutch
756 %lang(nb) %{_datadir}/mysql/norwegian
757 %lang(nn) %{_datadir}/mysql/norwegian-ny
758 %lang(pl) %{_datadir}/mysql/polish
759 %lang(pt) %{_datadir}/mysql/portuguese
760 %lang(ro) %{_datadir}/mysql/romanian
761 %lang(ru) %{_datadir}/mysql/russian
762 %lang(sr) %{_datadir}/mysql/serbian
763 %lang(sk) %{_datadir}/mysql/slovak
764 %lang(sv) %{_datadir}/mysql/swedish
765 %lang(uk) %{_datadir}/mysql/ukrainian
766
767 %files extras
768 %defattr(644,root,root,755)
769 %attr(755,root,root) %{_bindir}/msql2mysql
770 %attr(755,root,root) %{_bindir}/perror
771 %attr(755,root,root) %{_bindir}/replace
772 %attr(755,root,root) %{_bindir}/resolveip
773 %attr(755,root,root) %{_bindir}/myisam_ftdump
774 %attr(755,root,root) %{_bindir}/mysql_secure_installation
775 %attr(755,root,root) %{_bindir}/mysql_tzinfo_to_sql
776 %attr(755,root,root) %{_bindir}/mysqlcheck
777 %{_mandir}/man1/perror.1*
778 %{_mandir}/man1/replace.1*
779
780 %files extras-perl
781 %defattr(644,root,root,755)
782 %attr(755,root,root) %{_bindir}/mysql_convert_table_format
783 %attr(755,root,root) %{_bindir}/mysqldumpslow
784 %attr(755,root,root) %{_bindir}/mysqlhotcopy
785 %attr(755,root,root) %{_bindir}/mysql_setpermission
786 %attr(755,root,root) %{_bindir}/mysql_zap
787 %attr(755,root,root) %{_bindir}/mysql_find_rows
788 %attr(755,root,root) %{_bindir}/mysqlaccess
789 %attr(755,root,root) %{_bindir}/mysql_fix_extensions
790 %attr(755,root,root) %{_bindir}/mysql_explain_log
791 %attr(755,root,root) %{_bindir}/mysql_tableinfo
792 %{_mandir}/man1/mysql_zap.1*
793 %{_mandir}/man1/mysqlaccess.1*
794
795 %files client
796 %defattr(644,root,root,755)
797 %attr(755,root,root) %{_bindir}/mysql
798 %attr(755,root,root) %{_bindir}/mysqlbug
799 %attr(755,root,root) %{_bindir}/mysqldump
800 %attr(755,root,root) %{_bindir}/mysqlimport
801 %attr(755,root,root) %{_bindir}/mysqlmanager*
802 %attr(755,root,root) %{_bindir}/mysqlshow
803 %attr(755,root,root) %{_bindir}/mysqlbinlog
804 %attr(755,root,root) %{_bindir}/mysqladmin
805 %{_mandir}/man1/mysql.1*
806 %{_mandir}/man1/mysqladmin.1*
807 %{_mandir}/man1/mysqldump.1*
808 %{_mandir}/man1/mysqlshow.1*
809
810 %files libs
811 %defattr(644,root,root,755)
812 %doc EXCEPTIONS-CLIENT
813 %attr(755,root,root) %{_libdir}/lib*.so.*.*
814 %attr(751,root,root) %dir %{_sysconfdir}/mysql
815 %attr(644,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mysql/mysql-client.conf
816
817 %files devel
818 %defattr(644,root,root,755)
819 %attr(755,root,root) %{_bindir}/mysql_config
820 %attr(755,root,root) %{_libdir}/lib*.so
821 %attr(755,root,root) %{_bindir}/*comp_err
822 %attr(755,root,root) %{_bindir}/*resolve_stack_dump
823 %{_libdir}/lib*.la
824 %{_libdir}/lib*[!tr].a
825 %{_includedir}/mysql
826
827 %files static
828 %defattr(644,root,root,755)
829 %{_libdir}/lib*[tr].a
830
831 %files bench
832 %defattr(644,root,root,755)
833 %attr(755,root,root) %{_bindir}/mysqltest
834 %attr(755,root,root) %{_bindir}/mysql_client_test
835 %dir %{_datadir}/sql-bench
836 %{_datadir}/sql-bench/[CDRl]*
837 %attr(755,root,root) %{_datadir}/sql-bench/[bcgirst]*
838 # wrong dir?
839 %{_datadir}/mysql/mi_test_all.res
840 %attr(755,root,root) %{_datadir}/mysql/mi_test_all
841
842 #%files doc
843 #%defattr(644,root,root,755)
844 #%doc Docs/manual.html Docs/manual_toc.html
845
846 %files ndb
847 %defattr(644,root,root,755)
848 %attr(755,root,root) %{_sbindir}/ndbd
849 %attr(754,root,root) /etc/rc.d/init.d/mysql-ndb
850 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mysql-ndb
851
852 %files ndb-client
853 %defattr(644,root,root,755)
854 %attr(755,root,root) %{_bindir}/ndb_*
855
856 %files ndb-mgm
857 %defattr(644,root,root,755)
858 %attr(755,root,root) %{_sbindir}/ndb_mgmd
859 %attr(754,root,root) /etc/rc.d/init.d/mysql-ndb-mgm
860 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mysql-ndb-mgm
861
862 %files ndb-cpc
863 %defattr(644,root,root,755)
864 %attr(755,root,root) %{_sbindir}/ndb_cpcd
865 %attr(754,root,root) /etc/rc.d/init.d/mysql-ndb-cpc
866 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mysql-ndb-cpc
This page took 0.083111 seconds and 4 git commands to generate.