From e50ed545051b653ee419c17009dc078c90d3dd0e Mon Sep 17 00:00:00 2001 From: luis Date: Fri, 9 Feb 2007 04:50:02 +0000 Subject: generic.SlackBuild v0.6 git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@1013 370017ae-e619-0410-ac65-c121f96126d4 --- others/generic/generic.SlackBuild | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'others') 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 \ -- cgit v1.2.3