diff options
Diffstat (limited to 'system/mlterm/mlterm.SlackBuild')
-rw-r--r-- | system/mlterm/mlterm.SlackBuild | 47 |
1 files changed, 34 insertions, 13 deletions
diff --git a/system/mlterm/mlterm.SlackBuild b/system/mlterm/mlterm.SlackBuild index dc08a338f2..d4023cb5e5 100644 --- a/system/mlterm/mlterm.SlackBuild +++ b/system/mlterm/mlterm.SlackBuild @@ -1,27 +1,31 @@ #!/bin/sh -# Slackware build script for mlterm +# Slackware build script for mlterm + # Written by Marco Cecchetti (mrc.ildp@gmail.com) -PRGNAM=mlterm -VERSION=${VERSION:-2.9.4} +PRGNAM=mlterm +VERSION=${VERSION:-2.9.4} ARCH=${ARCH:-i486} -BUILD=${BUILD:-2} -TAG=${TAG:-_SBo} +BUILD=${BUILD:-3} +TAG=${TAG:-_SBo} FONT_ENGINE=${FONT_ENGINE:-xcore} CWD=$(pwd) -TMP=${TMP:-/tmp/SBo} +TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM -OUTPUT=${OUTPUT:-/tmp} +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" fi set -e @@ -43,8 +47,10 @@ CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ --sysconfdir=/etc \ --localstatedir=/var \ + --mandir=/usr/man \ --enable-optimize-redrawing \ --with-imagelib=gdk-pixbuf2 \ --with-type-engines=${FONT_ENGINE} \ @@ -52,27 +58,42 @@ CXXFLAGS="$SLKCFLAGS" \ --enable-fribidi \ --enable-m17nlib \ --disable-static \ - --build=$ARCH-slackware-linux + --build=$ARCH-slackware-linux make make install DESTDIR=$PKG ( cd $PKG - find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null - find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null || true + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null ) ( cd $PKG/usr/man find . -type f -exec gzip -9 {} \; - for i in $(find . -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done + for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done ) mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a ABOUT-NLS ChangeLog LICENCE README doc/* $PKG/usr/doc/$PRGNAM-$VERSION +cp -a \ + ABOUT-NLS ChangeLog LICENCE README doc/* \ + $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 + +# Don't clobber config files +( cd $PKG/etc/mlterm + for file in \ + aafont color font key main menu taafont termcap tfont vaafont vfont xim ; + do \ + mv $file $file.new + echo "config etc/mlterm/${file}.new" >> $PKG/install/doinst.sh + done +) cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} |