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