# SliTaz package receipt. PACKAGE="mysql" VERSION="5.1.54" CATEGORY="office" SHORT_DESC="SQL database system." MAINTAINER="pascal.bellard@slitaz.org" TARBALL="$PACKAGE-$VERSION.tar.gz" WEB_SITE="http://www.mysql.com/" WGET_URL="http://mirrors.sunsite.dk/mysql/Downloads/MySQL-5.1/$TARBALL" CONFIG_FILES="/etc/mysql/my.cnf" DATABASE_FILES="/var/lib/mysql" CROSS="bug: can not run test programm" DEPENDS="busybox libmysqlclient mysql-client zlib slitaz-base-files \ gcc-lib-base" # Rules to configure and make the package. compile_rules() { cd $src grep -q skip_do_abi_check Makefile.am || sed -i 's/^do_abi_check/&:\n\techo "Skipping &"\n\nreally_&/' Makefile.* ./configure \ --prefix=/usr \ --infodir=/usr/share/info \ --datadir=/usr/share \ --localstatedir=/var/lib/mysql \ --sysconfdir=/etc/mysql \ --libexecdir=/usr/sbin \ --with-unix-socket-path=/var/run/mysqld/mysqld.sock \ --with-mysqld-user=mysql \ --enable-thread-safe-client \ --with-plugins=innobase,innodb_plugin \ --mandir=/usr/share/man \ --build=$HOST_SYSTEM \ --host=$HOST_SYSTEM && make $MAKEFLAGS && make install } # Rules to gen a SliTaz package suitable for Tazpkg. genpkg_rules() { mkdir -p \ $fs/usr/share \ $fs/usr/lib/mysql/plugin \ $fs/etc/mysql \ $fs/etc/mysql.d \ $fs/var/lib/mysql \ $fs/var/run/mysqld cp -a $install/usr/bin $fs/usr cp -a $install/usr/sbin $fs/usr cp -a $install/usr/lib/mysql/plugin/*.so* $fs/usr/lib/mysql/plugin cp -a $install/usr/share/mysql $fs/usr/share # Configuration file cp -a $stuff/etc/init.d $fs/etc cp -a $src/support-files/my-medium.cnf $fs/etc/mysql/my.cnf cp -a $src/support-files/my-small.cnf $fs/etc/mysql grep -q "bind-address" $fs/etc/mysql/my.cnf || sed -i \ 's/^\[mysqld\]/[mysqld]\nbind-address\t= 127.0.0.1/' \ $fs/etc/mysql/my.cnf # Permissions chmod 600 $fs/etc/mysql/my.cnf cat $stuff/*.files-list | while read file; do [ -f $fs$file ] && rm -f $fs$file done } # Pre and post install commands for Tazpkg. post_install() { local user local group user=mysql group=mysql if ! grep -q $user $1/etc/passwd; then echo -n "Adding user/group $user..." chroot $1/ addgroup -S $group chroot $1/ adduser -s /bin/false -S -D -H -G $group $user status fi chroot $1/ chown -R ${user}.${group} /var/lib/mysql /var/run/mysqld cat <