#!/bin/bash #DEP:libtermcap #######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.* *.zip 2>/dev/null` #Version of the sourcefiles VER=`echo $SRC_ARC| sed 's/.*-//g' | sed 's/\.tar\..*$//g' | sed 's/\.zip$//g'` #Architecture that the created binaries run on. #Use noarch for scripts. ARCH=`uname -m` #from this point on, exit on errors: set -e ########Build and create the pacakge. #Uncomment the stuff that you dont want or need #Unpack source #(uncomment if not needed) syn3_unpack $SRC_ARC #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 < fluxkiosk.patch || exit 1 pushd $SRC_DIR #AUTOMAKE: Configure #Some usefull stuff you sometimes need to set: #export LDFLAGS="-L/usr/X11/lib/ -L/usr/lib/mysql/" #export LD_LIBRARY_PATH=/usr/lib/mysql #export VPATH=$LD_LIBRARY_PATH chown -R root:root . find . -perm 666 -exec chmod 644 {} \; find . -perm 664 -exec chmod 644 {} \; find . -perm 600 -exec chmod 644 {} \; find . -perm 444 -exec chmod 644 {} \; find . -perm 400 -exec chmod 644 {} \; find . -perm 440 -exec chmod 644 {} \; find . -perm 777 -exec chmod 755 {} \; find . -perm 775 -exec chmod 755 {} \; find . -perm 511 -exec chmod 755 {} \; find . -perm 711 -exec chmod 755 {} \; find . -perm 555 -exec chmod 755 {} \; MAKE_OPTS="" ./configure --prefix=/usr --without-ipv6 --without-tcpwrappers || exit 1 patch -p1 < ../get-off.patch || exit 1 #AUTOMAKE: Compile make $MAKE_OPTS >/dev/null || exit 1 #AUTOMAKE: Install mkdir -p /tmp/pkg &>/dev/null #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 PKG=/tmp/pkg cd tftp || exit 1 strip --strip-unneeded tftp mkdir -p $PKG/usr/bin cat tftp > $PKG/usr/bin/tftp chmod 755 $PKG/usr/bin/tftp mkdir -p $PKG/usr/man/man{1,8} cat tftp.1 | gzip -9c > $PKG/usr/man/man1/tftp.1.gz cd ../tftpd strip --strip-unneeded tftpd mkdir -p $PKG/usr/sbin cat tftpd > $PKG/usr/sbin/in.tftpd chmod 755 $PKG/usr/sbin/in.tftpd cat tftpd.8 | gzip -9c > $PKG/usr/man/man8/in.tftpd.8.gz #(ugly) Overwrite the Atftp manual, if its there.. else you search until you're death.... cp tftpd.8 $PKG/usr/man/man8/in.tftpd.8 cd .. mkdir -p $PKG/usr/doc/tftp_hpa-$VER cp -a \ CHANGES INSTALL INSTALL.tftp README README.security \ $PKG/usr/doc/tftp_hpa-$VER mkdir -p $PKG/service/tftp_hpa mkdir -p $PKG/home/shares/tftp mkdir -p /tmp/pkg/etc/postinst.d cp ../post.tftp_hpa /tmp/pkg/etc/postinst.d || exit 1 chmod +x /tmp/pkg/etc/postinst.d/* #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 popd #make main package syn3_makepkg /tmp/pkg $NAME $VER $ARCH || exit 1