aboutsummaryrefslogtreecommitdiff
path: root/trunk/conf
diff options
context:
space:
mode:
authorrudson <rudson@04377dda-e619-0410-9926-eae83683ac58>2007-04-05 15:59:57 +0000
committerrudson <rudson@04377dda-e619-0410-9926-eae83683ac58>2007-04-05 15:59:57 +0000
commit20cad7040b05e4a124437d28eefb284821af7b39 (patch)
tree147a68bd031ae34838d31555653c65d1e84f81fd /trunk/conf
parentdfc417a3705e07460d651438fb96be9bb8681cbe (diff)
downloadsimplepkg-20cad7040b05e4a124437d28eefb284821af7b39.tar.gz
simplepkg-20cad7040b05e4a124437d28eefb284821af7b39.tar.bz2
mkbuild-0.9.16: atualização
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@244 04377dda-e619-0410-9926-eae83683ac58
Diffstat (limited to 'trunk/conf')
-rw-r--r--trunk/conf/generic.mkSlackBuild.new39
1 files changed, 19 insertions, 20 deletions
diff --git a/trunk/conf/generic.mkSlackBuild.new b/trunk/conf/generic.mkSlackBuild.new
index 7d5afba..b42853a 100644
--- a/trunk/conf/generic.mkSlackBuild.new
+++ b/trunk/conf/generic.mkSlackBuild.new
@@ -1,7 +1,7 @@
###################################################
## Generic template for SlackBuilds
##
-## Version 0.7 - Luis ( luis at riseup d0t net)
+## Version 0.8.1 - Luis ( luis at riseup d0t net)
##
###################################################
<head> all
@@ -38,6 +38,7 @@ 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]]}
</set_variables>
<slkflags> all
@@ -87,6 +88,18 @@ if [ ! -s "$SRC_DIR/$SRC" ] || ! [[DECOMPRESSOR]] [[DECOMPRESSOR TEST FLAG]] "$S
fi
</download_source>
+<md5sum_download_and_check> off
+# 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
+</md5sum_download_and_check>
+
<gpg_signature_check> off
# Import minimized signing key from
# [[SIGNING KEY URL]]
@@ -102,32 +115,18 @@ fi
gpg --verify "$SRC_DIR/$SRC.sig" "$SRC_DIR/$SRC" || exit $ERROR_GPG
</gpg_signature_check>
-<md5sum_download_and_check> off
-# Md5sum check
-MD5SUM_FILE=${SRC//.tar.[[SOURCE EXTENSION]]}.[[MD5SUM EXTENSION]]
-
-if [ ! -s "$SRC_DIR/$MD5SUM_FILE" ]; then
- wget [[DOWNLOAD FOLDER URL]]/$MD5SUM_FILE -O $SRC_DIR/$MD5SUM_FILE
-fi
-
-MD5SUM_SRC=`md5sum $SRC_DIR/$SRC | awk '{print $1}'`
-MD5SUM_EXT=`eval "grep '$SRC[ \t]*$' $SRC_DIR/$MD5SUM_FILE" | awk '{print $1}'`
-
-[ "$MD5SUM_SRC" != "$MD5SUM_EXT" ] && exit $ERROR_MD5
-</md5sum_download_and_check>
-
<untar_source> all
# Untar
cd "$TMP"
tar --no-same-owner --no-same-permissions -xvf "$SRC_DIR/$SRC" || exit $ERROR_TAR
-
cd "$PKG_SRC"
</untar_source>
<path_source> off
# Patch source
-patches="[[PATCH FILES]] $PACKAGE.diff $PACKAGE-$VERSION.diff
- $PACKAGE-$VERSION-$ARCH.diff $PACKAGE-$ARCH.diff"
+patches="[[PATCH FILES]]
+ $PKG_NAME.diff $PKG_NAME-$PKG_VERSION.diff
+ $PKG_NAME-$PKG_VERSION-$ARCH.diff $PKG_NAME-$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
@@ -142,7 +141,7 @@ 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
</configure>
<make_package> all
@@ -155,7 +154,7 @@ make || exit $ERROR_MAKE
make install DESTDIR="$PKG" || exit $ERROR_INSTALL
</install_package>
-<strip_binaries> all
+<strip_binaries> on
# Strip binaries
( cd "$PKG"
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \