#!/bin/sh CWD=$(pwd) PACKAGER=cyco TMP=${TMP:-/tmp/$PACKAGER} PRGNAM=$(basename $CWD) PKG=$TMP/pkg-$PRGNAM OUTPUT=/tmp VERSION=git$(date +%Y.%m.%d_%H.%M) ARCH=${ARCH:-$(uname -m)} BUILD=${BUILD:-1} REPOSITORIES=/home/cycojesus/projets/packages/repositories NUMJOBS=${NUMJOBS:-" -j2 "} rm -rf $PKG mkdir -p $TMP $PKG if [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "s390" ]; then SLKCFLAGS="-O2" LIBDIRSUFFIX="" elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" LIBDIRSUFFIX="64" fi if [ ! -e $REPOSITORIES/$PRGNAM ]; then git clone git://eviacam.git.sourceforge.net/gitroot/eviacam/eviacam $REPOSITORIES/$PRGNAM else ( cd $REPOSITORIES/$PRGNAM git pull ) fi cd $TMP [ -e $PRGNAM-$VERSION ] && rm -rf $PRGNAM-$VERSION rsync -HPa --exclude .git\* $REPOSITORIES/$PRGNAM . mv $PRGNAM $PRGNAM-$VERSION cd $PRGNAM-$VERSION || exit 1 chown -R root:root . find . \ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ -exec chmod 755 {} \; -o \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; ./autogen.sh CFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/usr \ --libdir=/usr/lib${LIBDIRSUFFIX} \ --sysconfdir=/etc \ --localstatedir=/var/lib \ --mandir=/usr/man \ --infodir=/usr/info \ --docdir=/usr/doc/$PRGNAM \ --build=$ARCH-slackware-linux make $NUMJOBS || make || exit 1 make install DESTDIR=$PKG || exit 1 mv $PKG/usr/share/man $PKG/usr/ find $PKG/usr/man -type f -exec gzip -9 {} \; mkdir -p $PKG/usr/doc/$PRGNAM cp -a \ ABOUT-NLS AGRAIMENTS.txt AUTHORS COPYING ChangeLog INSTALL NEWS README README.ca \ THANKS TODO doc/ \ $PKG/usr/doc/$PRGNAM find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null mkdir -p $PKG/install cat < $PKG/install/slack-desc $PRGNAM: $PRGNAM (a cross-platform webcam based mouse emulator) $PRGNAM: $PRGNAM: Enable Viacam (aka eViacam) is a mouse replacement software that moves the $PRGNAM: pointer as you move your head. It works on standard PCs equipped with a web $PRGNAM: camera. No additional hardware is required. Based on the award winning Facial $PRGNAM: Mouse software.Enable Viacam (aka eViacam) is a mouse replacement software that $PRGNAM: moves the pointer as you move your head. It works on standard PCs equipped with a $PRGNAM: web camera. No additional hardware is required. Based on the award winning Facial $PRGNAM: Mouse software. $PRGNAM: $PRGNAM: http://viacam.org EOF cd $PKG /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$PACKAGER.txz