#!/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: #Strict build-dependencies #Our package will be automaticly rebuilded if there is a major change in a DEP package. #(this is recommended for most dependencys) #DEP:linux #DEP:linux_src #DEP:linux_headers #DEP:linux ##DEP:libpri ##DEP:openldap #Loose build-dependencies #The package will be installed in the buildroot during buidling, but no automatic rebuild will occur. #(not recommended) ##DEP:doxygen #######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//'` #Version of the sourcefiles #VER="2.11.1" VER="3.1.0" #Archive of the sourcefiles to unpack #SRC_ARC="dahdi-linux-$VER.tar.gz" SRC_ARC="dahdi-linux-complete-$VER+$VER.tar.gz" #Architecture that the created binaries run on. #Use noarch for scripts. ARCH=`uname -m` ########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 #Directory where the sourcefiles are unpacked. #(you might have to adjust this if autodetection fails) SRC_DIR=`ls -c|head -1` #apply patches #patch -p1 -d $SRC_DIR < 0001-xpp-move-command_timer-functions-to-xbus-core.patch || exit 1 #patch -p1 -d $SRC_DIR < 0002-fix-building-with-4.15-init_timer-setup_timer.patch || exit 1 #patch -p1 -d $SRC_DIR/linux < 0001-xpp-move-command_timer-functions-to-xbus-core.patch || exit 1 #patch -p1 -d $SRC_DIR/linux < 0002-fix-building-with-4.15-init_timer-setup_timer.patch || exit 1 #patch -p1 -d $SRC_DIR/linux < p.patch || exit 1 sed 's/DAHDI_BUILD_ALL:=m/DAHDI_BUILD_ALL:=n/' -i $SRC_DIR/linux/Makefile || exit 1 #AUTOMAKE: Configure pushd /tmp/build/$SRC_DIR || exit 1 #./configure --prefix=/usr || exit 1 #exit 1 #AUTOMAKE: Compile MAKE_OPTS="-j1" MODULES_EXTRA=dahdi_dummy make $MAKE_OPTS || exit 1 #AUTOMAKE: Test (optional) #if grep ^check: Makefile; then # make pkgconfigdir=/usr/lib/pkgconfig $MAKE_OPTS install || exit 1 # make $MAKE_OPTS check || exit 1 #elif grep ^test: Makefile; then # make pkgconfigdir=/usr/lib/pkgconfig $MAKE_OPTS install || exit 1 # make $MAKE_OPTS test || exit 1 #fi #AUTOMAKE: Install mkdir -p /tmp/pkg &>/dev/null MODULES_EXTRA=dahdi_dummy make pkgconfigdir=/usr/lib/pkgconfig install_prefix=/tmp/pkg DESTDIR=/tmp/pkg INSTALL_ROOT=/tmp/pkg install_root=/tmp/pkg $MAKE_OPTS install >/dev/null || exit 1 popd #chown -R nobody:nogroup /tmp/pkg/dev/dahdi || exit 1 mkdir -p /tmp/pkg/etc/boot.d || exit 1 cp dahdi /tmp/pkg/etc/boot.d || exit 1 chmod +x /tmp/pkg/etc/boot.d/* || exit 1 #somehow these rules give errors rm -rf /tmp/pkg/etc/udev mkdir -p /tmp/pkg/etc/postinst.d || exit 1 cp post.dahdi /tmp/pkg/etc/postinst.d || exit 1 chmod +x /tmp/pkg/etc/postinst.d/* || exit 1 #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