summaryrefslogtreecommitdiff
path: root/office/pcal/pcal.SlackBuild
diff options
context:
space:
mode:
authorTracy Williams <t_s_williams[at]yahoo[dot]com>2011-01-02 12:21:03 -0200
committerRobby Workman <rworkman@slackbuilds.org>2011-01-10 15:04:20 -0600
commit83ab8be7f63e65d9be0335c495942f33f226dc3b (patch)
tree9e06cbf39c99c1f0d7417eee10e88aa7e34d44b0 /office/pcal/pcal.SlackBuild
parenta74123b39b4c47febf80d5ff2113e1981a8c0b10 (diff)
downloadslackbuilds-83ab8be7f63e65d9be0335c495942f33f226dc3b.tar.gz
office/pcal: Added (generate monthly format calendars)
Signed-off-by: Niels Horn <niels.horn@slackbuilds.org>
Diffstat (limited to 'office/pcal/pcal.SlackBuild')
-rw-r--r--office/pcal/pcal.SlackBuild74
1 files changed, 74 insertions, 0 deletions
diff --git a/office/pcal/pcal.SlackBuild b/office/pcal/pcal.SlackBuild
new file mode 100644
index 0000000000..b528ab3dd2
--- /dev/null
+++ b/office/pcal/pcal.SlackBuild
@@ -0,0 +1,74 @@
+#!/bin/sh
+
+# Slackware build script for pcal
+# Written by Tracy Williams
+# contact: t_s_williams[at]yahoo[dot]com
+
+PRGNAM=pcal
+VERSION=4.11.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 from /usr/local/bin to /usr/bin
+patch -p1 < $CWD/bindir.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 doc/ReadMe.txt doc/pcal-help.html doc/pcal-help.ps doc/pcal-help.txt \
+ doc/pcal.cat examples/ html/ scripts/ \
+ $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}