diff options
author | luis <luis@370017ae-e619-0410-ac65-c121f96126d4> | 2007-04-03 12:07:06 +0000 |
---|---|---|
committer | luis <luis@370017ae-e619-0410-ac65-c121f96126d4> | 2007-04-03 12:07:06 +0000 |
commit | e2554b709cbde8077f6f82a936a06277d427bb44 (patch) | |
tree | 71aa8b2e1583deaeced3e5d16f25757a93cc56fb | |
parent | e93a5f7a6dd10caf17656233a1b1640aafe43953 (diff) | |
download | slackbuilds-e2554b709cbde8077f6f82a936a06277d427bb44.tar.gz slackbuilds-e2554b709cbde8077f6f82a936a06277d427bb44.tar.bz2 |
generic.SlackBuild v0.8
git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@1136 370017ae-e619-0410-ac65-c121f96126d4
-rwxr-xr-x | others/generic/generic.SlackBuild | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/others/generic/generic.SlackBuild b/others/generic/generic.SlackBuild index 78eab946..90b97f16 100755 --- a/others/generic/generic.SlackBuild +++ b/others/generic/generic.SlackBuild @@ -1,7 +1,7 @@ ################################################### ## Generic template for SlackBuilds ## -## Version 0.7.4 - Luis ( luis at riseup d0t net) +## Version 0.8 - Luis ( luis at riseup d0t net) ## ################################################### #!/bin/bash @@ -33,6 +33,8 @@ PKG=${PKG:=$TMP/package-$PKG_NAME} REPOS=${REPOS:=$TMP} PREFIX=${PREFIX:=[[PREFIX]]} PKG_SRC="$TMP/$SRC_NAME-$SRC_VERSION" +CONF_OPTIONS=${CONF_OPTIONS:=[[OTHER CONFIGURE ARGS]]} +MAKE_OPTIONS=${MAKE_OPTIONS:=[[MAKE OPTIONS]]} # Set system libraries' path and optmization flags based on $ARCH LIBDIR="$PREFIX/lib" @@ -73,6 +75,16 @@ if [ ! -s "$SRC_DIR/$SRC" ] || ! [[DECOMPRESSOR]] [[DECOMPRESSOR TEST FLAG]] "$S wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET fi +# Download source's MD5 checksum if necessary and check it +if [ ! -s "$SRC_DIR/$SRC.[[MD5SUM EXTENSION]]" ]; then + wget "$URL.[[MD5SUM EXTENSION]]" -O "$SRC_DIR/$SRC.[[MD5SUM EXTENSION]]" || exit $ERROR_WGET +fi + +MD5SUM_SRC="$(md5sum "$SRC_DIR/$SRC" | cut -d " " -f 1)" +MD5SUM_URL="$(grep "$SRC[ \t]*$" "$SRC_DIR/$SRC.[[MD5SUM EXTENSION]]" | cut -d " " -f 1)" + +[ "$MD5SUM_SRC" == "$MD5SUM_URL" ] || exit $ERROR_MD5 + # Import minimized signing key from # [[SIGNING KEY URL]] gpg --import << EOKEY || exit $ERROR_GPG @@ -107,10 +119,10 @@ done CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ - --prefix="$PREFIX" --libdir="$LIBDIR" [[OTHER CONFIGURE ARGS]] || exit $ERROR_CONF + --prefix="$PREFIX" --libdir="$LIBDIR" "$CONF_OPTIONS" || exit $ERROR_CONF # Compile -make || exit $ERROR_MAKE +make "$MAKE_OPTIONS" || exit $ERROR_MAKE # Install make install DESTDIR="$PKG" || exit $ERROR_INSTALL |