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

Add udisk (1.94.0)
author Christophe Lincoln <pankso@slitaz.org>
date Thu Apr 26 14:14:29 2012 +0200 (2012-04-26)
parents 8e4c74abdf74
children 96e4513829cd
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 CONFIG_FILES="/etc/mysql/my.cnf"
12 DATABASE_FILES="/var/lib/mysql"
13 CROSS="bug: can not run test programm"
15 DEPENDS="busybox libmysqlclient mysql-client zlib slitaz-base-files \
16 gcc-lib-base"
18 # Rules to configure and make the package.
19 compile_rules()
20 {
22 cd $src
23 grep -q skip_do_abi_check Makefile.am ||
24 sed -i 's/^do_abi_check/&:\n\techo "Skipping &"\n\nreally_&/' Makefile.*
25 ./configure \
26 --prefix=/usr \
27 --infodir=/usr/share/info \
28 --datadir=/usr/share \
29 --localstatedir=/var/lib/mysql \
30 --sysconfdir=/etc/mysql \
31 --libexecdir=/usr/sbin \
32 --with-unix-socket-path=/var/run/mysqld/mysqld.sock \
33 --with-mysqld-user=mysql \
34 --enable-thread-safe-client \
35 --with-plugins=innobase,innodb_plugin \
36 --mandir=/usr/share/man \
37 --build=$HOST_SYSTEM \
38 --host=$HOST_SYSTEM &&
39 make $MAKEFLAGS &&
40 make install
41 }
43 # Rules to gen a SliTaz package suitable for Tazpkg.
44 genpkg_rules()
45 {
46 mkdir -p \
47 $fs/usr/share \
48 $fs/usr/lib/mysql/plugin \
49 $fs/etc/mysql \
50 $fs/etc/mysql.d \
51 $fs/var/lib/mysql \
52 $fs/var/run/mysqld
54 cp -a $install/usr/bin $fs/usr
55 cp -a $install/usr/sbin $fs/usr
56 cp -a $install/usr/lib/mysql/plugin/*.so* $fs/usr/lib/mysql/plugin
57 cp -a $install/usr/share/mysql $fs/usr/share
59 # Configuration file
60 cp -a $stuff/etc/init.d $fs/etc
61 cp -a $src/support-files/my-medium.cnf $fs/etc/mysql/my.cnf
62 cp -a $src/support-files/my-small.cnf $fs/etc/mysql
63 grep -q "bind-address" $fs/etc/mysql/my.cnf || sed -i \
64 's/^\[mysqld\]/[mysqld]\nbind-address\t= 127.0.0.1/' \
65 $fs/etc/mysql/my.cnf
67 # Permissions
68 chmod 600 $fs/etc/mysql/my.cnf
70 cat $stuff/*.files-list | while read file; do
71 [ -f $fs$file ] && rm -f $fs$file
72 done
74 }
76 # Pre and post install commands for Tazpkg.
77 post_install()
78 {
80 local user
81 local group
83 user=mysql
84 group=mysql
86 if ! grep -q $user $1/etc/passwd; then
87 echo -n "Adding user/group $user..."
88 chroot $1/ addgroup -S $group
89 chroot $1/ adduser -s /bin/false -S -D -H -G $group $user
90 status
91 fi
93 chroot $1/ chown -R ${user}.${group} /var/lib/mysql /var/run/mysqld
95 cat <<EOF
96 ----
97 To start $PACKAGE server you can run :
99 /etc/init.d/$PACKAGE start
101 Or add $PACKAGE to RUN_DAEMONS in /etc/rcS.conf
102 ----
103 EOF
104 }
106 pre_install()
107 {
108 # Cleanup old files
109 rm -f $1/usr/libexec/mysql*
110 # Mv config
111 [ -f $1/etc/my.cnf ] && mv -f $1/etc/my.cnf $1/etc/mysql/my.cnf
112 }
114 post_remove()
115 {
116 echo "Removing user/group squid"
117 deluser mysql
118 }