]> gitweb.fluxo.info Git - simplepkg.git/commitdiff
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@501 04377dda-e619-0410...
authorrudson <rudson@04377dda-e619-0410-9926-eae83683ac58>
Tue, 29 Apr 2008 14:02:11 +0000 (14:02 +0000)
committerrudson <rudson@04377dda-e619-0410-9926-eae83683ac58>
Tue, 29 Apr 2008 14:02:11 +0000 (14:02 +0000)
trunk/doc/CHANGELOG
trunk/mkbuild/generic.mkSlackBuild
trunk/mkbuild/model.mkbuild
trunk/simplepkg.SlackBuild
trunk/src/mkbuild

index 2681907b02d24110df1c9aa4358388fd1541499c..31ad792916f92eeba2408d0167bf5e1ed5b5d7a3 100644 (file)
@@ -1,6 +1,25 @@
 simplepkg changelog
 ===================
 
+0.6pre26
+========
+    - mkbuild:
+      - bugfix: add "" to protect all parameters in edit_file function call;
+      - change line 346-346 with "sed -i" command;
+      - add SVN_MOD variable to control svn source code;
+      - add control to SVN_MOD and URL "none" in activate_sections function;
+        - desable sections download_source, md5sum_download_and_check_0,
+          md5sum_download_and_check_1, gpg_signature_check untar_source, in
+          SVN_MOD or URL "none";
+        - enable section get_svn_source in SVN_MOD;
+      - EXTENSION, UNPACKER, UNPACKER_FLAGS, DECOMPRESSOR, and DECOMPRESSOR_TEST_FLAG
+        desable in SVN_MOD or URL "none";
+    - generic.mkSlackBuild:
+      - add get_svn_source section to subversion sources;
+      - comment lines limited to 79 columns;
+    - model.mkbuild:
+      - add "off:get_svn_source" line;
+
 0.6pre25
 ========
 
index 87ecd43f121c2f0163e3fbfbc1b79b89a6b92a51..d06167d5c5648dc2683970f3a72e01499d83e8db 100644 (file)
@@ -17,9 +17,9 @@
 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
 #  Public License for more details.
 #
-#  You should have received a copy of the GNU General Public License along with
-#  this program; if not, write to the Free Software Foundation, Inc., 59 Temple
-#  Place - Suite 330, Boston, MA 02111-1307, USA
+#  You should have received a copy of the GNU General Public License along
+#  with this program; if not, write to the Free Software Foundation, Inc.,
+#  59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
 #
 # slackbuild for [[PROGRAM NAME]], by [[SLACKBUILD AUTHOR]]
 # requires: [[REQUIRES]]
@@ -188,6 +188,15 @@ PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $8 }'`"
 cd "$PKG_SRC"
 </untar_source>
 
+<get_svn_source> off
+# Get svn source code
+cd "$PKG_WORK"
+svn checkout [[DOWNLOAD FOLDER URL]] $PKG_SRC || exit $ERROR_VCS
+PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $8 }'`"
+cd "$PKG_SRC"
+[ -e autogen.sh ] && . ./autogen.sh
+</get_svn_source>
+
 <patch_source> off
 # Patch source
 patches="[[PATCH FILES]]
@@ -207,7 +216,7 @@ done
 
 if echo [[PATCH URLS]] | grep -q -v "PATCH URLS"; then
   for patch_url in [[PATCH URLS]]; do
-    patch="`basename $patch_url`" 
+    patch="`basename $patch_url`"
     if [ ! -s "$SRC_DIR/$patch" ]; then
       wget "$patch_url" -O "$SRC_DIR/$patch" || exit $ERROR_WGET
     fi
@@ -299,13 +308,13 @@ done
 mkdir -p "$PKG/install" || exit $ERROR_MKDIR
 cat << EODESC > "$PKG/install/slack-desc"
 # HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description.  Line
+# The "handy ruler" below makes it easier to edit a package description. Line
 # up the first '|' above the ':' following the base package name, and the '|'
-# on the right side marks the last column you can put a character in.  You must
+# on the right side marks the last column you can put a character in. You must
 # make exactly 11 lines for the formatting to be correct.  It's also
 # customary to leave one space after the ':'.
 
-        |-----handy-ruler------------------------------------------------------|
+        |-----handy-ruler----------------------------------------------------|
 [[SLACK-DESC]]
 EODESC
 </slackdesc>
@@ -338,7 +347,7 @@ mkgroup() {
   if ! grep -qe "^\$GROUP:" etc/group; then
     echo Creating group \$GROUP...
     chroot . /usr/sbin/groupadd \$GROUP
-  fi 
+  fi
 }
 
 mkuser() {
index 3dd7b061487456f8b05a46df1fb8e351ef6f2b0a..848ef50bd5c446955db5d03848a163c2b173de79 100644 (file)
@@ -132,6 +132,7 @@ off: md5sum_download_and_check_0
 off: md5sum_download_and_check_1
 off: gpg_signature_check
  on: untar_source
+off: get_svn_source
 off: patch_source
  on: configure
  on: make_package
index 471cbb9bda43175a7b2bad7fa87879ea7f1cbbab..7ac1db4956f8b73cd869a1fd21aaa933d9d84863 100755 (executable)
@@ -18,7 +18,7 @@
 PACKAGE="simplepkg"
 PACK_DIR="package-$PACKAGE"
 BUILD=${BUILD:=1rha}
-VERSION="0.6pre25"
+VERSION="0.6pre26"
 ARCH="noarch"
 LIBEXEC="/usr/libexec/$PACKAGE"
 BINDIR="/usr/bin"
index 48b5c7f9d4a1c5abefb658ac2f37b35660193d2a..1d4b69372eaa400ca9c1451043b27b3ee2563362 100755 (executable)
@@ -293,7 +293,7 @@ function start_build  {
   [ $# -ne 1 ] && handle_error $ERROR_PAR_NUMBER
 
   edit_file "SLACKBUILD AUTHOR" "$AUTHOR" $1
-  edit_file "SLACKBUILD AUTHOR INITIALS" $AUTHOR_INITIALS $1
+  edit_file "SLACKBUILD AUTHOR INITIALS" "$AUTHOR_INITIALS" $1
   edit_file "SOURCE NAME" "$SRC_NAME" $1
   edit_file "PROGRAM NAME" "$PKG_NAME" $1
   edit_file "PACKAGE NAME" "$PKG_NAME" $1
@@ -306,7 +306,7 @@ function start_build  {
     edit_file "ARCH" "$ARCH" $1
   fi
   edit_file "NUMBER OF JOBS" "$NUMJOBS" $1
-  edit_file "VERSION" $VERSION $1
+  edit_file "VERSION" "$VERSION" $1
   edit_file "SOURCE NAME CONSTRUCTION STRING" "$CONST_STRING" $1
   edit_file "EXTENSION" "$EXTENSION" $1
   edit_file "DOWNLOAD FOLDER URL" "$URL_BASE" $1
@@ -342,8 +342,7 @@ function set_status {
   [ $# -ne 3 ] && handle_error $ERROR_PAR_NUMBER
   if [ "`get_status $1 $3`" != "all" ]; then
     [ $VERBOSE -eq $on ] && echo "Section $1 $2"
-    eval "sed 's/^<$1>.*$/<$1> $2/' $3" > $AUX_TMP
-    mv $AUX_TMP $3
+    eval "sed -i 's/^<$1>.*$/<$1> $2/' $3"
   else
     echo "Warning: Section $1 have status all. Can't change!"
   fi
@@ -370,6 +369,15 @@ function activate_sections {
     set_status $SECTION $STATUS $SLACKBUILD_TEMP
   done
 
+  if [ $SVN_MOD -eq $on -o $URL == "none" ]; then
+    LIST_OFF="download_source md5sum_download_and_check_0 md5sum_download_and_check_1 gpg_signature_check untar_source"
+    [ $VERBOSE -eq $on ] && echo -e "\nSubversion or \"none\" URL changes:"
+    for i in $LIST_OFF; do
+      set_status $i "off" $SLACKBUILD_TEMP
+    done
+    [ $SVN_MOD -eq $on ] && set_status get_svn_source "on" $SLACKBUILD_TEMP
+  fi
+
 }
 
 function build_slackbuild {
@@ -691,6 +699,7 @@ COMMIT_SLACKBUILD=$off
 COMMIT_MKBUILD=$off
 # Set verbose off
 VERBOSE=$off
+SVN_MOD=$off
 
 # Load /etc/simplepkg/simplepkg.conf parameters
 load_parameters
@@ -753,8 +762,9 @@ if [ ! -z $MKBUILD_NAME ]; then
       # URL program
       URL=`validate_parameter "$URL" "DOWNLOAD FOLDER URL" ""` || handle_error $ERROR_MKBUILD_CONSTRUCTION "URL"
       [ $VERBOSE -eq $on ] && echo "[[URL]]=\"$URL\""
+      [ $URL == "none" ] || echo $URL | grep '^svn:\/\/' >/dev/null && SVN_MOD=$on
 
-      STR_MOUNT="`echo $URL | rev | cut -c1-3 | rev | tr -d '.'`"
+      STR_MOUNT="`echo $URL | sed 's/.*\.\([a-z0-9]\+\)$/\1/'`"
       if [ $STR_MOUNT = "gz" -o $STR_MOUNT = "tgz" -o $STR_MOUNT = "bz2" -o $STR_MOUNT = "zip" ]; then
         SOURCE_NAME=`basename $URL`
         URL_BASE=`dirname $URL`
@@ -763,22 +773,32 @@ if [ ! -z $MKBUILD_NAME ]; then
       fi
       [ $VERBOSE -eq $on ] && echo "[[DOWNLOAD FOLDER URL]]=\"$URL_BASE\""
 
-      # Extension
-      EXTENSION=`validate_parameter "$EXTENSION" "EXTENSION" "$STR_MOUNT"` || handle_error $ERROR_MKBUILD_CONSTRUCTION "EXTENSION"
-      [ $VERBOSE -eq $on ] && echo "[[EXTENSION]]=\"$EXTENSION\""
+      if [ $SVN_MOD -ne $on ]; then
+        # Extension
+        EXTENSION=`validate_parameter "$EXTENSION" "EXTENSION" "$STR_MOUNT"` || handle_error $ERROR_MKBUILD_CONSTRUCTION "EXTENSION"
+         [ $VERBOSE -eq $on ] && echo "[[EXTENSION]]=\"$EXTENSION\""
 
-      BUILD_NUMBER=`validate_parameter "$BUILD_NUMBER" "BUILD NUMBER" "1"` || handle_error $ERROR_MKBUILD_CONSTRUCTION "BUILD NUMBER"
+          # Unpacker
+        UNPACKER=`validate_parameter "$UNPACKER" "UNPACKER" "tar"` || handle_error $ERROR_MKBUILD_CONSTRUCTION "UNPACKER"
+          [ $VERBOSE -eq $on ] && echo "[[UNPACKER]]=\"$UNPACKER\""
 
-      # Unpacker
-      UNPACKER=`validate_parameter "$UNPACKER" "UNPACKER" "tar"` || handle_error $ERROR_MKBUILD_CONSTRUCTION "UNPACKER"
-      [ $VERBOSE -eq $on ] && echo "[[UNPACKER]]=\"$UNPACKER\""
+          # Unpacker flags
+        [ "$UNPACKER" == "tar" ] && STR_MOUNT="--no-same-owner --no-same-permissions -xvf" || STR_MOUNT=""
+        UNPACKER_FLAGS=`validate_parameter "$UNPACKER_FLAGS" "UNPACKER FLAGS" "$STR_MOUNT"` || handle_error $ERROR_MKBUILD_CONSTRUCTION "UNPACKER FLAGS"
+        [ $VERBOSE -eq $on ] && echo "[[UNPACKER_FLAGS]]=\"$UNPACKER_FLAGS\""
 
-      # Unpacker flags
-      [ "$UNPACKER" == "tar" ] && STR_MOUNT="--no-same-owner --no-same-permissions -xvf" || STR_MOUNT=""
-      UNPACKER_FLAGS=`validate_parameter "$UNPACKER_FLAGS" "UNPACKER FLAGS" "$STR_MOUNT"` || handle_error $ERROR_MKBUILD_CONSTRUCTION "UNPACKER FLAGS"
-      [ $VERBOSE -eq $on ] && echo "[[UNPACKER_FLAGS]]=\"$UNPACKER_FLAGS\""
+        # Decompressor program and test flag
+        DECOMPRESSOR=`validate_parameter "$DECOMPRESSOR" "DECOMPRESSOR" ""`
+        [ -z $DECOMPRESSOR ] && decompress_find
+        [ $VERBOSE -eq $on ] && echo "[[DECOMPRESSOR]]=\"$DECOMPRESSOR\""
+
+        DECOMPRESSOR_TEST_FLAG=`validate_parameter "$DECOMPRESSOR_TEST_FLAG" "DECOMPRESSOR TEST FLAG" ""` || handle_error $ERROR_MKBUILD_CONSTRUCTION "DECOMPRESSOR TEST FLAG"
+        [ $VERBOSE -eq $on ] && echo "[[DECOMPRESSOR TEST FLAG]]=\"$DECOMPRESSOR_TEST_FLAG\""
+      fi
 
+      BUILD_NUMBER=`validate_parameter "$BUILD_NUMBER" "BUILD NUMBER" "1"` || handle_error $ERROR_MKBUILD_CONSTRUCTION "BUILD NUMBER"
       # Build archteture
+
       ARCH=`validate_parameter "$ARCH" "ARCH" "i486"`
       [ $VERBOSE -eq $on ] && echo "[[ARCH]]=\"$ARCH\""
 
@@ -805,14 +825,6 @@ if [ ! -z $MKBUILD_NAME ]; then
       [ -z $SOURCE_NAME ] && SOURCE_NAME=`eval "echo $CONST_STRING"`
       [ $VERBOSE -eq $on ] && echo "SOURCE_NAME=\"$SOURCE_NAME\""
 
-      # Decompressor program and test flag
-      DECOMPRESSOR=`validate_parameter "$DECOMPRESSOR" "DECOMPRESSOR" ""`
-      [ -z $DECOMPRESSOR ] && decompress_find
-      [ $VERBOSE -eq $on ] && echo "[[DECOMPRESSOR]]=\"$DECOMPRESSOR\""
-
-      DECOMPRESSOR_TEST_FLAG=`validate_parameter "$DECOMPRESSOR_TEST_FLAG" "DECOMPRESSOR TEST FLAG" ""` || handle_error $ERROR_MKBUILD_CONSTRUCTION "DECOMPRESSOR TEST FLAG"
-      [ $VERBOSE -eq $on ] && echo "[[DECOMPRESSOR TEST FLAG]]=\"$DECOMPRESSOR_TEST_FLAG\""
-
       # Documentations list
       DOCFILES=`validate_parameter "$DOCFILES" "DOCUMENTATION FILES" "NEWS TODO README AUTHORS INSTALL ChangeLog MAINTAINERS COPYING LICENSE SIGNATURE readme.*"`
       [ $VERBOSE -eq $on ] && echo "[[DOCUMENTATION FILES]]=\"$DOCFILES\""