wok-next rev 1140

Add mysql
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Jul 24 13:32:43 2008 +0000 (2008-07-24)
parents 51159e05b560
children 6c71fe9f8fd5
files libmysqlclient/receipt mysql-client/receipt mysql-dev/receipt mysql-test/receipt mysql/receipt mysql/stuff/etc/init.d/mysql mysql/stuff/etc/logrotate.d/mysql mysql/stuff/mysql-client.files-list mysql/stuff/mysql-dev.files-list mysql/stuff/mysql-test.files-list
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/libmysqlclient/receipt	Thu Jul 24 13:32:43 2008 +0000
     1.3 @@ -0,0 +1,17 @@
     1.4 +# SliTaz package receipt.
     1.5 +
     1.6 +PACKAGE="libmysqlclient"
     1.7 +VERSION="5.0.51b"
     1.8 +CATEGORY="system"
     1.9 +SHORT_DESC="SQL database system client libraries."
    1.10 +MAINTAINER="pascal.bellard@slitaz.org"
    1.11 +TARBALL="$PACKAGE-$VERSION.tar.gz"
    1.12 +WEB_SITE="http://www.mysql.com/"
    1.13 +WANTED="mysql"
    1.14 +
    1.15 +# Rules to gen a SliTaz package suitable for Tazpkg.
    1.16 +genpkg_rules()
    1.17 +{
    1.18 +	mkdir -p $fs/usr/lib/
    1.19 +	cp -a $_pkg/usr/lib/mysql/libmysqlclient*so* $fs/usr/lib/
    1.20 +}
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/mysql-client/receipt	Thu Jul 24 13:32:43 2008 +0000
     2.3 @@ -0,0 +1,21 @@
     2.4 +# SliTaz package receipt.
     2.5 +
     2.6 +PACKAGE="mysql-client"
     2.7 +VERSION="5.0.51b"
     2.8 +CATEGORY="system"
     2.9 +SHORT_DESC="SQL database system client files."
    2.10 +MAINTAINER="pascal.bellard@slitaz.org"
    2.11 +TARBALL="$PACKAGE-$VERSION.tar.gz"
    2.12 +WEB_SITE="http://www.mysql.com/"
    2.13 +WANTED="mysql"
    2.14 +DEPENDS="libmysqlclient zlib ncurses"
    2.15 +
    2.16 +# Rules to gen a SliTaz package suitable for Tazpkg.
    2.17 +genpkg_rules()
    2.18 +{
    2.19 +	while read file; do
    2.20 +		dir=$(dirname $file)
    2.21 +		[ -d $fs$dir ] || mkdir -p $fs$dir
    2.22 +		cp -a $_pkg$file $fs$file
    2.23 +	done < $src/$PACKAGE.files-list
    2.24 +}
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/mysql-dev/receipt	Thu Jul 24 13:32:43 2008 +0000
     3.3 @@ -0,0 +1,22 @@
     3.4 +# SliTaz package receipt.
     3.5 +
     3.6 +PACKAGE="mysql-dev"
     3.7 +VERSION="5.0.51b"
     3.8 +CATEGORY="development"
     3.9 +SHORT_DESC="SQL database system devel files."
    3.10 +MAINTAINER="pascal.bellard@slitaz.org"
    3.11 +WEB_SITE="http://www.mysql.com/"
    3.12 +WANTED="mysql"
    3.13 +
    3.14 +# Rules to gen a SliTaz package suitable for Tazpkg.
    3.15 +genpkg_rules()
    3.16 +{
    3.17 +	mkdir -p $fs/usr/lib
    3.18 +	cp -a $_pkg/usr/include $fs/usr
    3.19 +	cp -a $_pkg/usr/lib/mysql/*a $fs/usr/lib
    3.20 +	while read file; do
    3.21 +		dir=$(dirname $file)
    3.22 +		[ -d $fs$dir ] || mkdir -p $fs$dir
    3.23 +		cp -a $_pkg$file $fs$file
    3.24 +	done < $src/$PACKAGE.files-list
    3.25 +}
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/mysql-test/receipt	Thu Jul 24 13:32:43 2008 +0000
     4.3 @@ -0,0 +1,25 @@
     4.4 +# SliTaz package receipt.
     4.5 +
     4.6 +PACKAGE="mysql-test"
     4.7 +VERSION="5.0.51b"
     4.8 +CATEGORY="system"
     4.9 +SHORT_DESC="SQL database system tests and benchs."
    4.10 +MAINTAINER="pascal.bellard@slitaz.org"
    4.11 +TARBALL="$PACKAGE-$VERSION.tar.gz"
    4.12 +WEB_SITE="http://www.mysql.com/"
    4.13 +WANTED="mysql"
    4.14 +DEPENDS="mysql perl"
    4.15 +
    4.16 +# Rules to gen a SliTaz package suitable for Tazpkg.
    4.17 +genpkg_rules()
    4.18 +{
    4.19 +	mkdir -p $fs/usr/
    4.20 +	cp -a $_pkg/usr/mysql-test $fs/usr/
    4.21 +	cp -a $_pkg/usr/sql-bench $fs/usr/
    4.22 +	find $fs/usr/mysql-test $fs/usr/sql-bench -type d -exec chmod 2777 {} \;
    4.23 +	while read file; do
    4.24 +		dir=$(dirname $file)
    4.25 +		[ -d $fs$dir ] || mkdir -p $fs$dir
    4.26 +		cp -a $_pkg$file $fs$file
    4.27 +	done < $src/$PACKAGE.files-list
    4.28 +}
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/mysql/receipt	Thu Jul 24 13:32:43 2008 +0000
     5.3 @@ -0,0 +1,71 @@
     5.4 +# SliTaz package receipt.
     5.5 +
     5.6 +PACKAGE="mysql"
     5.7 +VERSION="5.0.51b"
     5.8 +CATEGORY="system"
     5.9 +SHORT_DESC="SQL database system."
    5.10 +MAINTAINER="pascal.bellard@slitaz.org"
    5.11 +TARBALL="$PACKAGE-$VERSION.tar.gz"
    5.12 +WEB_SITE="http://www.mysql.com/"
    5.13 +WGET_URL="http://mirrors.sunsite.dk/mysql/Downloads/MySQL-5.0/$TARBALL"
    5.14 +DEPENDS="libmysqlclient mysql-client zlib"
    5.15 +
    5.16 +# Rules to configure and make the package.
    5.17 +compile_rules()
    5.18 +{
    5.19 +
    5.20 +	cd $src
    5.21 +# --with-big-tables ?
    5.22 +	./configure --prefix=/usr --infodir=/usr/share/info \
    5.23 +		--datadir=/usr/share --localstatedir=/var/lib/mysql \
    5.24 +		--with-unix-socket-path=/var/run/mysqld/mysqld.sock \
    5.25 +		--with-mysqld-user=mysql \
    5.26 +		--mandir=/usr/share/man $CONFIGURE_ARGS
    5.27 +	make
    5.28 +	make DESTDIR=$PWD/_pkg install
    5.29 +	cp ../stuff/*.files-list .
    5.30 +}
    5.31 +
    5.32 +# Rules to gen a SliTaz package suitable for Tazpkg.
    5.33 +genpkg_rules()
    5.34 +{
    5.35 +	mkdir -p $fs/usr/share $fs/etc $fs/var/lib/mysql $fs/var/run/mysqld
    5.36 +	cp -a $_pkg/usr/bin $fs/usr
    5.37 +	cp -a $_pkg/usr/libexec $fs/usr
    5.38 +	cp -a $_pkg/usr/share/mysql $fs/usr/share
    5.39 +	cp -a $src/support-files/my-medium.cnf $fs/etc/my.cnf
    5.40 +	cp -a stuff/etc/init.d $fs/etc
    5.41 +	cat $src/*.files-list | while read file; do
    5.42 +		[ -f $fs$file ] && rm -f $fs$file
    5.43 +	done
    5.44 +	# Package all mysql pkgs
    5.45 +	for i in $(cd $WOK; ls -d mysql-* libmysql*)
    5.46 +	do
    5.47 +		tazwok genpkg $i
    5.48 +	done
    5.49 +}
    5.50 +
    5.51 +# Pre and post install commands for Tazpkg.
    5.52 +post_install()
    5.53 +{
    5.54 +	# adduser mysql if needed
    5.55 +	if ! grep -q mysql $1/etc/passwd; then
    5.56 +		echo -n "Adding user mysql..."
    5.57 +		chroot $1/ adduser mysql -s /bin/false -H -D -S
    5.58 +		status
    5.59 +	fi
    5.60 +	# addgroup mysql if needed
    5.61 +	if ! grep -q mysql $1/etc/group; then
    5.62 +		echo -n "Adding group mysql..."
    5.63 +		chroot $1/ addgroup mysql && addgroup mysql mysql
    5.64 +		status
    5.65 +	fi
    5.66 +	chroot $1/ chown mysql.mysql $(cat $INSTALLED/$PACKAGE/files.list)
    5.67 +	chroot $1/ mysql_install_db --user=mysql --datadir=/var/lib/mysql
    5.68 +}
    5.69 +
    5.70 +post_remove()
    5.71 +{
    5.72 +	deluser mysql
    5.73 +	delgroup mysql
    5.74 +}
     6.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.2 +++ b/mysql/stuff/etc/init.d/mysql	Thu Jul 24 13:32:43 2008 +0000
     6.3 @@ -0,0 +1,59 @@
     6.4 +#!/bin/sh
     6.5 +# /etc/init.d/mysql : Start, stop and restart MySQL server on SliTaz, at 
     6.6 +# boot time or with the command line.
     6.7 +#
     6.8 +# To start MySQL server at boot time, just put mysql in the $RUN_DAEMONS
     6.9 +# variable of /etc/rcS.conf and configure options with /etc/daemons.conf
    6.10 +#
    6.11 +. /etc/init.d/rc.functions
    6.12 +. /etc/daemons.conf
    6.13 +
    6.14 +NAME=Mysql
    6.15 +DESC="MySQL server"
    6.16 +DAEMON=/usr/bin/mysqld_safe
    6.17 +OPTIONS=$MYSQL_OPTIONS
    6.18 +PIDFILE=/var/run/mysqld/mysql.pid
    6.19 +[ -n "$OPTIONS" ] || OPTIONS="--pid-file=$PIDFILE --datadir=/var/lib/mysql --user=mysql --socket=/var/run/mysqld/mysqld.sock"
    6.20 +
    6.21 +case "$1" in
    6.22 +  start)
    6.23 +    if [ -f $PIDFILE ] ; then
    6.24 +      echo "$NAME already running."
    6.25 +      exit 1
    6.26 +    fi
    6.27 +    echo -n "Starting $DESC: $NAME... "
    6.28 +    $DAEMON $OPTIONS &
    6.29 +    status
    6.30 +    sleep 2
    6.31 +    ;;
    6.32 +  stop)
    6.33 +    if [ ! -f $PIDFILE ] ; then
    6.34 +      echo "$NAME is not running."
    6.35 +      exit 1
    6.36 +    fi
    6.37 +    echo -n "Stopping $DESC: $NAME... "
    6.38 +    kill `cat $PIDFILE`
    6.39 +    status
    6.40 +    sleep 2
    6.41 +    ;;
    6.42 +  restart)
    6.43 +    if [ ! -f $PIDFILE ] ; then
    6.44 +      echo "$NAME is not running."
    6.45 +      exit 1
    6.46 +    fi
    6.47 +    echo -n "Restarting $DESC: $NAME... "
    6.48 +    kill `cat $PIDFILE`
    6.49 +    sleep 2
    6.50 +    $DAEMON $OPTIONS &
    6.51 +    status
    6.52 +    sleep 2
    6.53 +    ;;
    6.54 +  *)
    6.55 +    echo ""
    6.56 +    echo -e "\033[1mUsage:\033[0m /etc/init.d/`basename $0` [start|stop|restart]"
    6.57 +    echo ""
    6.58 +    exit 1
    6.59 +    ;;
    6.60 +esac
    6.61 +
    6.62 +exit 0
     7.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.2 +++ b/mysql/stuff/etc/logrotate.d/mysql	Thu Jul 24 13:32:43 2008 +0000
     7.3 @@ -0,0 +1,36 @@
     7.4 +# This logname can be set in /etc/my.cnf
     7.5 +# by setting the variable "err-log"
     7.6 +# in the [safe_mysqld] section as follows:
     7.7 +#
     7.8 +# [safe_mysqld]
     7.9 +# err-log=/var/lib/mysql/mysqld.log
    7.10 +#
    7.11 +# If the root user has a password you have to create a
    7.12 +# /root/.my.cnf configuration file with the following
    7.13 +# content:
    7.14 +#
    7.15 +# [mysqladmin]
    7.16 +# password = <secret> 
    7.17 +# user= root
    7.18 +#
    7.19 +# where "<secret>" is the password. 
    7.20 +#
    7.21 +# ATTENTION: This /root/.my.cnf should be readable ONLY
    7.22 +# for root !
    7.23 +
    7.24 +/var/lib/mysql/mysqld.log {
    7.25 +        # create 600 mysql mysql
    7.26 +        notifempty
    7.27 +	daily
    7.28 +        rotate 3
    7.29 +        missingok
    7.30 +        compress
    7.31 +    postrotate
    7.32 +	# just if mysqld is really running
    7.33 +	if test -x /usr/bin/mysqladmin && \
    7.34 +	   /usr/bin/mysqladmin ping &>/dev/null
    7.35 +	then
    7.36 +	   /usr/bin/mysqladmin flush-logs
    7.37 +	fi
    7.38 +    endscript
    7.39 +}
     8.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.2 +++ b/mysql/stuff/mysql-client.files-list	Thu Jul 24 13:32:43 2008 +0000
     8.3 @@ -0,0 +1,12 @@
     8.4 +/usr/bin/msql2mysql
     8.5 +/usr/bin/mysql
     8.6 +/usr/bin/mysql_find_rows
     8.7 +/usr/bin/mysql_tableinfo
     8.8 +/usr/bin/mysql_waitpid
     8.9 +/usr/bin/mysqlaccess
    8.10 +/usr/bin/mysqladmin
    8.11 +/usr/bin/mysqlbinlog
    8.12 +/usr/bin/mysqlcheck
    8.13 +/usr/bin/mysqldump
    8.14 +/usr/bin/mysqlimport
    8.15 +/usr/bin/mysqlshow
     9.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     9.2 +++ b/mysql/stuff/mysql-dev.files-list	Thu Jul 24 13:32:43 2008 +0000
     9.3 @@ -0,0 +1,2 @@
     9.4 +/usr/bin/comp_err
     9.5 +/usr/bin/mysql_config
    10.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    10.2 +++ b/mysql/stuff/mysql-test.files-list	Thu Jul 24 13:32:43 2008 +0000
    10.3 @@ -0,0 +1,3 @@
    10.4 +/usr/bin/mysql_client_test
    10.5 +/usr/bin/mysqltestmanager-pwgen
    10.6 +/usr/bin/mysqltestmanagerc