diff options
-rw-r--r-- | system/mlterm/doinst.sh | 13 | ||||
-rw-r--r-- | system/mlterm/mlterm.SlackBuild | 47 | ||||
-rw-r--r-- | system/mlterm/mlterm.info | 2 |
3 files changed, 49 insertions, 13 deletions
diff --git a/system/mlterm/doinst.sh b/system/mlterm/doinst.sh new file mode 100644 index 0000000000..19a6ff6ac8 --- /dev/null +++ b/system/mlterm/doinst.sh @@ -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... +} + 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} diff --git a/system/mlterm/mlterm.info b/system/mlterm/mlterm.info index e222615ec8..6b6953fbd2 100644 --- a/system/mlterm/mlterm.info +++ b/system/mlterm/mlterm.info @@ -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" |