summaryrefslogtreecommitdiff
path: root/office/calcurse/calcurse.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'office/calcurse/calcurse.SlackBuild')
-rw-r--r--office/calcurse/calcurse.SlackBuild32
1 files changed, 19 insertions, 13 deletions
diff --git a/office/calcurse/calcurse.SlackBuild b/office/calcurse/calcurse.SlackBuild
index 549b28f043..ea05759132 100644
--- a/office/calcurse/calcurse.SlackBuild
+++ b/office/calcurse/calcurse.SlackBuild
@@ -1,6 +1,7 @@
#!/bin/sh
# Slackware build script for calcurse
+
# Copyright 2007-2009 Michiel van Wessem, Manchester, United Kingdom
# All rights reserved.
#
@@ -24,7 +25,7 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=calcurse
-VERSION=${VERSION:-2.5}
+VERSION=${VERSION:-2.7}
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -34,6 +35,16 @@ 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"
+fi
set -e # Exit on most errors
@@ -54,25 +65,20 @@ CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--localstatedir=/var \
--mandir=/usr/man \
--build=$ARCH-slackware-linux \
-# Make sure we have the right compile flags set as calcurse seems to
-# blatantly ignore this: no matter what we do.
-if [ "$ARCH" = "i486" ]; then
- sed -i 's#CFLAGS = -O2 -Wall -g#CFLAGS="-O2 -march=i486 -mtune=i686 -Wall -g"#g' $TMP/$PRGNAM-$VERSION/Makefile
-elif [ "$ARCH" = "i686" ]; then
- sed -i 's#CFLAGS = -O2 -Wall -g#CFLAGS="-O2 -march=i686 -mtune=i686 -Wall -g"#g' $TMP/$PRGNAM-$VERSION/Makefile
-fi
-
make
make install-strip DESTDIR=$PKG
( cd $PKG
- 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
+ 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
@@ -81,7 +87,7 @@ make install-strip DESTDIR=$PKG
)
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a ABOUT-NLS AUTHORS COPYING ChangeLog INSTALL NEWS README TODO doc/* \
+cp -a ABOUT-NLS AUTHORS ChangeLog NEWS README TODO doc/* \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
find $PKG/usr/doc/$PRGNAM-$VERSION -type f -exec chmod 0644 {} \;
@@ -90,4 +96,4 @@ 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.tgz
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}