aboutsummaryrefslogtreecommitdiff
path: root/trunk
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
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')
-rw-r--r--trunk/conf/generic.mkSlackBuild.new39
-rwxr-xr-xtrunk/src/mkbuild6
2 files changed, 21 insertions, 24 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 : | \
diff --git a/trunk/src/mkbuild b/trunk/src/mkbuild
index 6dff76e..1ec1b6b 100755
--- a/trunk/src/mkbuild
+++ b/trunk/src/mkbuild
@@ -12,8 +12,8 @@
# Turn off debug
set +x
#
-# Version 0.9.15
-PROG_VERSION=0.9.15
+# Version 0.9.16
+PROG_VERSION=0.9.16
#--------------------------------------------------------------------
# Functions
@@ -396,7 +396,6 @@ function start_build()
change_strings "OTHER CONFIGURE ARGS" "$MK_OPTIONS"
change_strings "DOCUMENTATION FILES" "$MK_DOCFILES"
change_strings "PREFIX" "$MK_PREFIX"
- #[ ! -z $MK_MD5SUM_EXT ] && change_strings "MD5SUM EXTENSION" "$MK_MD5SUM_EXT"
}
# Mount final SlackBuild
@@ -422,7 +421,6 @@ function mount_slackbuild_to()
dialog --backtitle "Make SlackBuild $PROG_VERSION [$MK_PKGNAME]" --title "$MK_TITLE" --infobox "SlackBuild save in $SLACKBUILD.test" 5 45
rm $SLACKBUILD.test 2>/dev/null
-# [ ! -e `dirname $SLACKBUILD` ] && mkdir `dirname $SLACKBUILD`
let i=0
while [ $i -le $END_SECTION ]; do
if [ "${SECTION_FLAG[i]}" = "all" -o "${SECTION_FLAG[i]}" = "on" ]; then