#!/bin/sh PRGNAM=pam_mysql VERSION=0.7RC1 BUILD=${BUILD:-1} CWD=`pwd` TMP=${TMP:-/tmp} PKG=$TMP/package-$PRGNAM if [ -z "$ARCH" ]; then case "$( uname -m )" in i?86) ARCH=i486 ;; arm*) ARCH=arm ;; *) ARCH=$( uname -m ) ;; esac fi if [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" LIBDIRSUFFIX="64" else SLKCFLAGS="-O2" LIBDIRSUFFIX="" fi mkdir -p $TMP cd $TMP rm -rf $PRGNAM-$VERSION tar xf $CWD/$PRGNAM-$VERSION.tar.gz cd $PRGNAM-$VERSION CFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/usr \ --with-pam-mod-dir=/lib/security \ --build=$ARCH-slackware-linux --host=$ARCH-slackware-linux make || exit 1 mkdir -p $PKG/lib/security cp .libs/$PRGNAM.{la,so} $PKG/lib/security/ mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp \ README COPYING CREDITS ChangeLog INSTALL NEWS \ $PKG/usr/doc/$PRGNAM-$VERSION/ mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG makepkg -l y -c y $TMP/$PRGNAM-$VERSION-$ARCH-$BUILD.txz