summaryrefslogtreecommitdiff
path: root/system/anacron/anacron.SlackBuild
diff options
context:
space:
mode:
authorMichael Wagner <lapinours@web.de>2010-05-13 00:39:34 +0200
committerRobby Workman <rworkman@slackbuilds.org>2010-05-13 00:39:34 +0200
commit6587459f6806be78fcf04a6bc92e50cb0d22fffa (patch)
tree16eedb76466017b2ec3e12ca1989b8ed183d9fe5 /system/anacron/anacron.SlackBuild
parenta881d48be7169f78414d5301b88f09cc6620c4e0 (diff)
downloadslackbuilds-6587459f6806be78fcf04a6bc92e50cb0d22fffa.tar.gz
system/anacron: Updated for version 2.3
Diffstat (limited to 'system/anacron/anacron.SlackBuild')
-rw-r--r--system/anacron/anacron.SlackBuild24
1 files changed, 12 insertions, 12 deletions
diff --git a/system/anacron/anacron.SlackBuild b/system/anacron/anacron.SlackBuild
index a37f01a3d8..392d00077f 100644
--- a/system/anacron/anacron.SlackBuild
+++ b/system/anacron/anacron.SlackBuild
@@ -1,6 +1,7 @@
#!/bin/sh
# Slackware build script for anacron
+
# (C) 2007 Michael Wagner <lapinours@web.de>
# All rights reserved.
#
@@ -26,6 +27,7 @@ VERSION=2.3
ARCH=${ARCH:-i486}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
+
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
@@ -33,11 +35,12 @@ OUTPUT=${OUTPUT:-/tmp}
DOCS="COPYING ChangeLog README TODO"
-# Omit -O2 as it is already included in the Makefile
if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-march=i486 -mtune=i686"
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
elif [ "$ARCH" = "i686" ]; then
- SLKCFLAGS="-march=i686 -mtune=i686"
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
fi
set -e
@@ -51,17 +54,18 @@ cd $PRGNAM-$VERSION
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
-# Use $SLKCFLAGS
-sed -i "s,\(`grep -m 1 CFLAGS Makefile`\),\1 $SLKCFLAGS," Makefile
-
# "Patch" gregor.c
sed -i 's,const int isleap,int isleap,' gregor.c
-make
+make CFLAGS="$SLKCFLAGS"
make install PREFIX=$PKG
strip --strip-unneeded $PKG/usr/sbin/$PRGNAM 2> /dev/null
+# Install a default /etc/anacrontab file
+mkdir -p $PKG/etc
+cat $CWD/anacrontab.new > $PKG/etc/anacrontab.new
+
for i in $PKG/usr/man/man?/*; do
chmod 644 $i && gzip -9 $i 2> /dev/null
done
@@ -71,13 +75,9 @@ cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
chmod 644 $PKG/usr/doc/$PRGNAM-$VERSION/*
-# Install a default /etc/anacrontab file
-mkdir -p $PKG/etc
-cat $CWD/anacrontab.new > $PKG/etc/anacrontab.new
-
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
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}