]> gitweb.fluxo.info Git - simplepkg.git/commitdiff
generic.mkSlackBuild: added git_source section
authorrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>
Mon, 17 Nov 2008 13:15:48 +0000 (13:15 +0000)
committerrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>
Mon, 17 Nov 2008 13:15:48 +0000 (13:15 +0000)
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@528 04377dda-e619-0410-9926-eae83683ac58

trunk/doc/CHANGELOG
trunk/mkbuild/generic.mkSlackBuild
trunk/mkbuild/model.mkbuild

index 3af299888c38061ca99a105e869cc011587e8a53..180dbb392a6440553a9025621383254f279b8ee4 100644 (file)
@@ -5,8 +5,9 @@ simplepkg changelog
 ========
 
     - generic.mkSlackBuild:
-      - config() on postinstall_script now accepting .dist and .sample config file extensions.
+      - config() on postinstall_script now accepting .dist and .sample config file extensions
       - clean_builds now compliant with standard --cleanup behaviour
+      - added git_source section
     - createpkg: most clean -s option output
     - lspkg: fix on package search routine
     - jail-commit: using unified diff
index 49b9e716429ebf002990fcdc8a403d1f85a8fd3a..2f1bf99727b8eb1c0e018e9657e620e4d4c2facb 100644 (file)
@@ -137,6 +137,28 @@ PKG_SRC="$PWD/$SND_DIR"
 cd "$PKG_SRC"
 </svn_source>
 
+<git_source> off
+# Get git source code
+cd "$SRC_DIR"
+SND_DIR="`basename [[DOWNLOAD FOLDER URL]] .git`"
+
+if [ "`find "$SRC_DIR/" -name .git`" != "" ] && [ -d "$SRC_DIR/$SND_DIR" ]; then
+  cd $SND_DIR
+  git pull || exit $ERROR_VCS
+else
+  git clone [[DOWNLOAD FOLDER URL]] $SND_DIR || exit $ERROR_VCS
+  cd $SND_DIR
+fi
+
+PKG_VERSION="`git log | head -n 1 | awk '{ print $2 }'`_git"
+
+# Copy git source
+cd "$PKG_WORK"
+cp -a $SRC_DIR/* .
+PKG_SRC="$PWD/$SND_DIR"
+cd "$PKG_SRC"
+</git_source>
+
 <md5sum_check> off
 MD5SUM_URL="[[MD5SUM CODE]]"
 
index 391b750a7a5945b91ea6ace267adfb8f7c65c48a..86f0c2dada142b4cd8d44929370681ddd25485ef 100644 (file)
 off: create_build_user_and_group
  on: download_source
 off: svn_source
+off: git_source
 off: md5sum_download_and_check_0
 off: md5sum_download_and_check_1
 off: gpg_signature_check