wok view mysql/receipt @ rev 1201

squirrelmail: enable default plugins
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Aug 08 16:12:50 2008 +0000 (2008-08-08)
parents 42f40e9e6a2f
children 2311495e3c1a
line source
1 # SliTaz package receipt.
3 PACKAGE="mysql"
4 VERSION="5.0.51b"
5 CATEGORY="system"
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"
13 # Rules to configure and make the package.
14 compile_rules()
15 {
17 cd $src
18 # --with-big-tables ?
19 ./configure --prefix=/usr --infodir=/usr/share/info \
20 --datadir=/usr/share --localstatedir=/var/lib/mysql \
21 --with-unix-socket-path=/var/run/mysqld/mysqld.sock \
22 --with-mysqld-user=mysql \
23 --mandir=/usr/share/man $CONFIGURE_ARGS
24 make
25 make DESTDIR=$PWD/_pkg install
26 cp ../stuff/*.files-list .
27 }
29 # Rules to gen a SliTaz package suitable for Tazpkg.
30 genpkg_rules()
31 {
32 mkdir -p $fs/usr/share $fs/etc $fs/var/lib/mysql $fs/var/run/mysqld
33 cp -a $_pkg/usr/bin $fs/usr
34 cp -a $_pkg/usr/libexec $fs/usr
35 cp -a $_pkg/usr/share/mysql $fs/usr/share
36 cp -a $src/support-files/my-medium.cnf $fs/etc/my.cnf
37 chmod 600 $fs/etc/my.cnf
38 cp -a stuff/etc/init.d $fs/etc
39 cat $src/*.files-list | while read file; do
40 [ -f $fs$file ] && rm -f $fs$file
41 done
42 # Package all mysql pkgs
43 for i in $(cd $WOK; ls -d mysql-* libmysql*)
44 do
45 tazwok genpkg $i
46 done
47 }
49 # Pre and post install commands for Tazpkg.
50 post_install()
51 {
52 ( cd $1/ ; cpio -o -H newc | gzip -9 ) > \
53 $1/$INSTALLED/$PACKAGE/volatile.cpio.gz <<EOT
54 etc/my.cnf
55 EOT
56 # adduser mysql if needed
57 if ! grep -q mysql $1/etc/passwd; then
58 echo -n "Adding user mysql..."
59 chroot $1/ adduser mysql -s /bin/false -H -D -S
60 status
61 fi
62 # addgroup mysql if needed
63 if ! grep -q mysql $1/etc/group; then
64 echo -n "Adding group mysql..."
65 chroot $1/ addgroup mysql && addgroup mysql mysql
66 status
67 fi
68 chroot $1/ chown mysql.mysql $(cat $1/$INSTALLED/$PACKAGE/files.list)
69 cat <<EOF
70 ----
71 To start $PACKAGE server you can run :
73 /etc/init.d/$PACKAGE start
75 Or add $PACKAGE to RUN_DAEMONS in /etc/rcS.conf
76 ----
77 EOF
78 }
80 post_remove()
81 {
82 deluser mysql
83 delgroup mysql
84 }
86 repack_cleanup()
87 {
88 zcat $INSTALLED/$PACKAGE/volatile.cpio.gz | ( cd $1 ; cpio -id )
89 }