summaryrefslogtreecommitdiffstats
path: root/mcabber/build
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2007-06-12 20:28:18 +0000
committer Eric Hameleers <alien@slackware.com>2007-06-12 20:28:18 +0000
commitdad5709d7d26df51127b22960f9a245534b0d49e (patch)
treebaa950deb27d1911b4789107fb10b033c2e7519d /mcabber/build
parente82c88d32c990d7c9a1486da26fc7b2cc4bbb5ea (diff)
downloadasb-dad5709d7d26df51127b22960f9a245534b0d49e.tar.gz
asb-dad5709d7d26df51127b22960f9a245534b0d49e.tar.xz
Cosmetics
Diffstat (limited to 'mcabber/build')
-rwxr-xr-xmcabber/build/mcabber.SlackBuild45
1 files changed, 11 insertions, 34 deletions
diff --git a/mcabber/build/mcabber.SlackBuild b/mcabber/build/mcabber.SlackBuild
index 309dbe57..b78468a3 100755
--- a/mcabber/build/mcabber.SlackBuild
+++ b/mcabber/build/mcabber.SlackBuild
@@ -58,7 +58,7 @@
# automatically build without PGP support.
# 0.9.1-1: 10/feb/2007 by Eric Hameleers <alien@slackware.com>
# * New release. Removed that GPL clause in this script's header.
-# 0.9.2-1: 26/apr/2007 by Eric Hameleers <alien@slackware.com>
+# 0.9.2-1: 12/jun/2007 by Eric Hameleers <alien@slackware.com>
# * New release.
#
# Run 'sh mcabber.SlackBuild --cleanup' to build a Slackware package.
@@ -67,7 +67,6 @@
#
# -----------------------------------------------------------------------------
-# --- INIT ---
# Set initial variables:
PRGNAM=mcabber
@@ -124,28 +123,19 @@ case "$ARCH" in
;;
esac
-if [ ! -d $TMP/tmp-$PRGNAM ]; then
- mkdir -p $TMP/tmp-$PRGNAM # location to build the source
-elif [ "$P1" != "--oldbuild" ]; then
+mkdir -p $TMP/tmp-$PRGNAM # location to build the source
+if [ "$P1" != "--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
-else
- rm -rf $PKG/* # We always erase old package's contents:
-fi
-
-if [ ! -d $OUTPUT ]; then
- mkdir -p $OUTPUT # place for the package to be saved
-fi
-
-
-# --- SOURCE FILE AVAILABILITY ---
+mkdir -p $PKG # place for the package to be built
+rm -rf $PKG/* # We always erase old package's contents:
+mkdir -p $OUTPUT # place for the package to be saved
+# Source file availability:
if ! [ -f ${SOURCE} ]; then
if ! [ "x${SRCURL}" == "x" ]; then
# Check if the $SRCDIR is writable at all - if not, download to $OUTPUT
@@ -306,28 +296,21 @@ if [ -f ${PRGNAM}.desktop ]; then
cat $SRCDIR/jabber.png $PKG/usr/share/pixmaps/$PRGNAM.png
fi
-# --- DOCUMENTATION ---
-
+# Add documentation:
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a $DOCS \
$PKG/usr/doc/$PRGNAM-$VERSION
chmod -R a-w $PKG/usr/doc/$PRGNAM-$VERSION/*
-# Compress the man page(s)
+# Compress the man page(s):
find $PKG/usr/man -type f -name "*.?" -exec gzip -9f {} \;
-# Strip binaries
+# Strip binaries:
find $PKG | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
find $PKG | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
-# --- OWNERSHIP, RIGHTS ---
-
-chmod -R o-w $PKG
-
-
-# --- PACKAGE DESCRIPTION ---
-
+# Add a package description:
mkdir -p $PKG/install
cat $SRCDIR/slack-desc > $PKG/install/slack-desc
if [ -f $SRCDIR/doinst.sh ]; then
@@ -337,9 +320,6 @@ if [ -f $SRCDIR/slack-required ]; then
cat $SRCDIR/slack-required > $PKG/install/slack-required
fi
-
-# --- BUILDING ---
-
# Build the package:
cd $PKG
makepkg --linkadd y --chown n $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}.tgz 2>&1 | tee $OUTPUT/makepkg-${PRGNAM}.log
@@ -351,9 +331,6 @@ if [ -f $PKG/install/slack-required ]; then
cat $PKG/install/slack-required > $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}.dep
fi
-
-# --- CLEANUP ---
-
# Clean up the extra stuff:
if [ "$P1" = "--cleanup" ]; then
rm -rf $TMP/tmp-$PRGNAM