[Commits] [SCM] claws-win32-installer branch, gtk2, updated. 3.19.1-1-74-g4e6f148

jonathan at claws-mail.org jonathan at claws-mail.org
Sun Nov 26 01:58:41 UTC 2023


The branch, gtk2 has been updated
       via  4e6f14873831fe467feaf76cf86f9cfcf1b1ee32 (commit)
      from  6a86b78b7d31a115b5a1bc7355aebb45dd348cea (commit)

Summary of changes:
 README                           | 22 ++++++++++++++++++++++
 packages/download.sh             | 25 +++++++++++++++++++++----
 packages/packages.current        | 14 +++++++++++++-
 patches/claws_mail/99-autogen.sh | 11 -----------
 4 files changed, 56 insertions(+), 16 deletions(-)


- Log -----------------------------------------------------------------
commit 4e6f14873831fe467feaf76cf86f9cfcf1b1ee32
Author: Jonathan Boeing <jonathan at claws-mail.org>
Date:   Sun Nov 19 13:28:47 2023 -0700

    Better support for building Claws from git

diff --git a/README b/README
index 4888a2d..75ebb8c 100644
--- a/README
+++ b/README
@@ -40,6 +40,28 @@ To collect files with debug symbols:
 $ find src/playground/install/pkgs/ -name '*.debug' | grep /bin/ | xargs zip -j debug-files.zip
 
 
+Building Claws from git or a release tarball
+==================
+Claws Mail can be built from either git or a release tarball.  The choice is made
+by which 'claws_mail' line in packages/packages.current is uncommented.
+
+Managing the git repo is mostly left to the user.
+ - If the repo doesn't exist, download.sh will clone it
+ - If the commit specified by the 'ref' field in packages.current doesn't exist,
+   download.sh will pull from the repo
+
+Some implications:
+ - If packages.current says to build 'claws_mail' from ref 'HEAD', download.sh will
+   package up whatever commit 'HEAD' currently points to.
+
+ - If packages.current says to build 'claws_mail' from ref 'origin/gtk2', download.sh
+   will package up whatever commit 'origin/gtk2' currently points to without attempting
+   to pull from the remote repo first.
+
+ - If packages.current says to build 'claws_mail' from ref 'master', download.sh
+   will package up whatever commit your local branch currently points to.
+
+
 Build options
 ==================
 If no parameters are passed to autogen.sh, it will prep the 64-bit build in the
diff --git a/packages/download.sh b/packages/download.sh
index 3b8f0aa..b675faf 100755
--- a/packages/download.sh
+++ b/packages/download.sh
@@ -25,10 +25,14 @@ download_file () {
 }
 
 download_git () {
-	file=${name}-${version}.tar.xz
+	if [[ "$name" = "claws_mail" ]]; then
+		echo "Will derive version from ref \"$ref\" instead of using \"$version\""
+	else
+		file="${name}-${version}.tar.xz"
 
-	if [[ -f "$file" ]]; then
-		return 0
+		if [[ -f "$file" ]]; then
+			return 0
+		fi
 	fi
 
 	# Clone the repo if it doesn't exist
@@ -64,7 +68,20 @@ download_git () {
 	}
 
 	# Create the archive from the ref
-	git archive --format=tar --prefix="${name}-${version}/" "$ref" | xz -z > "../${file}"
+	if [[ "$name" = "claws_mail" ]]; then
+		# Special handling for Claws
+		git_ver=$(git describe --abbrev=6 --always "$ref")
+		file="${name}-${git_ver}.tar.xz"
+		sed -i "s/^claws_mail,.*,git,/claws_mail,${git_ver},git,/" ../packages.current
+
+		if [[ ! -f "../${file}" ]]; then
+			echo "echo $git_ver" > version
+			git archive --format=tar --prefix="${name}-${git_ver}/" --add-file=version "$ref" | xz -z > "../${file}"
+			rm version
+		fi
+	else
+		git archive --format=tar --prefix="${name}-${version}/" "$ref" | xz -z > "../${file}"
+	fi
 
 	popd > /dev/null
 	return 0
diff --git a/packages/packages.current b/packages/packages.current
index 93ae9df..57c7908 100644
--- a/packages/packages.current
+++ b/packages/packages.current
@@ -1,6 +1,18 @@
 # package name,version,type,url,sha256 hash,branch,ref
 
-claws_mail,3.19.1,file,https://www.claws-mail.org/releases/claws-mail-3.19.1.tar.xz,ac57fa557cf15c62e5f8fad247585fc609f0a696f6da54ed42cc000b6c6d6813,,
+# package name - used by configure.ac to locate the correct file for the package
+# version - used by configure.ac to locate the correct file for the package
+# type - file or git
+# url - download url of the file or git repo
+# sha256 hash - the sha256 hash of the download file or git archive file
+# branch - type 'git' only - optional, if specified, only clone this branch
+# ref - type 'git' only - the <tree-ish> value passed to git archive to produce the tarball
+
+# To build Claws from the release tarball
+#claws_mail,3.19.1,file,https://www.claws-mail.org/releases/claws-mail-3.19.1.tar.xz,ac57fa557cf15c62e5f8fad247585fc609f0a696f6da54ed42cc000b6c6d6813,,
+
+# To build Claws from git
+claws_mail,,git,git://git.claws-mail.org/claws.git,,,origin/gtk2
 
 atk,2.38.0,file,https://download.gnome.org/sources/atk/2.38/atk-2.38.0.tar.xz,ac4de2a4ef4bd5665052952fe169657e65e895c5057dffb3c2a810f6191a0c36,,
 bsfilter,1.0.16,file,https://www.claws-mail.org/win32/bsfilter-1.0.16-bin.tar.gz,d95938a0af1a55f69d0f24d500b663529af122a651a06e0eb046b44064f37d85,,
diff --git a/patches/claws_mail/99-autogen.sh b/patches/claws_mail/99-autogen.sh
index ade4c32..34b6ff8 100755
--- a/patches/claws_mail/99-autogen.sh
+++ b/patches/claws_mail/99-autogen.sh
@@ -7,16 +7,5 @@ if [ "x${claws_type}" != "xgit" ]; then
 	exit 0
 fi
 
-# The claws-mail autogen.sh script expects the 'version' file to contain
-# the output from 'git describe --abbrev=6' when building a git snapshot
-
-claws_full_ver=$(grep -E "^claws_mail," ${packages} | cut -f 2 -d ,)
-if [ -z "$claws_full_ver" ]; then
-	printf "Failed to read claws package version from packages file\n"
-	exit 1
-fi
-
-echo "echo ${claws_full_ver}" > version
-
 NOCONFIGURE=1 ./autogen.sh
 

-----------------------------------------------------------------------


hooks/post-receive
-- 
Installer sources for Claws Mail Windows port


More information about the Commits mailing list