wok-6.x view mysql/receipt @ rev 7883

Up: webkit-web-inspector to 1.2.6.
author Christopher Rogers <slaxemulator@gmail.com>
date Tue Jan 04 14:45:48 2011 +0000 (2011-01-04)
parents 8bcec1b4c9d6
children 08d062d6c6db
line source
1 # SliTaz package receipt.
3 PACKAGE="mysql"
4 VERSION="5.1.54"
5 CATEGORY="office"
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.1/$TARBALL"
11 DEPENDS="busybox libmysqlclient mysql-client zlib slitaz-base-files \
12 gcc-lib-base"
13 CONFIG_FILES="/etc/mysql/my.cnf"
14 DATABASE_FILES="/var/lib/mysql"
16 # Rules to configure and make the package.
17 compile_rules()
18 {
20 cd $src
21 grep -q skip_do_abi_check Makefile.am ||
22 sed -i 's/^do_abi_check/&:\n\techo "Skipping &"\n\nreally_&/' Makefile.*
23 ./configure --prefix=/usr --infodir=/usr/share/info \
24 --datadir=/usr/share --localstatedir=/var/lib/mysql \
25 --sysconfdir=/etc/mysql --libexecdir=/usr/sbin \
26 --with-unix-socket-path=/var/run/mysqld/mysqld.sock \
27 --with-mysqld-user=mysql \
28 --enable-thread-safe-client \
29 --with-plugins=innobase,innodb_plugin \
30 --mandir=/usr/share/man $CONFIGURE_ARGS &&
31 make -j 4 &&
32 make DESTDIR=$PWD/_pkg install
33 }
35 # Rules to gen a SliTaz package suitable for Tazpkg.
36 genpkg_rules()
37 {
38 mkdir -p \
39 $fs/usr/share \
40 $fs/usr/lib/mysql/plugin \
41 $fs/etc/mysql \
42 $fs/etc/mysql.d \
43 $fs/var/lib/mysql \
44 $fs/var/run/mysqld
46 cp -a $_pkg/usr/bin $fs/usr
47 cp -a $_pkg/usr/sbin $fs/usr
48 cp -a $_pkg/usr/lib/mysql/plugin/*.so* $fs/usr/lib/mysql/plugin
49 cp -a $_pkg/usr/share/mysql $fs/usr/share
51 # Configuration file
52 cp -a stuff/etc/init.d $fs/etc
53 cp -a $src/support-files/my-medium.cnf $fs/etc/mysql/my.cnf
54 cp -a $src/support-files/my-small.cnf $fs/etc/mysql
55 grep -q "bind-address" $fs/etc/mysql/my.cnf || sed -i \
56 's/^\[mysqld\]/[mysqld]\nbind-address\t= 127.0.0.1/' \
57 $fs/etc/mysql/my.cnf
59 # Permissions
60 chmod 600 $fs/etc/mysql/my.cnf
62 cat $WOK/$PACKAGE/stuff/*.files-list | while read file; do
63 [ -f $fs$file ] && rm -f $fs$file
64 done
66 }
68 # Pre and post install commands for Tazpkg.
69 post_install()
70 {
71 # adduser mysql if needed
72 if ! grep -q mysql $1/etc/passwd; then
73 echo -n "Adding user MySQL..."
74 chroot $1/ /bin/adduser -s /bin/false -h /dev/null \
75 -g "MySQL Daemon user" -H -D -S mysql
76 status
77 fi
78 chroot $1/ /bin/chown mysql.mysql $(cat $1/$INSTALLED/$PACKAGE/files.list)
79 cat <<EOF
80 ----
81 To start $PACKAGE server you can run :
83 /etc/init.d/$PACKAGE start
85 Or add $PACKAGE to RUN_DAEMONS in /etc/rcS.conf
86 ----
87 EOF
88 }
90 pre_install()
91 {
92 # Cleanup old files
93 rm -f $1/usr/libexec/mysql*
94 # Mv config
95 [ -f $1/etc/my.cnf ] && mv -f $1/etc/my.cnf $1/etc/mysql/my.cnf
96 }
98 post_remove()
99 {
100 deluser mysql
101 }