summaryrefslogtreecommitdiff
path: root/office/lcal/lcal.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'office/lcal/lcal.SlackBuild')
-rw-r--r--office/lcal/lcal.SlackBuild73
1 files changed, 73 insertions, 0 deletions
diff --git a/office/lcal/lcal.SlackBuild b/office/lcal/lcal.SlackBuild
new file mode 100644
index 0000000000..b3ecdecd4e
--- /dev/null
+++ b/office/lcal/lcal.SlackBuild
@@ -0,0 +1,73 @@
+#!/bin/sh
+
+# Slackware build script for lcal
+# Written by Tracy Williams
+# contact: t_s_williams[at]yahoo[dot]com
+
+PRGNAM=lcal
+VERSION=2.1.0
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i486 ;;
+ arm*) ARCH=arm ;;
+ *) 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 -eu
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tgz
+cd $PRGNAM-$VERSION
+chown -R root:root .
+chmod -R a-s,u+w,go+r-w .
+
+### There is no configure script for this application.
+### Makefile - change BINDIR to /usr/bin and also add DESTDIR awareness.
+patch -p1 < $CWD/bindir_destdir.diff
+
+make CFLAGS="$SLKCFLAGS"
+make install DESTDIR=$PKG
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+### Man pages are compressed, should be gzipped
+find $PKG/usr/man -type f -exec uncompress {} \;
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a ReadMe.txt lcal-help.html lcal-help.ps lcal-help.txt \
+ $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
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}