#!/bin/bash # aspell-dict.SlackBuild # by Stuart Winter for the Slackware porting Project. # Heavily based on the original Slackware build script. # 17-Jun-2004 # Record toolchain & other info for the build log: slackbuildinfo # Paths to skeleton port's source & real Slackware source tree: export CWD=$SLACKSOURCE/$PKGSERIES/$PKGNAM export PORTCWD=$PWD # Temporary build locations: export TMPBUILD=$TMP/build-$PKGNAM export PKG=$TMP/package-$PKGNAM mkpkgdirs # Delete & re-create temporary directories then cd into $TMPBUILD # Start the fakeroot server: start_fakeroot # We'll stash the many packages in here: STASH=$TMPBUILD/$PKGNAM-stash mkdir -p $STASH # Create individual packages of each dictionary: ( cd $CWD for file in aspell*bz2 ; do NAME=`echo $file | cut -f 1-2 -d -`-`echo $file | cut -f 3- -d - | rev | cut -b9- | rev | tr '[\-]' '[_]'` rm -rf $PKG mkdir -p $PKG cd $TMPBUILD tar xf $CWD/$file cd `basename $file .tar.bz2` slackhousekeeping ./configure make make install DESTDIR=$PKG # Use a uniform package name. NAME=$(echo $NAME | sed 's/aspell5/aspell/' | sed 's/aspell6/aspell/') mkdir -p $PKG/usr/doc/${NAME} cp -a README Copyright $PKG/usr/doc/${NAME} mkdir $PKG/install SLACKDESC=$(echo $NAME | cut -f 1-2 -d -) echo "${SLACKDESC}: ${SLACKDESC}" > $PKG/install/slack-desc echo "${SLACKDESC}:" >> $PKG/install/slack-desc echo "${SLACKDESC}: $(head -n 1 README)." >> $PKG/install/slack-desc echo "${SLACKDESC}:" >> $PKG/install/slack-desc echo "${SLACKDESC}:" >> $PKG/install/slack-desc echo "${SLACKDESC}:" >> $PKG/install/slack-desc echo "${SLACKDESC}:" >> $PKG/install/slack-desc echo "${SLACKDESC}:" >> $PKG/install/slack-desc echo "${SLACKDESC}:" >> $PKG/install/slack-desc echo "${SLACKDESC}:" >> $PKG/install/slack-desc echo "${SLACKDESC}:" >> $PKG/install/slack-desc cd $PKG slackslack makepkg -l y -c n $STASH/${NAME}-noarch-$BUILD.tgz done ) # Move the packages into the correct location: cd $STASH rm -vf $PKGSTORE/l/aspell-[a-z]*-[0-9]*-noarch.{t?z,asc,txt} install -vpm644 aspell-en-*.t?z $PKGSTORE/l/ # The rest live in /extra (along with a copy of the aspell-en package that resides # in l/) : mkdir -vpm755 $PKGSTORE/../extra/aspell-word-lists/ rm -rf $PKGSTORE/../extra/aspell-word-lists/* mv -fv *.t?z $PKGSTORE/../extra/aspell-word-lists/