# HG changeset patch # User Pascal Bellard # Date 1216906363 0 # Node ID 91e8a40cf500f9e5b10d85cd145185550367499f # Parent 51159e05b5605b225c854d237c26d2d2e0c48a17 Add mysql diff -r 51159e05b560 -r 91e8a40cf500 libmysqlclient/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libmysqlclient/receipt Thu Jul 24 13:32:43 2008 +0000 @@ -0,0 +1,17 @@ +# SliTaz package receipt. + +PACKAGE="libmysqlclient" +VERSION="5.0.51b" +CATEGORY="system" +SHORT_DESC="SQL database system client libraries." +MAINTAINER="pascal.bellard@slitaz.org" +TARBALL="$PACKAGE-$VERSION.tar.gz" +WEB_SITE="http://www.mysql.com/" +WANTED="mysql" + +# Rules to gen a SliTaz package suitable for Tazpkg. +genpkg_rules() +{ + mkdir -p $fs/usr/lib/ + cp -a $_pkg/usr/lib/mysql/libmysqlclient*so* $fs/usr/lib/ +} diff -r 51159e05b560 -r 91e8a40cf500 mysql-client/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mysql-client/receipt Thu Jul 24 13:32:43 2008 +0000 @@ -0,0 +1,21 @@ +# SliTaz package receipt. + +PACKAGE="mysql-client" +VERSION="5.0.51b" +CATEGORY="system" +SHORT_DESC="SQL database system client files." +MAINTAINER="pascal.bellard@slitaz.org" +TARBALL="$PACKAGE-$VERSION.tar.gz" +WEB_SITE="http://www.mysql.com/" +WANTED="mysql" +DEPENDS="libmysqlclient zlib ncurses" + +# Rules to gen a SliTaz package suitable for Tazpkg. +genpkg_rules() +{ + while read file; do + dir=$(dirname $file) + [ -d $fs$dir ] || mkdir -p $fs$dir + cp -a $_pkg$file $fs$file + done < $src/$PACKAGE.files-list +} diff -r 51159e05b560 -r 91e8a40cf500 mysql-dev/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mysql-dev/receipt Thu Jul 24 13:32:43 2008 +0000 @@ -0,0 +1,22 @@ +# SliTaz package receipt. + +PACKAGE="mysql-dev" +VERSION="5.0.51b" +CATEGORY="development" +SHORT_DESC="SQL database system devel files." +MAINTAINER="pascal.bellard@slitaz.org" +WEB_SITE="http://www.mysql.com/" +WANTED="mysql" + +# Rules to gen a SliTaz package suitable for Tazpkg. +genpkg_rules() +{ + mkdir -p $fs/usr/lib + cp -a $_pkg/usr/include $fs/usr + cp -a $_pkg/usr/lib/mysql/*a $fs/usr/lib + while read file; do + dir=$(dirname $file) + [ -d $fs$dir ] || mkdir -p $fs$dir + cp -a $_pkg$file $fs$file + done < $src/$PACKAGE.files-list +} diff -r 51159e05b560 -r 91e8a40cf500 mysql-test/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mysql-test/receipt Thu Jul 24 13:32:43 2008 +0000 @@ -0,0 +1,25 @@ +# SliTaz package receipt. + +PACKAGE="mysql-test" +VERSION="5.0.51b" +CATEGORY="system" +SHORT_DESC="SQL database system tests and benchs." +MAINTAINER="pascal.bellard@slitaz.org" +TARBALL="$PACKAGE-$VERSION.tar.gz" +WEB_SITE="http://www.mysql.com/" +WANTED="mysql" +DEPENDS="mysql perl" + +# Rules to gen a SliTaz package suitable for Tazpkg. +genpkg_rules() +{ + mkdir -p $fs/usr/ + cp -a $_pkg/usr/mysql-test $fs/usr/ + cp -a $_pkg/usr/sql-bench $fs/usr/ + find $fs/usr/mysql-test $fs/usr/sql-bench -type d -exec chmod 2777 {} \; + while read file; do + dir=$(dirname $file) + [ -d $fs$dir ] || mkdir -p $fs$dir + cp -a $_pkg$file $fs$file + done < $src/$PACKAGE.files-list +} diff -r 51159e05b560 -r 91e8a40cf500 mysql/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mysql/receipt Thu Jul 24 13:32:43 2008 +0000 @@ -0,0 +1,71 @@ +# SliTaz package receipt. + +PACKAGE="mysql" +VERSION="5.0.51b" +CATEGORY="system" +SHORT_DESC="SQL database system." +MAINTAINER="pascal.bellard@slitaz.org" +TARBALL="$PACKAGE-$VERSION.tar.gz" +WEB_SITE="http://www.mysql.com/" +WGET_URL="http://mirrors.sunsite.dk/mysql/Downloads/MySQL-5.0/$TARBALL" +DEPENDS="libmysqlclient mysql-client zlib" + +# Rules to configure and make the package. +compile_rules() +{ + + cd $src +# --with-big-tables ? + ./configure --prefix=/usr --infodir=/usr/share/info \ + --datadir=/usr/share --localstatedir=/var/lib/mysql \ + --with-unix-socket-path=/var/run/mysqld/mysqld.sock \ + --with-mysqld-user=mysql \ + --mandir=/usr/share/man $CONFIGURE_ARGS + make + make DESTDIR=$PWD/_pkg install + cp ../stuff/*.files-list . +} + +# Rules to gen a SliTaz package suitable for Tazpkg. +genpkg_rules() +{ + mkdir -p $fs/usr/share $fs/etc $fs/var/lib/mysql $fs/var/run/mysqld + cp -a $_pkg/usr/bin $fs/usr + cp -a $_pkg/usr/libexec $fs/usr + cp -a $_pkg/usr/share/mysql $fs/usr/share + cp -a $src/support-files/my-medium.cnf $fs/etc/my.cnf + cp -a stuff/etc/init.d $fs/etc + cat $src/*.files-list | while read file; do + [ -f $fs$file ] && rm -f $fs$file + done + # Package all mysql pkgs + for i in $(cd $WOK; ls -d mysql-* libmysql*) + do + tazwok genpkg $i + done +} + +# Pre and post install commands for Tazpkg. +post_install() +{ + # adduser mysql if needed + if ! grep -q mysql $1/etc/passwd; then + echo -n "Adding user mysql..." + chroot $1/ adduser mysql -s /bin/false -H -D -S + status + fi + # addgroup mysql if needed + if ! grep -q mysql $1/etc/group; then + echo -n "Adding group mysql..." + chroot $1/ addgroup mysql && addgroup mysql mysql + status + fi + chroot $1/ chown mysql.mysql $(cat $INSTALLED/$PACKAGE/files.list) + chroot $1/ mysql_install_db --user=mysql --datadir=/var/lib/mysql +} + +post_remove() +{ + deluser mysql + delgroup mysql +} diff -r 51159e05b560 -r 91e8a40cf500 mysql/stuff/etc/init.d/mysql --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mysql/stuff/etc/init.d/mysql Thu Jul 24 13:32:43 2008 +0000 @@ -0,0 +1,59 @@ +#!/bin/sh +# /etc/init.d/mysql : Start, stop and restart MySQL server on SliTaz, at +# boot time or with the command line. +# +# To start MySQL server at boot time, just put mysql in the $RUN_DAEMONS +# variable of /etc/rcS.conf and configure options with /etc/daemons.conf +# +. /etc/init.d/rc.functions +. /etc/daemons.conf + +NAME=Mysql +DESC="MySQL server" +DAEMON=/usr/bin/mysqld_safe +OPTIONS=$MYSQL_OPTIONS +PIDFILE=/var/run/mysqld/mysql.pid +[ -n "$OPTIONS" ] || OPTIONS="--pid-file=$PIDFILE --datadir=/var/lib/mysql --user=mysql --socket=/var/run/mysqld/mysqld.sock" + +case "$1" in + start) + if [ -f $PIDFILE ] ; then + echo "$NAME already running." + exit 1 + fi + echo -n "Starting $DESC: $NAME... " + $DAEMON $OPTIONS & + status + sleep 2 + ;; + stop) + if [ ! -f $PIDFILE ] ; then + echo "$NAME is not running." + exit 1 + fi + echo -n "Stopping $DESC: $NAME... " + kill `cat $PIDFILE` + status + sleep 2 + ;; + restart) + if [ ! -f $PIDFILE ] ; then + echo "$NAME is not running." + exit 1 + fi + echo -n "Restarting $DESC: $NAME... " + kill `cat $PIDFILE` + sleep 2 + $DAEMON $OPTIONS & + status + sleep 2 + ;; + *) + echo "" + echo -e "\033[1mUsage:\033[0m /etc/init.d/`basename $0` [start|stop|restart]" + echo "" + exit 1 + ;; +esac + +exit 0 diff -r 51159e05b560 -r 91e8a40cf500 mysql/stuff/etc/logrotate.d/mysql --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mysql/stuff/etc/logrotate.d/mysql Thu Jul 24 13:32:43 2008 +0000 @@ -0,0 +1,36 @@ +# This logname can be set in /etc/my.cnf +# by setting the variable "err-log" +# in the [safe_mysqld] section as follows: +# +# [safe_mysqld] +# err-log=/var/lib/mysql/mysqld.log +# +# If the root user has a password you have to create a +# /root/.my.cnf configuration file with the following +# content: +# +# [mysqladmin] +# password = +# user= root +# +# where "" is the password. +# +# ATTENTION: This /root/.my.cnf should be readable ONLY +# for root ! + +/var/lib/mysql/mysqld.log { + # create 600 mysql mysql + notifempty + daily + rotate 3 + missingok + compress + postrotate + # just if mysqld is really running + if test -x /usr/bin/mysqladmin && \ + /usr/bin/mysqladmin ping &>/dev/null + then + /usr/bin/mysqladmin flush-logs + fi + endscript +} diff -r 51159e05b560 -r 91e8a40cf500 mysql/stuff/mysql-client.files-list --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mysql/stuff/mysql-client.files-list Thu Jul 24 13:32:43 2008 +0000 @@ -0,0 +1,12 @@ +/usr/bin/msql2mysql +/usr/bin/mysql +/usr/bin/mysql_find_rows +/usr/bin/mysql_tableinfo +/usr/bin/mysql_waitpid +/usr/bin/mysqlaccess +/usr/bin/mysqladmin +/usr/bin/mysqlbinlog +/usr/bin/mysqlcheck +/usr/bin/mysqldump +/usr/bin/mysqlimport +/usr/bin/mysqlshow diff -r 51159e05b560 -r 91e8a40cf500 mysql/stuff/mysql-dev.files-list --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mysql/stuff/mysql-dev.files-list Thu Jul 24 13:32:43 2008 +0000 @@ -0,0 +1,2 @@ +/usr/bin/comp_err +/usr/bin/mysql_config diff -r 51159e05b560 -r 91e8a40cf500 mysql/stuff/mysql-test.files-list --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mysql/stuff/mysql-test.files-list Thu Jul 24 13:32:43 2008 +0000 @@ -0,0 +1,3 @@ +/usr/bin/mysql_client_test +/usr/bin/mysqltestmanager-pwgen +/usr/bin/mysqltestmanagerc