wok-stable view mysql/receipt @ rev 2068
Add perl-soap-lite
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri Jan 23 17:56:28 2009 +0000 (2009-01-23) |
parents | 49b2e5444f68 |
children | 181a5b592274 |
line source
1 # SliTaz package receipt.
3 PACKAGE="mysql"
4 VERSION="5.0.51b"
5 CATEGORY="misc"
6 SHORT_DESC="SQL database system."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 TARBALL="$PACKAGE-$VERSION.tar.gz"
9 WEB_SITE="http://www.mysql.com/"
10 WGET_URL="http://mirrors.sunsite.dk/mysql/Downloads/MySQL-5.0/$TARBALL"
11 DEPENDS="libmysqlclient mysql-client zlib slitaz-base-files"
12 CONFIG_FILES="/etc/my.cnf"
14 # Rules to configure and make the package.
15 compile_rules()
16 {
18 cd $src
19 # --with-big-tables ?
20 ./configure --prefix=/usr --infodir=/usr/share/info \
21 --datadir=/usr/share --localstatedir=/var/lib/mysql \
22 --with-unix-socket-path=/var/run/mysqld/mysqld.sock \
23 --with-mysqld-user=mysql \
24 --mandir=/usr/share/man $CONFIGURE_ARGS
25 make
26 make DESTDIR=$PWD/_pkg install
27 cp ../stuff/*.files-list .
28 }
30 # Rules to gen a SliTaz package suitable for Tazpkg.
31 genpkg_rules()
32 {
33 mkdir -p $fs/usr/share $fs/etc/mysql.d $fs/var/lib/mysql $fs/var/run/mysqld
34 cp -a $_pkg/usr/bin $fs/usr
35 cp -a $_pkg/usr/libexec $fs/usr
36 cp -a $_pkg/usr/share/mysql $fs/usr/share
37 cp -a $src/support-files/my-medium.cnf $fs/etc/my.cnf
38 grep -q "bind-address" $fs/etc/my.cnf || sed -i \
39 's/^\[mysqld\]/[mysqld]\nbind-address\t= 127.0.0.1/' $fs/etc/my.cnf
40 chmod 600 $fs/etc/my.cnf
41 cp -a stuff/etc/init.d $fs/etc
42 cat $src/*.files-list | while read file; do
43 [ -f $fs$file ] && rm -f $fs$file
44 done
45 # Package all mysql pkgs
46 for i in $(cd $WOK; ls -d mysql-* libmysql*)
47 do
48 tazwok genpkg $i
49 done
50 }
52 # Pre and post install commands for Tazpkg.
53 post_install()
54 {
55 # adduser mysql if needed
56 if ! grep -q mysql $1/etc/passwd; then
57 echo -n "Adding user mysql..."
58 chroot $1/ adduser mysql -s /bin/false -H -D -S
59 status
60 fi
61 # addgroup mysql if needed
62 if ! grep -q mysql $1/etc/group; then
63 echo -n "Adding group mysql..."
64 chroot $1/ addgroup mysql && addgroup mysql mysql
65 status
66 fi
67 chroot $1/ chown mysql.mysql $(cat $1/$INSTALLED/$PACKAGE/files.list)
68 cat <<EOF
69 ----
70 To start $PACKAGE server you can run :
72 /etc/init.d/$PACKAGE start
74 Or add $PACKAGE to RUN_DAEMONS in /etc/rcS.conf
75 ----
76 EOF
77 }
79 post_remove()
80 {
81 deluser mysql
82 delgroup mysql
83 }