#!/bin/bash ## src2pkg script for: mysql ## Auto-generated by sb2sp-0.6 ## sb2sp - Copyright 2009-2010 Gilbert Ashley ## This script is based on mysql.SlackBuild # Copyright 2008, 2009 Patrick J. Volkerding, Sebeka, Minnesota, USA ## See the end of this file for the full Copyright/License SOURCE_NAME='mysql-5.0.81.tar.xz' NAME='mysql' # Use ALT_NAME to override guessed value VERSION='5.0.81' # Use ALT_VERSION to override guessed value # ARCH='x86_64' #BUILD='1' # PRE_FIX='usr' # Any extra options go here: # EXTRA_CONFIGS="" # Optional function replaces configure_source, compile_source, fake_install build() { CFLAGS="$CFLAGS" \ CXXFLAGS="$CFLAGS -felide-constructors -fno-exceptions -fno-rtti" \ CXX=gcc ./configure --prefix=/usr --libdir=/usr/lib${LIBDIRSUFFIX} \ --with-mysqld-user=mysql --with-unix-socket-path=/var/run/mysql/mysql.sock \ --localstatedir=/var/lib/mysql --enable-assembler --with-raid --without-debug \ --enable-thread-safe-client --without-bench --with-extra-charsets=complex \ --with-vio --with-openssl # # --without-readline make $NUMJOBS || make || exit 1 ${VERIFY} make install DESTDIR="$PKG_DIR" } # Get the functions and configs . /usr/libexec/src2pkg/FUNCTIONS ; # Execute the named packaging steps: pre_process find_source make_dirs unpack_source fix_source_perms configure_source # compile_source # If used, the 'build' function replaces these 3 fake_install # # Install support files mkdir -p $PKG_DIR/etc cp support-files/my-{huge,large,medium,small}.cnf $PKG_DIR/etc # This is the directory where databases are stored mkdir -p $PKG_DIR/var/lib/mysql chown mysql.mysql $PKG_DIR/var/lib/mysql chmod 0750 $PKG_DIR/var/lib/mysql # This is where the socket is stored mkdir -p $PKG_DIR/var/run/mysql chown mysql.mysql $PKG_DIR/var/run/mysql chmod 0755 $PKG_DIR/var/run/mysql # Do not include the test suite: rm -rf $PKG_DIR/usr/mysql-test # Add some handy library symlinks: if [ -r $PKG_DIR/usr/lib${LIBDIRSUFFIX}/mysql/libmysqlclient.so.15 ]; then ( cd $PKG_DIR/usr/lib${LIBDIRSUFFIX} rm -f libmysqlclient.so libmysqlclient.so.15 ln -sf mysql/libmysqlclient.so . ln -sf mysql/libmysqlclient.so.15 . ) else exit 1 fi if [ -r $PKG_DIR/usr/lib${LIBDIRSUFFIX}/mysql/libmysqlclient_r.so.15 ]; then ( cd $PKG_DIR/usr/lib${LIBDIRSUFFIX} rm -f libmysqlclient_r.so libmysqlclient_r.so.15 ln -sf mysql/libmysqlclient_r.so . ln -sf mysql/libmysqlclient_r.so.15 . ) else exit 1 fi fix_pkg_perms strip_bins create_docs compress_man_pages make_description make_doinst make_package post_process ## See the documentation for more help and examples. Below are some of # the most common Extras and Options for easy cut-and-paste use. # DOCLIST='' PATCHLIST='' INSTALL_TYPE='' # CONFIG_COMMAND='' MAKE_COMMAND='' INSTALL_LINE='' # When editing src2pkg scripts to add custom code, use these variables # to refer to the current directory, the sources or the package tree: # $CWD (current directory), $SRC_DIR (sources), $PKG_DIR (package tree) # Other commonly-used directories include: $DOC_DIR (document directory) # $MAN_DIR (man-page directory) $DATA_DIR (shared-data directory) ## Original mysql.SlackBuild Copyright & License: # Copyright 2008, 2009 Patrick J. Volkerding, Sebeka, Minnesota, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is # permitted provided that the following conditions are met: # # 1. Redistributions of this script must retain the above copyright # notice, this list of conditions and the following disclaimer. # # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AS IS'' AND ANY EXPRESS OR IMPLIED # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO # EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.