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