+# _with_innodb - with InnoDB backend
+# _with_bdb - with Berkeley DB backend
%include /usr/lib/rpm/macros.perl
-%define __find_requires %{_builddir}/%{buildsubdir}/find-perl-requires
Summary: MySQL: a very fast and reliable SQL database engine
Summary(fr): MySQL: un serveur SQL rapide et fiable
Summary(pl): MySQL: bardzo szybka i niezawodna baza danych (SQL)
-Summary(pt): MySQL: Um servidor SQL rápido e confiável
+Summary(pt_BR): MySQL: Um servidor SQL r\e.A\eNapido e confi\eNavel.\e*B
+Summary(ru): MySQL -- ÂÙÓÔÒÙÊ SQL-ÓÅÒ×ÅÒ
+Summary(uk): MySQL -- Û×ÉÄËÉÊ SQL-ÓÅÒ×ÅÒ
+Summary(zh_CN): MySQLÊý¾Ý¿â·þÎñÆ÷
Name: mysql
Group: Applications/Databases
-Group(pl): Aplikacje/Bazy danych
-Group(pt): Aplicações/Banco_de_Dados
-Version: 3.23.36
+Version: 3.23.52
Release: 1
License: GPL/LGPL
-Source0: http://www.mysql.com/Downloads/MySQL-3.23/%{name}-%{version}.tar.gz
+Source0: http://prdownloads.sourceforge.net/mysql/%{name}-%{version}.tar.gz
Source1: %{name}.init
Source2: %{name}.sysconfig
Source3: %{name}.logrotate
Source4: %{name}d.conf
Patch0: %{name}-info.patch
Patch1: %{name}-no_libnsl.patch
-Patch2: %{name}-perldep.patch
-Patch3: %{name}-opt.patch
+Patch2: %{name}-opt.patch
+Patch3: %{name}-moreincludes.patch
+Patch4: %{name}-amfix.patch
+Patch5: %{name}-acfix.patch
+Patch6: %{name}-am15.patch
+Patch7: %{name}-c++.patch
+Patch8: %{name}-noproc.patch
Icon: mysql.gif
URL: http://www.mysql.com/
Requires: %{name}-libs = %{version}
+BuildRequires: autoconf
+BuildRequires: automake
BuildRequires: libstdc++-devel
-BuildRequires: ncurses-devel
-BuildRequires: perl
+BuildRequires: libtool
+BuildRequires: ncurses-devel >= 4.2
BuildRequires: perl-DBI
-BuildRequires: readline-devel
+BuildRequires: perl-devel >= 5.6.1
+BuildRequires: readline-devel >= 4.2
BuildRequires: rpm-perlprov
BuildRequires: texinfo
BuildRequires: zlib-devel
-BuildRequires: autoconf
Prereq: rc-scripts >= 0.2.0
Prereq: shadow
+Prereq: /sbin/chkconfig
Provides: msqlormysql MySQL-server
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
Obsoletes: MySQL
%define _libexecdir %{_sbindir}
%define _localstatedir /var/lib/mysql
+%define _gcc_ver %(%{__cc} -dumpversion | cut -b 1)
+%if %{_gcc_ver} == 2
+%define __cxx "%{__cc}"
+%endif
%description
MySQL is a true multi-user, multi-threaded SQL (Structured Query
funções muito ricas e úteis. Veja a documentação para maiores
informações.
+%description -l ru
+MySQL - ÜÔÏ SQL (Structured Query Language) ÓÅÒ×ÅÒ ÂÁÚÙ ÄÁÎÎÙÈ. MySQL
+ÂÙÌÁ ÎÁÐÉÓÁÎÁ Michael'ÏÍ (monty) Widenius'ÏÍ. óÍ. ÆÁÊÌ CREDITS ×
+ÄÉÓÔÒÉÂÕÔÉ×Å ÎÁ ÐÒÅÄÍÅÔ ÄÒÕÇÉÈ ÕÞÁÓÔÎÉËÏ× ÐÒÏÅËÔÁ É ÐÒÏÞÅÊ ÉÎÆÏÒÍÁÃÉÉ
+Ï MySQL.
+
+%description -l uk
+MySQL - ÃÅ SQL (Structured Query Language) ÓÅÒ×ÅÒ ÂÁÚÉ ÄÁÎÉÈ. MySQL
+ÂÕÌÏ ÎÁÐÉÓÁÎÏ Michael'ÏÍ (monty) Widenius'ÏÍ. äÉ×. ÆÁÊÌ CREDITS ×
+ÄÉÓÔÒÉÂÕÔÉצ ÄÌÑ ¦ÎÆÏÒÍÁæ§ ÐÒÏ ¦ÎÛÉÈ ÕÞÁÓÎÉË¦× ÐÒÏÅËÔÕ ÔÁ ¦ÎÛϧ
+¦ÎÆÏÒÍÁæ§.
+
%package extras
-Summary: MySQL additional utilities
+Summary: MySQL additional utilities
+Summary(pl): Dodatkowe narzêdzia do MySQL
Group: Applications/Databases
-Group(pl): Aplikacje/Bazy danych
-Group(pt): Aplicações/Banco_de_Dados
Requires: %{name}-libs = %{version}
%description extras
MySQL additional utilities except Perl scripts (they may be found in
%{name}-extras-perl package)
+%description extras -l pl
+Dodatkowe narzêdzia do MySQL - z wyj±tkiem skryptów Perla (które s± w
+pakiecie %{name}-extras-perl).
+
%package extras-perl
Summary: MySQL additional utilities written in Perl
+Summary(pl): Dodatkowe narzêdzia do MySQL napisane w Perlu
Group: Applications/Databases
-Group(pl): Aplikacje/Bazy danych
-Group(pt): Aplicações/Banco_de_Dados
Requires: %{name}-extras = %{version}
+Requires: perl(DBD::mysql)
+
+%define _noautoreqdep "perl(DBD::mysql)"
%description extras-perl
MySQL additional utilities written in Perl.
+%description extras-perl -l pl
+Dodatkowe narzêdzia do MySQL napisane w Perlu.
+
%package client
Summary: MySQL - Client
Summary(pl): MySQL - Klient
Summary(pt): MySQL - Cliente
+Summary(ru): MySQL ËÌÉÅÎÔ
+Summary(uk): MySQL Ë̦¤ÎÔ
Group: Applications/Databases
-Group(pl): Aplikacje/Bazy danych
-Group(pt): Aplicações/Banco_de_Dados
Requires: %{name}-libs = %{version}
Obsoletes: MySQL-client
%description client
This package contains the standard MySQL clients.
-%description -l fr client
+%description client -l fr
Ce package contient les clients MySQL standards.
-%description -l pl client
+%description client -l pl
Standardowe programy klienckie MySQL.
-%description -l pt_BR client
+%description client -l pt_BR
Este pacote contém os clientes padrão para o MySQL.
+%description client -l ru
+üÔÏÔ ÐÁËÅÔ ÓÏÄÅÒÖÉÔ ÔÏÌØËÏ ËÌÉÅÎÔ MySQL.
+
+%description client -l uk
+ãÅÊ ÐÁËÅÔ Í¦ÓÔÉÔØ Ô¦ÌØËÉ Ë̦¤ÎÔÁ MySQL.
+
%package libs
Summary: Shared libraries for MySQL
+Summary(pl): Biblioteki dzielone MySQL
Group: Applications/Databases
-Group(pl): Aplikacje/Bazy danych
+Obsoletes: libmysql10
%description libs
Shared libraries for MySQL.
+%description libs -l pl
+Biblioteki dzielone MySQL.
+
%package devel
Summary: MySQL - Development header files and libraries
Summary(pl): MySQL - Pliki nag³ówkowe i biblioteki dla programistów
Summary(pt): MySQL - Medições de desempenho
+Summary(ru): MySQL - ÈÅÄÅÒÙ É ÂÉÂÌÉÏÔÅËÉ ÒÁÚÒÁÂÏÔÞÉËÁ
+Summary(uk): MySQL - ÈÅÄÅÒÉ ÔÁ ¦Â̦ÏÔÅËÉ ÐÒÏÇÒÁͦÓÔÁ
Group: Development/Libraries
-Group(de): Entwicklung/Libraries
-Group(fr): Development/Librairies
-Group(pl): Programowanie/Biblioteki
Requires: %{name}-libs = %{version}
Obsoletes: MySQL-devel
+Obsoletes: libmysql10-devel
%description devel
This package contains the development header files and libraries
necessary to develop MySQL client applications.
-%description -l pl devel
+%description devel -l fr
+Ce package contient les fichiers entetes et les librairies de
+developpement necessaires pour developper des applications clientes
+MySQL.
+
+%description devel -l pl
Pliki nag³ówkowe i biblioteki konieczne do kompilacji aplikacji
klienckich MySQL.
Este pacote contém os arquivos de cabeçalho (header files) e
bibliotecas necessárias para desenvolver aplicações clientes do MySQL.
-%description -l fr devel
-Ce package contient les fichiers entetes et les librairies de
-developpement necessaires pour developper des applications clientes
-MySQL.
+%description devel -l ru
+üÔÏÔ ÐÁËÅÔ ÓÏÄÅÒÖÉÔ ÈÅÄÅÒÙ É ÂÉÂÌÉÏÔÅËÉ ÒÁÚÒÁÂÏÔÞÉËÁ, ÎÅÏÂÈÏÄÉÍÙÅ ÄÌÑ
+ÒÁÚÒÁÂÏÔËÉ ËÌÉÅÎÔÓËÉÈ ÐÒÉÌÏÖÅÎÉÊ.
+
+%description devel -l uk
+ãÅÊ ÐÁËÅÔ Í¦ÓÔÉÔØ ÈÅÄÅÒÉ ÔÁ ¦Â̦ÏÔÅËÉ ÐÒÏÇÒÁͦÓÔÁ, ÎÅÏÂȦÄΦ ÄÌÑ
+ÒÏÚÒÏÂËÉ ÐÒÏÇÒÁÍ-Ë̦¤ÎÔ¦×.
%package static
Summary: MySQL staic libraris
Summary(pl): Biblioteki statyczne MySQL
+Summary(ru): MySQL - ÓÔÁÔÉÞÅÓËÉÅ ÂÉÂÌÉÏÔÅËÉ
+Summary(uk): MySQL - ÓÔÁÔÉÞΦ ¦Â̦ÏÔÅËÉ
Group: Development/Libraries
-Group(de): Entwicklung/Libraries
-Group(fr): Development/Librairies
-Group(pl): Programowanie/Biblioteki
Requires: %{name}-devel = %{version}
Obsoletes: MySQL-static
%description static
-MySQL staic libraris.
+MySQL static libraris.
-%description -l pl static
+%description static -l pl
Biblioteki statyczne MySQL.
+%description static -l ru
+üÔÏÔ ÐÁËÅÔ ÓÏÄÅÒÖÉÔ ÓÔÁÔÉÞÅÓËÉÅ ÂÉÂÌÉÏÔÅËÉ ÒÁÚÒÁÂÏÔÞÉËÁ, ÎÅÏÂÈÏÄÉÍÙÅ
+ÄÌÑ ÒÁÚÒÁÂÏÔËÉ ËÌÉÅÎÔÓËÉÈ ÐÒÉÌÏÖÅÎÉÊ.
+
+%description static -l uk
+ãÅÊ ÐÁËÅÔ Í¦ÓÔÉÔØ ÓÔÁÔÉÞΦ ¦Â̦ÏÔÅËÉ ÐÒÏÇÒÁͦÓÔÁ, ÎÅÏÂȦÄΦ ÄÌÑ
+ÒÏÚÒÏÂËÉ ÐÒÏÇÒÁÍ-Ë̦¤ÎÔ¦×.
+
%package bench
Summary: MySQL - Benchmarks
-Summary(pl): mySQL - Programy testuj±ce szybko¶æ dzia³ania bazy
+Summary(pl): MySQL - Programy testuj±ce szybko¶æ dzia³ania bazy
Summary(pt): MySQL - Medições de desempenho
+Summary(ru): MySQL - ÂÅÎÞÍÁÒËÉ
+Summary(uk): MySQL - ÂÅÎÞÍÁÒËÉ
Group: Applications/Databases
-Group(pl): Aplikacje/Bazy danych
-Group(pt): Aplicações/Banco_de_Dados
Requires: %{name} = %{version}
Requires: %{name}-client
Obsoletes: MySQL-bench
%description bench
This package contains MySQL benchmark scripts and data.
-%description -l pl bench
+%description bench -l pl
Programy testuj±ce szybko¶æ serwera MySQL.
-%description -l pt_BR bench
+%description bench -l pt_BR
Este pacote contém medições de desempenho de scripts e dados do MySQL.
+%description bench -l ru
+üÔÏÔ ÐÁËÅÔ ÓÏÄÅÒÖÉÔ ÓËÒÉÐÔÙ É ÄÁÎÎÙÅ ÄÌÑ ÏÃÅÎËÉ ÐÒÏÉÚ×ÏÄÉÔÅÌØÎÏÓÔÉ
+MySQL.
+
+%description bench -l uk
+ãÅÊ ÐÁËÅÔ Í¦ÓÔÉÔØ ÓËÒÉÐÔÉ ÔÁ ÄÁΦ ÄÌÑ ÏæÎËÉ ÐÒÏÄÕËÔÉ×ÎÏÓÔ¦ MySQL.
+
%prep
%setup -q -n %{name}-%{version}
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
-
-chmod +x find-perl-requires
+%patch4 -p1
+%patch5 -p1
+%patch6 -p1
+%patch7 -p1
+%patch8 -p1
%build
-autoconf
-CXXFLAGS="%{?debug:-O0 -g}%{!?debug:$RPM_OPT_FLAGS} -fno-rtti -fno-exceptions -fomit-frame-pointer"
-CFLAGS="%{?debug:-O0 -g}%{!?debug:$RPM_OPT_FLAGS} -fomit-frame-pointer"
+rm -f missing
+%{__libtoolize}
+aclocal
+%{__automake}
+%{__autoconf}
+CXXFLAGS="%{rpmcflags} -fno-rtti -fno-exceptions -fomit-frame-pointer"
+CFLAGS="%{rpmcflags} -fomit-frame-pointer"
%configure \
+ -C \
+ %{!?debug:--without-debug} \
+ %{?_with_innodb:--with-innodb} \
+ %{?_with_bdb:--with-berkeley-db} \
--without-debug \
--enable-shared \
--enable-static \
--with-mysqld-user=mysql \
--with-unix-socket-path=/var/lib/mysql/mysql.sock \
--without-readline \
- --without-berkeley-db \
--without-docs \
--with-low-memory \
- --with-comment="Polish Linux Distribution MySQL RPM"
+ --with-comment="PLD Linux Distribution MySQL RPM"
%{__make} benchdir=$RPM_BUILD_ROOT%{_datadir}/sql-bench
%{__make} -C Docs mysql.info
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT/etc/{logrotate.d,rc.d/init.d,sysconfig} \
- $RPM_BUILD_ROOT/var/{log/{archiv,}/mysql,lib/mysql} \
+ $RPM_BUILD_ROOT/var/{log/{archiv,}/mysql,lib/mysql/db} \
$RPM_BUILD_ROOT%{_infodir}
+%if %{?_with_innodb:1}%{!?_with_innodb:0}
+install -d $RPM_BUILD_ROOT/var/lib/mysql/innodb/{data,log}
+%endif
+
+%if %{?_with_bdb:1}%{!?_with_bdb:0}
+install -d $RPM_BUILD_ROOT/var/lib/mysql/bdb/{log,tmp}
+%endif
+
# Make install
%{__make} install DESTDIR=$RPM_BUILD_ROOT benchdir=%{_datadir}/sql-bench
install Docs/mysql.info $RPM_BUILD_ROOT%{_infodir}
# remove mysqld's *.po files
find . $RPM_BUILD_ROOT%{_datadir}/%{name} -name \*.txt | xargs -n 100 rm -f
mv -f $RPM_BUILD_ROOT%{_libdir}/mysql/lib* $RPM_BUILD_ROOT%{_libdir}
+perl -pi -e 's,%{_libdir}/mysql,%{_libdir},;' $RPM_BUILD_ROOT%{_libdir}/libmysqlclient.la
+
+%clean
+rm -rf $RPM_BUILD_ROOT
%pre
if [ -n "`getgid mysql`" ]; then
if [ "`getgid mysql`" != "89" ]; then
- echo "Warning:group mysql haven't gid=89. Corect this before install mysql" 1>&2
+ echo "Warning: group mysql haven't gid=89. Correct this before installing mysql" 1>&2
exit 1
fi
else
fi
if [ -n "`id -u mysql 2>/dev/null`" ]; then
if [ "`id -u mysql`" != "89" ]; then
- echo "Warning:user mysql haven't uid=89. Corect this before install mysql" 1>&2
+ echo "Warning: user mysql haven't uid=89. Correct this before installing mysql" 1>&2
exit 1
fi
else
%post libs -p /sbin/ldconfig
%postun libs -p /sbin/ldconfig
-%clean
-rm -rf $RPM_BUILD_ROOT
-
%files
%defattr(644,root,root,755)
%attr(640,root,root) %config(noreplace) %verify(not md5 size mtime) /etc/logrotate.d/mysql
%attr(640,root,root) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/mysqld.conf
%attr(755,root,root) %{_bindir}/isamchk
%attr(755,root,root) %{_bindir}/isamlog
-%attr(755,root,root) %{_bindir}/mysqladmin
-%attr(755,root,root) %{_bindir}/mysqlbug
%attr(755,root,root) %{_bindir}/myisamchk
%attr(755,root,root) %{_bindir}/myisamlog
%attr(755,root,root) %{_bindir}/myisampack
%attr(755,root,root) %{_bindir}/pack_isam
%attr(755,root,root) %{_sbindir}/mysqld
+%{_mandir}/man1/isamchk.1*
+%{_mandir}/man1/isamlog.1*
+%{_mandir}/man1/mysqld.1*
-%attr(751,mysql,mysql) %dir /var/lib/mysql
+%attr(751,mysql,mysql) /var/lib/mysql
%attr(750,mysql,mysql) %dir /var/log/mysql
%attr(750,mysql,mysql) %dir /var/log/archiv/mysql
%attr(640,mysql,mysql) %config(noreplace) %verify(not md5 size mtime) /var/log/mysql/*
%{_datadir}/mysql/english
%lang(cs) %{_datadir}/mysql/czech
%lang(da) %{_datadir}/mysql/danish
-%lang(nl) %{_datadir}/mysql/dutch
-%lang(et) %{_datadir}/mysql/estonian
-%lang(fr) %{_datadir}/mysql/french
%lang(de) %{_datadir}/mysql/german
%lang(el) %{_datadir}/mysql/greek
+%lang(es) %{_datadir}/mysql/spanish
+%lang(et) %{_datadir}/mysql/estonian
+%lang(fr) %{_datadir}/mysql/french
%lang(hu) %{_datadir}/mysql/hungarian
%lang(it) %{_datadir}/mysql/italian
%lang(ja) %{_datadir}/mysql/japanese
%lang(ko) %{_datadir}/mysql/korean
+%lang(nl) %{_datadir}/mysql/dutch
+%lang(nn) %{_datadir}/mysql/norwegian-ny
%lang(no) %{_datadir}/mysql/norwegian
-%lang(no@nynorsk) %{_datadir}/mysql/norwegian-ny
%lang(pl) %{_datadir}/mysql/polish
%lang(pt) %{_datadir}/mysql/portuguese
%lang(ro) %{_datadir}/mysql/romanian
%lang(ru) %{_datadir}/mysql/russian
%lang(sk) %{_datadir}/mysql/slovak
-%lang(es) %{_datadir}/mysql/spanish
%lang(sv) %{_datadir}/mysql/swedish
+%lang(uk) %{_datadir}/mysql/ukrainian
%files extras
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/my_print_defaults
%attr(755,root,root) %{_bindir}/replace
%attr(755,root,root) %{_bindir}/resolveip
+%{_mandir}/man1/perror.1*
+%{_mandir}/man1/replace.1*
%files extras-perl
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/mysql_zap
%attr(755,root,root) %{_bindir}/mysql_find_rows
%attr(755,root,root) %{_bindir}/mysqlaccess
+%{_mandir}/man1/mysql_zap.1*
+%{_mandir}/man1/mysqlaccess.1*
%files client
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/mysql
-%attr(755,root,root) %{_bindir}/mysqlbug
%attr(755,root,root) %{_bindir}/mysqldump
%attr(755,root,root) %{_bindir}/mysqlimport
%attr(755,root,root) %{_bindir}/mysqlshow
%attr(755,root,root) %{_bindir}/mysqlbinlog
+%attr(755,root,root) %{_bindir}/mysqladmin
%{_mandir}/man1/mysql.1*
+%{_mandir}/man1/mysqladmin.1*
+%{_mandir}/man1/mysqldump.1*
+%{_mandir}/man1/mysqlshow.1*
%files libs
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/lib*.so.*.*
+%attr(755,root,root) %{_bindir}/mysqlbug
%files devel
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/lib*.la
%attr(755,root,root) %{_libdir}/lib*.so
+%{_libdir}/lib*[^t].a
%{_includedir}/mysql
%files static
%defattr(644,root,root,755)
-%{_libdir}/lib*.a
+%{_libdir}/lib*t.a
%files bench
%defattr(644,root,root,755)
-%attr(-,root,root) %{_datadir}/sql-bench
+%dir %{_datadir}/sql-bench
+%{_datadir}/sql-bench/[CDRl]*
+%attr(755,root,root) %{_datadir}/sql-bench/[bcgrst]*