system/mlterm: Updated for version 2.9.4

This commit is contained in:
Marco Cecchetti 2010-05-13 00:40:59 +02:00 committed by Robby Workman
parent 34a3c95984
commit 967dd61c94
3 changed files with 49 additions and 13 deletions

13
system/mlterm/doinst.sh Normal file
View file

@ -0,0 +1,13 @@
config() {
NEW="$1"
OLD="$(dirname $NEW)/$(basename $NEW .new)"
# If there's no config file by that name, mv it over:
if [ ! -r $OLD ]; then
mv $NEW $OLD
elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
# toss the redundant copy
rm $NEW
fi
# Otherwise, we leave the .new copy for the admin to consider...
}

View file

@ -1,12 +1,13 @@
#!/bin/sh
# Slackware build script for mlterm
# Written by Marco Cecchetti (mrc.ildp@gmail.com)
PRGNAM=mlterm
VERSION=${VERSION:-2.9.4}
ARCH=${ARCH:-i486}
BUILD=${BUILD:-2}
BUILD=${BUILD:-3}
TAG=${TAG:-_SBo}
FONT_ENGINE=${FONT_ENGINE:-xcore}
@ -18,10 +19,13 @@ 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} \
@ -58,8 +64,10 @@ 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
@ -68,11 +76,24 @@ make install DESTDIR=$PKG
)
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}

View file

@ -3,6 +3,8 @@ VERSION="2.9.4"
HOMEPAGE="http://mlterm.sourceforge.net/"
DOWNLOAD="http://downloads.sourceforge.net/mlterm/mlterm-2.9.4.tar.gz"
MD5SUM="67fc33f09da045f86b0d4ceebed76aac"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
MAINTAINER="Marco Cecchetti"
EMAIL="mrc.ildp@gmail.com"
APPROVED="rworkman"