aboutsummaryrefslogtreecommitdiff
path: root/others
diff options
context:
space:
mode:
authorluis <luis@370017ae-e619-0410-ac65-c121f96126d4>2007-02-09 04:50:02 +0000
committerluis <luis@370017ae-e619-0410-ac65-c121f96126d4>2007-02-09 04:50:02 +0000
commite50ed545051b653ee419c17009dc078c90d3dd0e (patch)
treea4575d2c9261160b74a6c4ab4ff0f331e9b52384 /others
parent66faee9f30ffbdff682b319ecf2fb95f963e5c0c (diff)
downloadslackbuilds-e50ed545051b653ee419c17009dc078c90d3dd0e.tar.gz
slackbuilds-e50ed545051b653ee419c17009dc078c90d3dd0e.tar.bz2
generic.SlackBuild v0.6
git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@1013 370017ae-e619-0410-ac65-c121f96126d4
Diffstat (limited to 'others')
-rwxr-xr-xothers/generic/generic.SlackBuild18
1 files changed, 15 insertions, 3 deletions
diff --git a/others/generic/generic.SlackBuild b/others/generic/generic.SlackBuild
index 8c154ba0..8b7ade59 100755
--- a/others/generic/generic.SlackBuild
+++ b/others/generic/generic.SlackBuild
@@ -1,7 +1,7 @@
###################################################
## Generic template for SlackBuilds
##
-## Version 0.5 - Luis ( luis at riseup d0t net)
+## Version 0.6 - Luis ( luis at riseup d0t net)
##
###################################################
#!/bin/bash
@@ -85,11 +85,23 @@ fi
# Check source's signature
gpg --verify "$SRC_DIR/$SRC.sig" "$SRC_DIR/$SRC" || exit $ERROR_GPG
-# Untar, patch, configure, compile and install
+# Untar
cd "$SRC_DIR"
tar --no-same-owner --no-same-permissions -xvf "$SRC_DIR/$SRC" || exit $ERROR_TAR
+
+# Patch source
cd "$PKG_SRC"
-patch -Np[[NUMBER OF PREFIX SLASHES TO STRIP]] < "$CWD/[[PATCH FILE]]"
+patches="[[PATCH FILES]] $PACKAGE.diff $PACKAGE-$VERSION.diff
+ $PACKAGE-$VERSION-$ARCH.diff $PACKAGE-$ARCH.diff"
+for patch in $patches; do
+ if [ -f "$CWD/$patch" ]; then
+ patch -Np[[NUMBER OF PREFIX SLASHES TO STRIP]] < "$CWD/$patch" || exit $ERROR_PATCH
+ elif [ -f "$CWD/patches/$patch" ]; then
+ patch -Np[[NUMBER OF PREFIX SLASHES TO STRIP]] < "$CWD/patches/$patch" || exit $ERROR_PATCH
+ fi
+done
+
+# Configure, compile and install
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \