wok-next diff mysql/receipt @ rev 14185
asterisk: remove wrong error trigger
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Mar 11 19:01:08 2013 +0100 (2013-03-11) |
parents | d2ea785a98d7 |
children | e9130cce9043 |
line diff
1.1 --- a/mysql/receipt Wed Mar 07 01:21:49 2012 +0100 1.2 +++ b/mysql/receipt Mon Mar 11 19:01:08 2013 +0100 1.3 @@ -1,43 +1,62 @@ 1.4 # SliTaz package receipt. 1.5 1.6 PACKAGE="mysql" 1.7 -VERSION="5.1.54" 1.8 +VERSION="5.5.27" 1.9 CATEGORY="office" 1.10 SHORT_DESC="SQL database system." 1.11 MAINTAINER="pascal.bellard@slitaz.org" 1.12 TARBALL="$PACKAGE-$VERSION.tar.gz" 1.13 WEB_SITE="http://www.mysql.com/" 1.14 -WGET_URL="http://mirrors.sunsite.dk/mysql/Downloads/MySQL-5.1/$TARBALL" 1.15 +WGET_URL="ftp://mirror.switch.ch/mirror/mysql/Downloads/MySQL-5.5/$TARBALL" 1.16 CONFIG_FILES="/etc/mysql/my.cnf" 1.17 DATABASE_FILES="/var/lib/mysql" 1.18 CROSS="bug: can not run test programm" 1.19 1.20 DEPENDS="busybox libmysqlclient mysql-client zlib slitaz-base-files \ 1.21 -gcc-lib-base" 1.22 +gcc-lib-base openssl readline" 1.23 +BUILD_DEPENDS="cmake openssl-dev zlib-dev ncurses-dev readline-dev" 1.24 1.25 # Rules to configure and make the package. 1.26 compile_rules() 1.27 { 1.28 - 1.29 - cd $src 1.30 - grep -q skip_do_abi_check Makefile.am || 1.31 - sed -i 's/^do_abi_check/&:\n\techo "Skipping &"\n\nreally_&/' Makefile.* 1.32 - ./configure \ 1.33 - --prefix=/usr \ 1.34 - --infodir=/usr/share/info \ 1.35 - --datadir=/usr/share \ 1.36 - --localstatedir=/var/lib/mysql \ 1.37 - --sysconfdir=/etc/mysql \ 1.38 - --libexecdir=/usr/sbin \ 1.39 - --with-unix-socket-path=/var/run/mysqld/mysqld.sock \ 1.40 - --with-mysqld-user=mysql \ 1.41 - --enable-thread-safe-client \ 1.42 - --with-plugins=innobase,innodb_plugin \ 1.43 - --mandir=/usr/share/man \ 1.44 - --build=$HOST_SYSTEM \ 1.45 - --host=$HOST_SYSTEM && 1.46 - make $MAKEFLAGS && 1.47 - make install 1.48 + mkdir -p $WOK/$PACKAGE/source/build 1.49 + cd $WOK/$PACKAGE/source/build 1.50 + # CFLAGS/CXXFLAGS as suggested upstream 1.51 + CFLAGS="-fPIC ${CFLAGS} -fno-strict-aliasing -DBIG_JOINS=1 -fomit-frame-pointer" \ 1.52 + CXXFLAGS="-fPIC ${CXXFLAGS} -fno-strict-aliasing -DBIG_JOINS=1 -felide-constructors -fno-rtti" \ 1.53 + cmake ../$PACKAGE-$VERSION \ 1.54 + -DCMAKE_BUILD_TYPE=Release \ 1.55 + -DCMAKE_INSTALL_PREFIX=/usr \ 1.56 + -DSYSCONFDIR=/etc/mysql \ 1.57 + -DMYSQL_DATADIR=/var/lib/mysql \ 1.58 + -DMYSQL_UNIX_ADDR=/var/run/mysqld/mysqld.sock \ 1.59 + -DDEFAULT_CHARSET=utf8 \ 1.60 + -DDEFAULT_COLLATION=utf8_general_ci \ 1.61 + -DENABLED_LOCAL_INFILE=ON \ 1.62 + -DINSTALL_INFODIR=share/mysql/docs \ 1.63 + -DINSTALL_MANDIR=share/man \ 1.64 + -DINSTALL_PLUGINDIR=/usr/lib/mysql/plugin \ 1.65 + -DINSTALL_SCRIPTDIR=bin \ 1.66 + -DINSTALL_INCLUDEDIR=include/mysql \ 1.67 + -DINSTALL_DOCREADMEDIR=share/mysql \ 1.68 + -DINSTALL_SUPPORTFILESDIR=share/mysql \ 1.69 + -DINSTALL_MYSQLSHAREDIR=share/mysql \ 1.70 + -DINSTALL_DOCDIR=share/mysql/docs \ 1.71 + -DINSTALL_SHAREDIR=share/mysql \ 1.72 + -DWITH_READLINE=ON \ 1.73 + -DWITH_ZLIB=system \ 1.74 + -DWITH_SSL=system \ 1.75 + -DWITH_LIBWRAP=OFF \ 1.76 + -DWITH_MYSQLD_LDFLAGS="${LDFLAGS}" \ 1.77 + -DWITH_EXTRA_CHARSETS=complex \ 1.78 + -DWITH_EMBEDDED_SERVER=ON \ 1.79 + -DWITH_INNOBASE_STORAGE_ENGINE=1 \ 1.80 + -DWITH_PARTITION_STORAGE_ENGINE=1 \ 1.81 + -DWITHOUT_EXAMPLE_STORAGE_ENGINE=1 \ 1.82 + -DWITHOUT_ARCHIVE_STORAGE_ENGINE=1 \ 1.83 + -DWITHOUT_BLACKHOLE_STORAGE_ENGINE=1 \ 1.84 + -DWITHOUT_FEDERATED_STORAGE_ENGINE=1 && 1.85 + make && make DESTDIR=$DESTDIR install 1.86 } 1.87 1.88 # Rules to gen a SliTaz package suitable for Tazpkg. 1.89 @@ -52,14 +71,12 @@ 1.90 $fs/var/run/mysqld 1.91 1.92 cp -a $install/usr/bin $fs/usr 1.93 - cp -a $install/usr/sbin $fs/usr 1.94 cp -a $install/usr/lib/mysql/plugin/*.so* $fs/usr/lib/mysql/plugin 1.95 cp -a $install/usr/share/mysql $fs/usr/share 1.96 1.97 # Configuration file 1.98 cp -a $stuff/etc/init.d $fs/etc 1.99 - cp -a $src/support-files/my-medium.cnf $fs/etc/mysql/my.cnf 1.100 - cp -a $src/support-files/my-small.cnf $fs/etc/mysql 1.101 + cp -a $stuff/etc/mysql $fs/etc 1.102 grep -q "bind-address" $fs/etc/mysql/my.cnf || sed -i \ 1.103 's/^\[mysqld\]/[mysqld]\nbind-address\t= 127.0.0.1/' \ 1.104 $fs/etc/mysql/my.cnf 1.105 @@ -89,9 +106,16 @@ 1.106 chroot $1/ adduser -s /bin/false -S -D -H -G $group $user 1.107 status 1.108 fi 1.109 - 1.110 - chroot $1/ chown -R ${user}.${group} /var/lib/mysql /var/run/mysqld 1.111 - 1.112 + # adduser mysql if needed 1.113 + if ! grep -q ${user} $1/etc/passwd; then 1.114 + echo -n "Adding user MySQL..." 1.115 + chroot $1/ /bin/adduser -s /bin/false -h /dev/null \ 1.116 + -g "MySQL Daemon user" -u 27 -H -D -S -G ${group} ${user} 1.117 + status 1.118 + fi 1.119 + #chroot $1/ /bin/chown ${user}.${group} $(cat $1/$INSTALLED/$PACKAGE/files.list) 1.120 + chroot "$1/" /bin/chown -R ${user}.${group} /var/lib/mysql /var/run/mysqld 1.121 + chroot "$1/" mysql_install_db --user=${user} --basedir=/usr 1.122 cat <<EOF 1.123 ---- 1.124 To start $PACKAGE server you can run : 1.125 @@ -113,6 +137,6 @@ 1.126 1.127 post_remove() 1.128 { 1.129 - echo "Removing user/group squid" 1.130 - deluser mysql 1.131 + echo "Removing user/group mysql" 1.132 + chroot "$1/" deluser mysql 1.133 }