aboutsummaryrefslogtreecommitdiff
path: root/office/lcal/lcal.SlackBuild
diff options
context:
space:
mode:
authorTracy Williams <t_s_williams[at]yahoo[dot]com>2011-01-02 12:33:46 -0200
committerRobby Workman <rworkman@slackbuilds.org>2011-01-10 15:04:20 -0600
commit087beaa3fbc1b121b498425e88d574c57787be4c (patch)
tree868a5b50019de24908b4e1c3c8f9eda50144ffe9 /office/lcal/lcal.SlackBuild
parent83ab8be7f63e65d9be0335c495942f33f226dc3b (diff)
office/lcal: Added (generates graphical "lunar phase" calendar)
Signed-off-by: Niels Horn <niels.horn@slackbuilds.org>
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 0000000000000..b3ecdecd4e95e
--- /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}