wok-next rev 3359
Up: mysql (5.1.35) - Moved config+libexec and add plugin
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Thu Jun 11 20:02:53 2009 +0200 (2009-06-11) |
parents | 0b10fe4a9b25 |
children | 9907a474f0b5 |
files | libmysqlclient/receipt mysql-client/receipt mysql-dev/receipt mysql-test/receipt mysql/receipt mysql/stuff/mysql-client.files-list mysql/stuff/mysql-dev.files-list mysql/stuff/mysql-test.files-list |
line diff
1.1 --- a/libmysqlclient/receipt Thu Jun 11 20:00:25 2009 +0200 1.2 +++ b/libmysqlclient/receipt Thu Jun 11 20:02:53 2009 +0200 1.3 @@ -1,7 +1,7 @@ 1.4 # SliTaz package receipt. 1.5 1.6 PACKAGE="libmysqlclient" 1.7 -VERSION="5.0.77" 1.8 +VERSION="5.1.35" 1.9 CATEGORY="misc" 1.10 SHORT_DESC="SQL database system client libraries." 1.11 MAINTAINER="pascal.bellard@slitaz.org" 1.12 @@ -13,7 +13,13 @@ 1.13 # Rules to gen a SliTaz package suitable for Tazpkg. 1.14 genpkg_rules() 1.15 { 1.16 - mkdir -p $fs/usr/lib/ 1.17 - cp -a $_pkg/usr/lib/mysql/libmysqlclient*so* $fs/usr/lib/ 1.18 - strip -s $fs/usr/lib/mysql/* 1.19 + mkdir -p $fs/usr/lib/mysql 1.20 + cp -a $_pkg/usr/lib/mysql/libmysqlclient*so* $fs/usr/lib/mysql 1.21 + cd $fs/usr/lib 1.22 + ln -s mysql/libmysqlclient.so . 1.23 + ln -s mysql/libmysqlclient.so.16 . 1.24 + ln -s mysql/libmysqlclient.so.16.0.0 . 1.25 + ln -s mysql/libmysqlclient_r.so . 1.26 + ln -s mysql/libmysqlclient_r.so.16 . 1.27 + ln -s mysql/libmysqlclient_r.so.16.0.0 . 1.28 }
2.1 --- a/mysql-client/receipt Thu Jun 11 20:00:25 2009 +0200 2.2 +++ b/mysql-client/receipt Thu Jun 11 20:02:53 2009 +0200 2.3 @@ -1,7 +1,7 @@ 2.4 # SliTaz package receipt. 2.5 2.6 PACKAGE="mysql-client" 2.7 -VERSION="5.0.77" 2.8 +VERSION="5.1.35" 2.9 CATEGORY="misc" 2.10 SHORT_DESC="SQL database system client files." 2.11 MAINTAINER="pascal.bellard@slitaz.org" 2.12 @@ -17,5 +17,5 @@ 2.13 dir=$(dirname $file) 2.14 [ -d $fs$dir ] || mkdir -p $fs$dir 2.15 cp -a $_pkg$file $fs$file 2.16 - done < $src/$PACKAGE.files-list 2.17 + done < $WOK/$WANTED/stuff/$PACKAGE.files-list 2.18 }
3.1 --- a/mysql-dev/receipt Thu Jun 11 20:00:25 2009 +0200 3.2 +++ b/mysql-dev/receipt Thu Jun 11 20:02:53 2009 +0200 3.3 @@ -1,7 +1,7 @@ 3.4 # SliTaz package receipt. 3.5 3.6 PACKAGE="mysql-dev" 3.7 -VERSION="5.0.77" 3.8 +VERSION="5.1.35" 3.9 CATEGORY="development" 3.10 SHORT_DESC="SQL database system devel files." 3.11 MAINTAINER="pascal.bellard@slitaz.org" 3.12 @@ -12,12 +12,13 @@ 3.13 # Rules to gen a SliTaz package suitable for Tazpkg. 3.14 genpkg_rules() 3.15 { 3.16 - mkdir -p $fs/usr/lib 3.17 + mkdir -p $fs/usr/lib/mysql/plugin 3.18 cp -a $_pkg/usr/include $fs/usr 3.19 - cp -a $_pkg/usr/lib/mysql/*a $fs/usr/lib 3.20 + cp -a $_pkg/usr/lib/mysql/*.*a $fs/usr/lib/mysql 3.21 + cp -a $_pkg/usr/lib/mysql/plugin/*.*a $fs/usr/lib/mysql/plugin 3.22 while read file; do 3.23 dir=$(dirname $file) 3.24 [ -d $fs$dir ] || mkdir -p $fs$dir 3.25 cp -a $_pkg$file $fs$file 3.26 - done < $src/$PACKAGE.files-list 3.27 + done < $WOK/$WANTED/stuff/$PACKAGE.files-list 3.28 }
4.1 --- a/mysql-test/receipt Thu Jun 11 20:00:25 2009 +0200 4.2 +++ b/mysql-test/receipt Thu Jun 11 20:02:53 2009 +0200 4.3 @@ -1,7 +1,7 @@ 4.4 # SliTaz package receipt. 4.5 4.6 PACKAGE="mysql-test" 4.7 -VERSION="5.0.77" 4.8 +VERSION="5.1.35" 4.9 CATEGORY="misc" 4.10 SHORT_DESC="SQL database system tests and benchs." 4.11 MAINTAINER="pascal.bellard@slitaz.org" 4.12 @@ -13,13 +13,13 @@ 4.13 # Rules to gen a SliTaz package suitable for Tazpkg. 4.14 genpkg_rules() 4.15 { 4.16 - mkdir -p $fs/usr/ 4.17 - cp -a $_pkg/usr/mysql-test $fs/usr/ 4.18 - cp -a $_pkg/usr/sql-bench $fs/usr/ 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 + done < $WOK/$WANTED/stuff/$PACKAGE.files-list 4.29 }
5.1 --- a/mysql/receipt Thu Jun 11 20:00:25 2009 +0200 5.2 +++ b/mysql/receipt Thu Jun 11 20:02:53 2009 +0200 5.3 @@ -1,15 +1,15 @@ 5.4 # SliTaz package receipt. 5.5 5.6 PACKAGE="mysql" 5.7 -VERSION="5.0.77" 5.8 +VERSION="5.1.35" 5.9 CATEGORY="misc" 5.10 SHORT_DESC="SQL database system." 5.11 MAINTAINER="pascal.bellard@slitaz.org" 5.12 TARBALL="$PACKAGE-$VERSION.tar.gz" 5.13 WEB_SITE="http://www.mysql.com/" 5.14 -WGET_URL="http://mirrors.sunsite.dk/mysql/Downloads/MySQL-5.0/$TARBALL" 5.15 +WGET_URL="http://mirrors.sunsite.dk/mysql/Downloads/MySQL-5.1/$TARBALL" 5.16 DEPENDS="busybox libmysqlclient mysql-client zlib slitaz-base-files" 5.17 -CONFIG_FILES="/etc/my.cnf" 5.18 +CONFIG_FILES="/etc/mysql/my.cnf" 5.19 DATABASE_FILES="/var/lib/mysql" 5.20 5.21 # Rules to configure and make the package. 5.22 @@ -17,9 +17,9 @@ 5.23 { 5.24 5.25 cd $src 5.26 - cp ../stuff/*.files-list . 5.27 ./configure --prefix=/usr --infodir=/usr/share/info \ 5.28 --datadir=/usr/share --localstatedir=/var/lib/mysql \ 5.29 + --sysconfdir=/etc/mysql --libexecdir=/usr/sbin \ 5.30 --with-unix-socket-path=/var/run/mysqld/mysqld.sock \ 5.31 --with-mysqld-user=mysql \ 5.32 --enable-thread-safe-client \ 5.33 @@ -31,21 +31,36 @@ 5.34 # Rules to gen a SliTaz package suitable for Tazpkg. 5.35 genpkg_rules() 5.36 { 5.37 - mkdir -p $fs/usr/share $fs/etc/mysql.d $fs/var/lib/mysql $fs/var/run/mysqld 5.38 + mkdir -p \ 5.39 + $fs/usr/share \ 5.40 + $fs/usr/lib/mysql/plugin \ 5.41 + $fs/etc/mysql \ 5.42 + $fs/etc/mysql.d \ 5.43 + $fs/var/lib/mysql \ 5.44 + $fs/var/run/mysqld 5.45 + 5.46 cp -a $_pkg/usr/bin $fs/usr 5.47 - cp -a $_pkg/usr/libexec $fs/usr 5.48 + cp -a $_pkg/usr/sbin $fs/usr 5.49 + cp -a $_pkg/usr/lib/mysql/plugin/*.so* $fs/usr/lib/mysql/plugin 5.50 cp -a $_pkg/usr/share/mysql $fs/usr/share 5.51 - cp -a $src/support-files/my-medium.cnf $fs/etc/my.cnf 5.52 - grep -q "bind-address" $fs/etc/my.cnf || sed -i \ 5.53 - 's/^\[mysqld\]/[mysqld]\nbind-address\t= 127.0.0.1/' $fs/etc/my.cnf 5.54 - chmod 600 $fs/etc/my.cnf 5.55 + 5.56 + # Configuration file 5.57 cp -a stuff/etc/init.d $fs/etc 5.58 - cat $src/*.files-list | while read file; do 5.59 + cp -a $src/support-files/my-medium.cnf $fs/etc/mysql/my.cnf 5.60 + cp -a $src/support-files/my-small.cnf $fs/etc/mysql 5.61 + grep -q "bind-address" $fs/etc/mysql/my.cnf || sed -i \ 5.62 + 's/^\[mysqld\]/[mysqld]\nbind-address\t= 127.0.0.1/' \ 5.63 + $fs/etc/mysql/my.cnf 5.64 + 5.65 + # Permissions 5.66 + chmod 600 $fs/etc/mysql/my.cnf 5.67 + 5.68 + cat $WOK/$PACKAGE/stuff/*.files-list | while read file; do 5.69 [ -f $fs$file ] && rm -f $fs$file 5.70 done 5.71 - strip -s $fs/usr/libexec/* 5.72 + 5.73 # Package all mysql pkgs 5.74 - for i in $(cd $WOK; ls -d *bmysql*) 5.75 + for i in $(cd $WOK; ls -d *bmysql* mysql-*) 5.76 do 5.77 grep -q 'WANTED="mysql"' $WOK/$i/receipt && tazwok genpkg $i 5.78 done 5.79 @@ -56,14 +71,9 @@ 5.80 { 5.81 # adduser mysql if needed 5.82 if ! grep -q mysql $1/etc/passwd; then 5.83 - echo -n "Adding user mysql..." 5.84 - chroot $1/ /bin/adduser mysql -s /bin/false -H -D -S 5.85 - status 5.86 - fi 5.87 - # addgroup mysql if needed 5.88 - if ! grep -q mysql $1/etc/group; then 5.89 - echo -n "Adding group mysql..." 5.90 - chroot $1/ sh -c '/bin/addgroup mysql && /bin/addgroup mysql mysql' 5.91 + echo -n "Adding user MySQL..." 5.92 + chroot $1/ /bin/adduser -s /bin/false -h /dev/null \ 5.93 + -g "MySQL Daemon user" -H -D -S mysql 5.94 status 5.95 fi 5.96 chroot $1/ /bin/chown mysql.mysql $(cat $1/$INSTALLED/$PACKAGE/files.list) 5.97 @@ -78,8 +88,15 @@ 5.98 EOF 5.99 } 5.100 5.101 +pre_install() 5.102 +{ 5.103 + # Cleanup old files 5.104 + rm -f $1/usr/libexec/mysql* 5.105 + # Mv config 5.106 + [ -f $1/etc/my.cnf ] && mv -f $1/etc/my.cnf $1/etc/mysql/my.cnf 5.107 +} 5.108 + 5.109 post_remove() 5.110 { 5.111 deluser mysql 5.112 - delgroup mysql 5.113 }
6.1 --- a/mysql/stuff/mysql-client.files-list Thu Jun 11 20:00:25 2009 +0200 6.2 +++ b/mysql/stuff/mysql-client.files-list Thu Jun 11 20:02:53 2009 +0200 6.3 @@ -1,7 +1,6 @@ 6.4 /usr/bin/msql2mysql 6.5 /usr/bin/mysql 6.6 /usr/bin/mysql_find_rows 6.7 -/usr/bin/mysql_tableinfo 6.8 /usr/bin/mysql_waitpid 6.9 /usr/bin/mysqlaccess 6.10 /usr/bin/mysqladmin