[Slackbuilds-users] problem wtih auctex slackbuild + suggested fix

Jim Diamond Jim.Diamond at acadiau.ca
Mon Jun 7 01:53:17 UTC 2010


Hi,

The auctex slackbuild script doesn't work on my Slack64 13.1 system.
Specifically, it complained that preview didn't know where to put some
files, and it told me to use the
	--with-texmf-dir
argument to configure.  (This may be due to the fact that I have
texlive 2009 installed in some non-standard place, but I am probably
not alone in that regard.)

While I'm not 100% certain that this is the Right Thing To Do, I
modified the slackbuild file to create a temp directory, use that, and
delete it before creating the package.  I e-mailed the listed
maintainer (Aleksandar Samardzic) but he tells me he's not actually
maintaining it.  He suggested e-mailing the approver (Erik Hanson) but
I didn't find an e-mail addr for Erik.

Attached is my version of the slackbuild, in case someone wants to
update the official slackbuild.

Incidentally, the notice on the SlackBuild Upload Form web page is
maybe a bit out of date.

Cheers.

				Jim
-------------- next part --------------
#!/bin/sh

# Slackware build script for AUCTeX

# Written by Aleksandar Samardzic <asamardzic at matf.bg.ac.yu>

PRGNAM=auctex
VERSION=${VERSION:-11.86}
BUILD=${BUILD:-1}
TAG=${TAG:-_zsd}

# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
  case "$( uname -m )" in
    i?86) ARCH=i486 ;;
    arm*) ARCH=arm ;;
    # Unless $ARCH is already set, use uname -m for all other archs:
       *) ARCH=$( uname -m ) ;;
  esac
fi

CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}

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

set -e

rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
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 {} \;

preview_holder=`mktemp -d`

CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
  --prefix=/usr \
  --libdir=/usr/lib${LIBDIRSUFFIX} \
  --sysconfdir=/etc \
  --localstatedir=/var \
  --mandir=/usr/man \
  --infodir=/usr/info \
  --with-texmf-dir=$preview_holder \
  --build=$ARCH-slackware-linux

make -j 8
make install DESTDIR=$PKG

# Remove files that are in tetex (and texlive)
rm -rf $PKG/usr/share/texmf/tex/latex/preview
rm -rf $PKG/$preview_holder
rm -rf $preview_holder

rm -f $PKG/usr/info/dir
gzip -9 $PKG/usr/info/*.info*

mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a CHANGES COPYING ChangeLog FAQ INSTALL README RELEASE TODO \
    $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild

mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh

cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}


More information about the SlackBuilds-users mailing list