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