wok annotate mariadb/receipt @ rev 14892
Add: qupzilla-locales
author | Claudinei Pereira <claudinei@slitaz.org> |
---|---|
date | Thu Jul 25 18:53:19 2013 -0300 (2013-07-25) |
parents | e9130cce9043 |
children | 408c87fa22ca |
rev | line source |
---|---|
erjo@13054 | 1 # SliTaz package receipt. |
erjo@13054 | 2 |
erjo@13054 | 3 PACKAGE="mariadb" |
erjo@14808 | 4 VERSION="5.5.30" |
erjo@13054 | 5 CATEGORY="office" |
erjo@13054 | 6 SHORT_DESC="SQL database system." |
erjo@13054 | 7 MAINTAINER="erjo@slitaz.org" |
erjo@13054 | 8 TARBALL="$PACKAGE-$VERSION.tar.gz" |
erjo@13054 | 9 WEB_SITE="http://mariadb.org/en/" |
erjo@13058 | 10 WGET_URL="http://pangolin.slitaz.org/downloads/sources/$TARBALL" |
pascal@14772 | 11 CONFIG_FILES="/etc/mysql" |
pascal@14772 | 12 TAZPANEL_DAEMON="man|edit::/etc/mysql/my.cnf|options|web::$WEB_SITE" |
erjo@13054 | 13 PROVIDE="mysql" |
erjo@13054 | 14 |
erjo@13054 | 15 CONFIG_FILES="/etc/mysql/my.cnf" |
erjo@13054 | 16 DATABASE_FILES="/var/lib/mysql" |
erjo@13054 | 17 CROSS="bug: can not run test programm" |
erjo@13054 | 18 |
erjo@13054 | 19 DEPENDS="busybox libmariadbclient mariadb-client zlib slitaz-base-files \ |
erjo@13054 | 20 gcc-lib-base" |
pascal@13064 | 21 BUILD_DEPENDS="cmake ncurses-dev" |
erjo@13054 | 22 |
erjo@13054 | 23 # Rules to configure and make the package. |
erjo@13054 | 24 compile_rules() |
erjo@13054 | 25 { |
erjo@13054 | 26 |
erjo@13054 | 27 cd $src |
erjo@13054 | 28 cmake . -DCMAKE_INSTALL_PREFIX=/usr \ |
erjo@13054 | 29 -DINSTALL-DOCREADMEDIR=/usr/share/doc \ |
erjo@13054 | 30 -DINSTALL_MYSQLDATADIR=/var/lib/mysql \ |
erjo@13054 | 31 -DINSTALL_SYSCONFDIR=/etc \ |
erjo@13054 | 32 -DINSTALL_LIBDIR=lib/mysql \ |
erjo@13054 | 33 -DINSTALL_INFODIR=share/doc/mysql \ |
erjo@13054 | 34 -DINSTALL_MANDIR=share/man \ |
erjo@13054 | 35 -DINSTALL_PLUGINDIR=lib/mysql/plugin \ |
erjo@13054 | 36 -DINSTALL_SHAREDIR=share \ |
erjo@13054 | 37 -DINSTALL_MYSQLSHAREDIR=share/mysql \ |
erjo@13054 | 38 -DINSTALL_UNIX_ADDRDIR=/var/run/mysqld/mysqld.sock |
erjo@13054 | 39 make $MAKEFLAGS && |
erjo@13054 | 40 make install |
erjo@13054 | 41 } |
erjo@13054 | 42 |
erjo@13054 | 43 # Rules to gen a SliTaz package suitable for Tazpkg. |
erjo@13054 | 44 genpkg_rules() |
erjo@13054 | 45 { |
erjo@13054 | 46 mkdir -p \ |
erjo@13054 | 47 $fs/usr/share \ |
erjo@13054 | 48 $fs/usr/lib/mysql/plugin \ |
erjo@13054 | 49 $fs/etc/mysql \ |
erjo@13054 | 50 $fs/etc/mysql.d \ |
erjo@14808 | 51 $fs/var/lib/mysql |
erjo@13054 | 52 |
erjo@13054 | 53 cp -a $install/usr/bin $fs/usr |
erjo@13054 | 54 cp -a $install/usr/scripts/* $fs/usr/bin |
erjo@13054 | 55 cp -a $install/usr/lib/mysql/plugin/*.so* $fs/usr/lib/mysql/plugin |
erjo@13054 | 56 cp -a $install/usr/share/mysql $fs/usr/share |
erjo@13054 | 57 |
erjo@13054 | 58 # Configuration file |
erjo@13054 | 59 cp -a $stuff/etc/init.d $fs/etc |
erjo@13054 | 60 cp -a $src/support-files/my-medium.cnf $fs/etc/mysql/my.cnf |
erjo@13054 | 61 cp -a $src/support-files/my-small.cnf $fs/etc/mysql |
erjo@13054 | 62 grep -q "bind-address" $fs/etc/mysql/my.cnf || sed -i \ |
erjo@13054 | 63 's/^\[mysqld\]/[mysqld]\nbind-address\t= 127.0.0.1/' \ |
erjo@13054 | 64 $fs/etc/mysql/my.cnf |
erjo@13054 | 65 |
erjo@13054 | 66 # Permissions |
erjo@13054 | 67 chmod 600 $fs/etc/mysql/my.cnf |
erjo@13054 | 68 |
erjo@13054 | 69 cat $stuff/*.files-list | while read file; do |
erjo@13054 | 70 [ -f $fs$file ] && rm -f $fs$file |
erjo@13054 | 71 done |
erjo@13054 | 72 |
erjo@13054 | 73 } |
erjo@13054 | 74 |
erjo@13054 | 75 # Pre and post install commands for Tazpkg. |
erjo@13054 | 76 post_install() |
erjo@13054 | 77 { |
erjo@13054 | 78 |
erjo@13054 | 79 local user |
erjo@13054 | 80 local group |
erjo@13054 | 81 |
erjo@13054 | 82 user=mysql |
erjo@13054 | 83 group=mysql |
erjo@13054 | 84 |
erjo@13054 | 85 if ! grep -q $user $1/etc/passwd; then |
erjo@13054 | 86 echo -n "Adding user/group $user..." |
erjo@13054 | 87 chroot $1/ addgroup -S $group |
erjo@13054 | 88 chroot $1/ adduser -s /bin/false -S -D -H -G $group $user |
erjo@13054 | 89 status |
erjo@13054 | 90 fi |
erjo@13054 | 91 |
erjo@14808 | 92 mkdir -p $1/var/run/mysqld |
erjo@13054 | 93 chroot $1/ chown -R ${user}.${group} /var/lib/mysql /var/run/mysqld |
erjo@13054 | 94 |
erjo@13054 | 95 cat <<EOF |
erjo@13054 | 96 ---- |
erjo@13054 | 97 To start $PACKAGE server you can run : |
erjo@13054 | 98 |
erjo@13054 | 99 /etc/init.d/$PACKAGE start |
erjo@13054 | 100 |
erjo@13054 | 101 Or add $PACKAGE to RUN_DAEMONS in /etc/rcS.conf |
erjo@13054 | 102 ---- |
erjo@13054 | 103 EOF |
erjo@13054 | 104 } |
erjo@13054 | 105 |
erjo@13054 | 106 pre_install() |
erjo@13054 | 107 { |
erjo@13054 | 108 # Cleanup old files |
erjo@13054 | 109 rm -f $1/usr/libexec/mysql* |
erjo@13054 | 110 # Mv config |
erjo@13054 | 111 [ -f $1/etc/my.cnf ] && mv -f $1/etc/my.cnf $1/etc/mysql/my.cnf |
erjo@13054 | 112 } |
erjo@13054 | 113 |
erjo@13054 | 114 post_remove() |
erjo@13054 | 115 { |
erjo@13054 | 116 echo "Removing user/group mysl" |
erjo@13054 | 117 deluser mysql |
erjo@13054 | 118 } |