Packager: Jean-Michel Dault <jmdault@mandrakesoft.com> Distribution: Linux-Mandrake Vendor: MandrakeSoft %define mysql_version 3.23.23-beta %define shared_lib_version 9:0:0 %define release 1mdk %define mysqld_user mysql %define sysconfdir /etc %define var /var %define localstatedir %{var}/lib %define see_base For a description of MySQL see the base MySQL RPM or http://www.mysql.com Name: MySQL Summary: MySQL: a very fast and reliable SQL database engine Group: Databases Summary(pt_BR): MySQL: Um servidor SQL rápido e confiável. Group(pt_BR): Aplicações/Banco_de_Dados Version: 3.23.23 Release: %{release} Copyright: GPL / LGPL Source: http://www.mysql.com/Downloads/MySQL-3.23/mysql-%{mysql_version}.tar.bz2 Icon: mysql.gif URL: http://www.mysql.com/ Provides: msqlormysql MySQL-server mysqlserver Requires: MySQL-client Obsoletes: mysql BuildRequires: libtermcap-devel, libstdc++-devel %ifarch alpha BuildRequires: egcs %endif # Think about what you use here since the first step is to # run a rm -rf BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot # From the manual %description MySQL is a true multi-user, multi-threaded SQL (Structured Query Language) database server. MySQL is a client/server implementation that consists of a server daemon (mysqld) and many different client programs/libraries. The main goals of MySQL are speed, robustness and ease of use. MySQL was originally developed because we needed a SQL server that could handle very big databases with magnitude higher speed than what any database vendor could offer to us. And since we did not need all the features that made their server slow we made our own. We have now been using MySQL since 1996 in a environment with more than 40 databases, 10,000 tables, of which more than 500 have more than 7 million rows. This is about 200G of data. The base upon which MySQL is built is a set of routines that have been used in a highly demanding production environment for many years. While MySQL is still in development, it already offers a rich and highly useful function set. See the documentation for more information %description -l fr MySQL est un serveur de bases de donnees SQL vraiment multi-usagers et multi-taches. Le langage SQL est le langage de bases de donnees le plus populaire au monde. MySQL est une implementation client/serveur qui consiste en un serveur (mysqld) et differents programmes/bibliotheques clientes. Les objectifs principaux de MySQL sont: vitesse, robustesse et facilite d'utilisation. MySQL fut originalement developpe parce que nous, chez Tcx, avions besoin d'un serveur SQL qui pouvait gerer de tres grandes bases de donnees avec une vitesse d'un ordre de magnitude superieur a ce que n'importe quel vendeur pouvait nous offrir. Nous utilisons MySQL depuis 1996 dans un environnement avec plus de 40 bases de donnees, 10000 tables, desquelles plus de 500 ont plus de 7 millions de lignes. Ceci represente environ 200G de donnees. A la base de la conception de MySQL, on retrouve une serie de routines qui ont ete utilisees dans un environnement de production pendant plusieurs annees. Meme si MySQL est encore en developpement, il offre deja une riche et utile serie de fonctions. Voyez la documentation pour de plus amples renseignements. %description -l pt_BR O MySQL é um servidor de banco de dados SQL realmente multiusuário e\ multi-tarefa. A linguagem SQL é a mais popular linguagem para banco de\ dados no mundo. O MySQL é uma implementação cliente/servidor que\ consiste de um servidor chamado mysqld e diversos\ programas/bibliotecas clientes. Os principais objetivos do MySQL são:\ velocidade, robustez e facilidade de uso. O MySQL foi originalmente\ desenvolvido porque nós na Tcx precisávamos de um servidor SQL que\ pudesse lidar com grandes bases de dados e com uma velocidade muito\ maior do que a que qualquer vendedor podia nos oferecer. Estamos\ usando\ o MySQL desde 1996 em um ambiente com mais de 40 bases de dados com 10.000\ tabelas, das quais mais de 500 têm mais de 7 milhões de linhas. Isto é o\ equivalente a aproximadamente 50G de dados críticos. A base da construção do\ MySQL é uma série de rotinas que foram usadas em um ambiente de produção com\ alta demanda por muitos anos. Mesmo o MySQL estando ainda em desenvolvimento,\ ele já oferece um conjunto de funções muito ricas e úteis. Veja a documentação\ para maiores informações. %package client Release: %{release} Summary: MySQL - Client Group: Databases Summary(pt_BR): MySQL - Cliente Group(pt_BR): Banco_de_Dados Obsoletes: mysql-client Requires: MySQL-shared %description client This package contains the standard MySQL clients. %{see_base} %description client -l pt_BR Este pacote contém os clientes padrão para o MySQL. %description client -l fr Ce package contient les clients MySQL standards %package bench Release: %{release} Requires: MySQL-client perl-Mysql Summary: MySQL - Benchmarks Group: Databases Summary(pt_BR): MySQL - Medições de desempenho Group(pt_BR): Banco_de_Dados Obsoletes: mysql-bench %description bench This package contains MySQL benchmark scripts and data. %{see_base} %description bench -l pt_BR Este pacote contém medições de desempenho de scripts e dados do MySQL. %description bench -l fr Ce package contient les scripts et les donnees de reference MySQL %package devel Release: %{release} Requires: MySQL-client Summary: MySQL - Development header files and libraries Group: Databases Summary(pt_BR): MySQL - Medições de desempenho Group(pt_BR): Banco_de_Dados Obsoletes: mysql-devel %description devel This package contains the development header files and libraries necessary to develop MySQL client applications. %{see_base} %description devel -l pt_BR Este pacote contém os arquivos de cabeçalho (header files) e bibliotecas necessárias para desenvolver aplicações clientes do MySQL. %description devel -l fr Ce package contient les fichiers entetes et les librairies de developpement necessaires pour developper des applications clientes MySQL. %package shared Release: %{release} Summary: MySQL - Shared libraries Group: Databases Obsoletes: MySQL-shared-libs %description shared This package contains the shared libraries (*.so*) which certain languages and applications need to dynamically load and use MySQL. %prep %setup -T -c -n mysql-%{mysql_version} cd .. ## On some platforms, like Solaris, it takes this to extract the archive. bzip2 -dc %{SOURCE0}| tar xvif - cd mysql-%{mysql_version} chmod a-s sql-bench -R chmod g-w sql-bench -R %build %ifarch alpha export MYSQL_BUILD_CC="gcc -V`egcs-version`" export MYSQL_BUILD_CXX="g++ -V`egcs-version`" %endif # The all-static flag is to make the RPM work on different # distributions. This version tries to put shared mysqlcliet libraries # in a separate package. BuildMySQL() { # The --enable-assembler simply does nothing on systems that does not # support assembler speedups. sh -c "PATH=\"${MYSQL_BUILD_PATH:-/usr/local/bin:/bin:%{_bindir}}\" \ CC=\"${MYSQL_BUILD_CC:-gcc}\" \ CFLAGS=\"${MYSQL_BUILD_CFLAGS:-$RPM_OPT_FLAGS}\" \ CXX=\"${MYSQL_BUILD_CXX:-g++}\" \ CXXFLAGS=\"${MYSQL_BUILD_CXXFLAGS:-$RPM_OPT_FLAGS}\" \ ./configure \ $* \ --enable-assembler \ --with-mysqld-user=%{mysqld_user} \ --with-unix-socket-path=/var/lib/mysql/mysql.sock \ --prefix=/ \ --with-extra-charsets=complex \ --exec-prefix=%{_prefix} \ --libexecdir=%{_sbindir} \ --sysconfdir=%{sysconfdir} \ --datadir=%{_datadir} \ --localstatedir=%{localstatedir}/mysql \ --infodir=%{_infodir} \ --includedir=%{_includedir} \ --mandir=%{_mandir} \ --with-comment=\"%{distribution} MySQL RPM\"; # Add this for more debugging support # --with-debug # Add this for MyISAM RAID support: # --with-raid " if [ `uname` = "SunOS" ];then cp -f config.h config.h.bak cat config.h.bak|grep -v HAVE_TERM_H > config.h fi # benchdir does not fit in above model. Maybe a separate bench distribution make benchdir=$RPM_BUILD_ROOT%{_datadir}/sql-bench } # Use the build root for temporary storage of the shared libraries. RBR=$RPM_BUILD_ROOT MBD=$RPM_BUILD_DIR/mysql-%{mysql_version} if test -z "$RBR" -o "$RBR" = "/" then echo "RPM_BUILD_ROOT has stupid value" exit 1 fi rm -rf $RBR mkdir -p $RBR BuildMySQL "--enable-shared --enable-thread-safe-client" # Save shared libraries (cd libmysql/.libs; tar cf $RBR/shared-libs.tar *.so*) (cd libmysql_r/.libs; tar rf $RBR/shared-libs.tar *.so*) %install -n mysql-%{mysql_version} RBR=$RPM_BUILD_ROOT MBD=$RPM_BUILD_DIR/mysql-%{mysql_version} # Ensure that needed directories exists install -d $RBR%{sysconfdir}/{logrotate.d,rc.d/init.d} install -d $RBR%{localstatedir}/mysql/mysql install -d $RBR%{_datadir}/sql-bench install -d $RBR%{_sbindir} install -d $RBR%{_datadir} install -d $RBR%{_mandir} install -d $RBR%{_includedir} install -d $RBR%{_infodir} install -d $RBR%{_docdir}/MySQL-%{mysql_version} install -d $RBR%{_libdir} # Make install make install DESTDIR=$RBR benchdir=%{_datadir}/sql-bench # Install shared libraries (Disable for architectures that don't support it) (cd $RBR%{_libdir}; tar xf $RBR/shared-libs.tar) if [ `uname` = "SunOS" ];then mv $RBR/etc/rc.d/* $RPB/etc/ fi # Install logrotate and autostart install -m644 $MBD/support-files/mysql-log-rotate $RBR%{sysconfdir}/logrotate.d/mysql if [ `uname` = "Linux" ]; then install -m755 $MBD/support-files/mysql.server $RBR/etc/rc.d/init.d/mysql fi if [ `uname` = "SunOS" ]; then install -m755 $MBD/support-files/mysql.server $RBR/etc/init.d/mysql fi # Install docs install -m644 $RPM_BUILD_DIR/mysql-%{mysql_version}/Docs/mysql.info \ $RBR%{_infodir}/mysql.info for file in README COPYING COPYING.LIB Docs/manual_toc.html Docs/manual.html \ Docs/manual.txt Docs/manual.texi Docs/manual.ps \ support-files/my-huge.cnf support-files/my-large.cnf \ support-files/my-medium.cnf support-files/my-small.cnf do b=`basename $file` install -m644 $MBD/$file $RBR%{_docdir}/MySQL-%{mysql_version}/$b done %pre if [ `uname` = "Linux" ];then if test -x /etc/rc.d/init.d/mysql then /etc/rc.d/init.d/mysql stop > /dev/null 2>&1 echo "Giving mysqld a couple of seconds to exit nicely" sleep 5 fi fi if [ `uname` = "SunOS" ];then if test -x /etc/init.d/mysql then /etc/rc.d/init.d/mysql stop > /dev/null 2>&1 echo "Giving mysqld a couple of seconds to exit nicely" sleep 5 fi fi %post /sbin/install-info %{_infodir}/mysql.info.bz2 %{_infodir}/dir mysql_datadir=%{localstatedir}/mysql # Create data directory if needed if test ! -d $mysql_datadir; then mkdir $mysql_datadir; fi if test ! -d $mysql_datadir/mysql; then mkdir $mysql_datadir/mysql; fi if test ! -d $mysql_datadir/test; then mkdir $mysql_datadir/test; fi # Make MySQL start/shutdown automatically when the machine does it. if [ `uname` = "Linux" ]; then /sbin/chkconfig --add mysql fi # Create a MySQL user. Do not report any problems if it already # exists. This is redhat specific and should be handled more portable if [ `uname` = "Linux" ];then useradd -M -r -d $mysql_datadir -s /bin/bash -c "MySQL server" mysql 2> /dev/null || true fi if [ `uname` = "SunOS" ];then useradd -d $mysql_datadir -s /bin/sh -c "MySQL server" mysql 2> /dev/null || true fi # Change permissions so that the user that will run the MySQL daemon # owns all database files. chown -R mysql $mysql_datadir # Initiate databases mysql_install_db -IN-RPM # Change permissions again to fix any new files. chown -R mysql $mysql_datadir # Fix permissions for the permission database so that only the user # can read them. chmod -R og-rw $mysql_datadir/mysql # Restart in the same way that mysqld will be started normally. if [ "$DURING_INSTALL" = "" ]; then if [ `uname` = "Linux" ]; then /etc/rc.d/init.d/mysql start fi if [ `uname` = "SunOS" ]; then /etc/init.d/mysql start fi # Allow safe_mysqld to start mysqld and print a message before we exit sleep 2 fi %preun if [ `uname` = "Linux" ]; then if test -x /etc/rc.d/init.d/mysql then /etc/rc.d/init.d/mysql stop > /dev/null fi fi if [ `uname` = "SunOS" ]; then if test -x /etc/init.d/mysql then /etc/init.d/mysql stop > /dev/null fi fi # Remove autostart of mysql if [ `uname` = "Linux" ]; then if test $1 = 0 then /sbin/chkconfig --del mysql /sbin/install-info --delete %{_infodir}/mysql.info.bz2 %{_infodir}/dir fi fi # We do not remove the mysql user since it may still own a lot of # database files. %files %defattr(-,root,root) %attr(-, root, root) %doc %{_docdir}/MySQL-%{mysql_version}/ %attr(755, root, root) %{_bindir}/isamchk %attr(755, root, root) %{_bindir}/isamlog %attr(755, root, root) %{_bindir}/mysql_fix_privilege_tables %attr(755, root, root) %{_bindir}/mysql_install_db %attr(755, root, root) %{_bindir}/mysql_setpermission %attr(755, root, root) %{_bindir}/mysql_zap %attr(755, root, root) %{_bindir}/mysqlbug %attr(755, root, root) %{_bindir}/perror %attr(755, root, root) %{_bindir}/replace %attr(755, root, root) %{_bindir}/resolveip %attr(755, root, root) %{_bindir}/safe_mysqld %attr(644, root, root) %{_infodir}/mysql.info* %attr(755, root, root) %{_sbindir}/mysqld %config %{sysconfdir}/* %attr(755, root, root) %{_datadir}/mysql/ %attr(755, root, root) %{_bindir}/pack_isam %attr(755, root, root) %{_bindir}/myisamchk %attr(755, root, root) %{_bindir}/myisamlog %attr(755, root, root) %{_bindir}/myisampack %attr(755, root, root) %{_bindir}/mysql_convert_table_format %attr(755, root, root) %{_bindir}/mysql_config %attr(755, root, root) %{_bindir}/mysqlhotcopy %attr(755, root, root) %{_bindir}/my_print_defaults %files client %attr(755, root, root) %{_bindir}/msql2mysql %attr(755, root, root) %{_bindir}/mysql %attr(755, root, root) %{_bindir}/mysqlaccess %attr(755, root, root) %{_bindir}/mysqladmin %attr(755, root, root) %{_bindir}/mysqldump %attr(755, root, root) %{_bindir}/mysqlimport %attr(755, root, root) %{_bindir}/mysqlshow %attr(644, root, man) %doc %{_mandir}/man1/mysql.1* %attr(755, root, root) %{_bindir}/mysqlbug %attr(755, root, root) %{_bindir}/mysql_find_rows %attr(755, root, root) %{_bindir}/mysqlbinlog %post shared if [ `uname` = "Linux" ];then /sbin/ldconfig fi %postun shared if [ `uname` = "Linux" ];then /sbin/ldconfig fi %files devel %attr(755, root, root) %{_bindir}/comp_err %attr(755, root, root) %{_includedir}/mysql/ %attr(755, root, root) %{_libdir}/mysql/*.a %attr(755, root, root) %{_libdir}/mysql/*.la %attr(755, root, root) %{_libdir}/*.so %attr(755, root, root) %{_bindir}/mysql_config %files shared # Shared libraries (omit for architectures that don't support them) %attr(755, root, root) %{_libdir}/*.so.* %files bench %attr(-, root, root) %{_datadir}/sql-bench %changelog * Sat Sep 02 2000 Jean-Michel Dault <jmdault@mandrakesoft.com> 3.23.23-1mdk - Updated to 3.23.23 to correct php segfaults - Added separate libmysql_r directory; now both a threaded and non-threaded library is shipped. * Tue Aug 09 2000 Jean-Michel Dault <jmdault@mandrakesoft.com> 3.23.22-2mdk - Put libmysqlclient.so in devel package * Mon Aug 07 2000 Jean-Michel Dault <jmdault@mandrakesoft.com> 3.23.22-1mdk - Updated to 3.23.22 (this is a beta version, but starting from 3.23.19, the license is GPL, so we prefer the beta to the non-GPL stable tree) - Macroize - Merged with the spec from David Axmark <davida@mysql.com> :Added the support-files/my-example.cnf to the docs directory. :Removed devel dependency on base since it is about client development. :The --enable-assembler switch is now automatically disables on platforms there assembler code is unavailable. This should allow building this RPM on non i386 systems. * Tue May 16 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 3.22.32-6mdk - Recompile with egcs on alpha. * Tue Apr 18 2000 Pixel <pixel@mandrakesoft.com> 3.22.32-5mdk - disable starting of mysql while in install * Thu Apr 06 2000 Jean-Michel Dault <jmdault@mandrakesoft.com> 3.22.32-4mdk - fix bench perms * Thu Apr 06 2000 Jean-Michel Dault <jmdault@mandrakesoft.com> 3.22.32-3mdk - cleaned spec file * Mon Apr 03 2000 Jean-Michel Dault <jmdault@mandrakesoft.com> 3.22.32-2mdk - new group * Mon Feb 27 2000 Jean-Michel Dault <jmdault@netrevolution.com> 3.22.32-1mdk - updated to 3.22.32 - security updates * Wed Jan 19 2000 Jean-Michel Dault <jmdault@netrevolution.com> - updated to 3.22.30 * Mon Jan 3 2000 Jean-Michel Dault <jmdault@netrevolution.com> - final cleanup for Mandrake 7 * Mon Jan 3 2000 Jean-Michel Dault <jmdault@netrevolution.com> - updated to 3.22.29 * Wed Dec 31 1999 Jean-Michel Dault <jmdault@netrevolution.com> - rebuilt for Mandrake 7.0 * Sat Dec 12 1999 Jean-Michel Dault <jmdault@netrevolution.com> - updated to 3.22.27 * Wed Sep 1 1999 Jean-Michel Dault <jmdault@netrevolution.com> - put the shared libs in separate package - fixed dependancies * Thu Aug 19 1999 Jean-Michel Dault <jmdault@netrevolution.com> - added fr locale - Mandrake adaptations - Solaris adaptations * Mon Feb 22 1999 David Axmark <david@detron.se> - Removed unportable cc switches from the spec file. The defaults can now be overridden with environment variables. This feature is used to compile the official RPM with optimal (but compiler version specific) switches. - Removed the repetitive description parts for the sub rpms. Maybe add again if RPM gets a multiline macro capability. - Added support for a pt_BR translation. Translation contributed by Jorge Godoy <jorge@bestway.com.br>. * Wed Nov 4 1998 David Axmark <david@detron.se> - A lot of changes in all the rpm and install scripts. This may even be a working RPM :-) * Sun Aug 16 1998 David Axmark <david@detron.se> - A developers changelog for MySQL is available in the source RPM. And there is a history of major user visible changed in the Reference Manual. Only RPM specific changes will be documented here.