wok view mysql/receipt @ rev 3261
Add: libffi
author | Matthew Sheets <rcx@zoominternet.net> |
---|---|
date | Mon Jun 01 10:45:43 2009 +0000 (2009-06-01) |
parents | 79e6c7e5b6d3 |
children | bf73355db5de |
line source
1 # SliTaz package receipt.
3 PACKAGE="mysql"
4 VERSION="5.0.77"
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="busybox libmysqlclient mysql-client zlib slitaz-base-files"
12 CONFIG_FILES="/etc/my.cnf"
13 DATABASE_FILES="/var/lib/mysql"
15 # Rules to configure and make the package.
16 compile_rules()
17 {
19 cd $src
20 cp ../stuff/*.files-list .
21 ./configure --prefix=/usr --infodir=/usr/share/info \
22 --datadir=/usr/share --localstatedir=/var/lib/mysql \
23 --with-unix-socket-path=/var/run/mysqld/mysqld.sock \
24 --with-mysqld-user=mysql \
25 --mandir=/usr/share/man $CONFIGURE_ARGS &&
26 make &&
27 make DESTDIR=$PWD/_pkg install
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 strip -s $fs/usr/libexec/*
46 # Package all mysql pkgs
47 for i in $(cd $WOK; ls -d mysql-* libmysql*)
48 do
49 tazwok genpkg $i
50 done
51 }
53 # Pre and post install commands for Tazpkg.
54 post_install()
55 {
56 # adduser mysql if needed
57 if ! grep -q mysql $1/etc/passwd; then
58 echo -n "Adding user mysql..."
59 chroot $1/ /bin/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/ sh -c '/bin/addgroup mysql && /bin/addgroup mysql mysql'
66 status
67 fi
68 chroot $1/ /bin/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 }