#!/bin/bash #Gebruik deze file als voorbeeld. Plaats de source tar.gz file in de zelfde directory als deze slackbuild #Met de NEED en DEP opties is het mogelijk om build dependencies aan te geven. #Voor de meeste packages hoeft er verder niks aan de variabellen veranderd te worden. ##################################### Build dependency info: #NEED:cmake #DEP:libaio #######Essential package info. #Change these if autodetection fails. #Name of the Syn-3 package that we are going to create NAME=`basename $0|sed 's/.SlackBuild//'` #Archive of the sourcefiles to unpack SRC_ARC=`ls *.tar.*` #Version of the sourcefiles VER=`echo $SRC_ARC| sed 's/.*-//g' | sed 's/\.tar\..*$//g'` #Directory of the sourcefiles to build (after optional unpacking) SRC_DIR=`echo $SRC_ARC| sed 's/\.tar\..*$//g'` #Architecture that the created binaries run on. #Use noarch for scripts. ARCH=`arch` ########Build and create the pacakge. #Uncomment the stuff that you dont want or need #Unpack source #(uncomment if not needed) syn3_unpack $SRC_ARC || exit 1 #apply patches #patch -p1 -d $SRC_DIR < fluxkiosk.patch || exit 1 #build and install sourcefiles #(use one of the other syn3_build_* scripts when needed) #export CONFIGURE_OPTS=" # --with-mysqld-user=mysql \ # --with-unix-socket-path=/var/run/mysql/mysql.sock \ # --localstatedir=/home/system/mysql55 \ # --enable-assembler \ # --without-debug \ # --enable-thread-safe-client \ # --without-bench \ # --with-plugins=max \ # --with-extra-charsets=complex \ #" mkdir $SRC_DIR/bld pushd $SRC_DIR/bld || exit 1 cmake .. \ -DBUILD_CONFIG=mysql_release \ -DCMAKE_INSTALL_PREFIX=/tmp/pkg/usr \ -DINSTALL_DOCREADMEDIR=/tmp \ -DINSTALL_DOCDIR=/tmp \ -DINSTALL_MYSQLDATADIR=/tmp \ -DINSTALL_MYSQLTESTDIR=/tmp \ -DINSTALL_SUPPORTFILESDIR=/tmp \ -DINSTALL_MYSQLSHAREDIR=share/mysql \ -DINSTALL_MANDIR=share/man \ -DINSTALL_INFODIR=/tmp \ -DINSTALL_SCRIPTDIR=bin \ -DINSTALL_LIBDIR=lib/mysql \ -DINSTALL_PLUGINDIR=lib/mysql/plugin || exit 1 make -j 10 || exit 1 make test || exit 1 make install/strip || exit 1 popd #export MAKE_OPTS="-j2" #export NOTEST=1 #syn3_build_automake $SRC_DIR /tmp/pkg || exit 1 #service startstop scripts PKG=/tmp/pkg mkdir -p $PKG/service/mysql cp {stop,start,run} $PKG/service/mysql chown root:root $PKG/service/mysql/{stop,start,run} chmod 755 $PKG/service/mysql/{stop,start,run} || exit 1 #post installer mkdir -p $PKG/etc/postinst.d cp post.mysqld $PKG/etc/postinst.d #config file mkdir -p $PKG/etc cp my.cnf $PKG/etc/my.cnf.new chown root:root $PKG/etc/my.cnf.new chmod 644 $PKG/etc/my.cnf.new || exit 1 #troep rm -rf $PKG/usr/mysql-test/ $PKG/usr/sql-bench/ $PKG/tmp $PKG/usr/data #strip bins and other stuff syn3_strip /tmp/pkg || exit 1 #move development stuff and create seperate development package syn3_move_dev /tmp/pkg /tmp/pkgdev || exit 1 syn3_makepkg /tmp/pkgdev $NAME""_dev $VER $ARCH || exit 1 #make main package syn3_makepkg /tmp/pkg $NAME $VER $ARCH || exit 1