summaryrefslogtreecommitdiffstats
path: root/mcabber/build
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2006-08-23 21:13:54 +0000
committer Eric Hameleers <alien@slackware.com>2006-08-23 21:13:54 +0000
commitc90144cb873fcfcef5b1fa0c829368e4ad42010b (patch)
treeeec0304c52364d30405cd6b96e898206ff0078fb /mcabber/build
parentff6cb8fb13b71dd8e5547ada014642fb89f631ca (diff)
downloadasb-c90144cb873fcfcef5b1fa0c829368e4ad42010b.tar.gz
asb-c90144cb873fcfcef5b1fa0c829368e4ad42010b.tar.xz
New release, reworked the SlackBuild so that it can download missing source archive.
Also made it Slackware version agnostic (gcc check)
Diffstat (limited to 'mcabber/build')
-rwxr-xr-xmcabber/build/mcabber.SlackBuild63
1 files changed, 54 insertions, 9 deletions
diff --git a/mcabber/build/mcabber.SlackBuild b/mcabber/build/mcabber.SlackBuild
index 1af72530..8b7b8aeb 100755
--- a/mcabber/build/mcabber.SlackBuild
+++ b/mcabber/build/mcabber.SlackBuild
@@ -29,6 +29,8 @@
# * New release. Small ncurses detection fix needed. Mcabber will
# now by default check the server's SSL certificate - to disable
# that, add "ssl_verify = disable" to your mcabberrc.
+# 0.8.1-1: 23/aug/2006 by Eric Hameleers <alien@slackware.com>
+# * New release (configure bugfix).
#
# Run 'sh SlackBuild --cleanup' to build a Slackware package.
# The package (.tgz) plus descriptive .txt file are created in /tmp .
@@ -44,14 +46,27 @@ if [ "$TMP" = "" ]; then
fi
PRGNAM=mcabber
-VERSION=0.8.0
+VERSION=0.8.1
ARCH=${ARCH:-i486}
BUILD=1
+DOCS="AUTHORS COPYING ChangeLog NEWS README TODO mcabberrc.example \
+ doc/mcabber.1.txt doc/mcabber.1.html doc/manpage.css contrib"
+
+SOURCE="${PRGNAM}-${VERSION}.tar.bz2"
+SRCURL="http://www.lilotux.net/~mikael/${PRGNAM}/files/${PRGNAM}-${VERSION}.tar.bz2"
+
+# Slackware 11 and up need other option (gcc > 3.3.x)
+if [ `gcc -dumpversion | tr -d '.' |cut -c 1-2` -gt 33 ]; then
+ MOPT=tune
+else
+ MOPT=cpu
+fi
+
if [ "$ARCH" = "i386" ]; then
- SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
+ SLKCFLAGS="-O2 -march=i386 -m${MOPT}=i686"
elif [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mcpu=i686"
+ SLKCFLAGS="-O2 -march=i486 -m${MOPT}=i686"
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
elif [ "$ARCH" = "x86_64" ]; then
@@ -62,6 +77,31 @@ PKG=$TMP/package-$PRGNAM
if [ ! -d $TMP/tmp-$PRGNAM ]; then
mkdir -p $TMP/tmp-$PRGNAM # location to build the source
+elif [ "$1" != "--oldbuild" ]; then
+ # If the "--oldbuild" parameter is present, we keep
+ # the old build files and continue;
+ # By default we remove the remnants of previous build and continue:
+ rm -rf $TMP/tmp-$PRGNAM/*
+fi
+
+if [ ! -d $PKG ]; then
+ mkdir -p $PKG # place for the package to be built
+fi
+
+# Download the sources if requested
+if [ "${SOURCE}" != "" ] && ! [ -f ${CWD}/${SOURCE} ]; then
+ echo "Source '${SOURCE}' not available yet... will download now:"
+ wget -nv -O ${CWD}/${SOURCE} "${SRCURL}"
+ if [ $? -ne 0 ]; then
+ echo "Downloading '${SOURCE}' failed... aborting the build."
+ mv -f ${CWD}/${SOURCE} ${CWD}/${SOURCE}.FAIL
+ exit 1
+ fi
+fi
+
+if [ "$1" == "--download" ]; then
+ echo "Download complete."
+ exit 0
fi
@@ -100,11 +140,19 @@ fi
# --- TARBALL EXTRACTION,PATCH,MODIFY ---
echo "Extracting the source archive for $PRGNAM..."
-tar -xjvf $CWD/${PRGNAM}-${VERSION}.tar.bz2 || exit 1
+if `file $CWD/${SOURCE} | grep -q ": bzip2"`; then
+ tar -xjvf $CWD/${SOURCE}
+else
+ tar -xzvf $CWD/${SOURCE}
+fi
+if [ $? -ne 0 ]; then
+ echo "Error in unpacking '${SOURCE}!' Aborting..."
+ exit $?
+fi
cd ${PRGNAM}-${VERSION}
-# Small patch for now, will be fixed in next release:
-patch -p1 < $CWD/fix_configure_ncurses.diff
+# Small patch for 0.8.0, will be fixed in next release:
+#patch -p1 < $CWD/fix_configure_ncurses.diff
chown -R root.root *
find . -perm 777 -exec chmod 755 {} \;
@@ -219,9 +267,6 @@ chmod 755 $PKG/usr/bin/mcabber
# --- DOCUMENTATION ---
-DOCS="AUTHORS COPYING ChangeLog NEWS README TODO mcabberrc.example \
- doc/mcabber.1.txt doc/mcabber.1.html doc/manpage.css contrib"
-
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a $DOCS \
$PKG/usr/doc/$PRGNAM-$VERSION