[arch-commits] Commit in freeorion/repos (3 files)
Evangelos Foutras
foutrelis at gemini.archlinux.org
Mon Jun 13 10:53:46 UTC 2022
Date: Monday, June 13, 2022 @ 10:53:46
Author: foutrelis
Revision: 1237445
archrelease: copy trunk to community-staging-x86_64
Added:
freeorion/repos/community-staging-x86_64/
freeorion/repos/community-staging-x86_64/PKGBUILD
(from rev 1237444, freeorion/trunk/PKGBUILD)
freeorion/repos/community-staging-x86_64/fix-version-string.patch
(from rev 1237444, freeorion/trunk/fix-version-string.patch)
--------------------------+
PKGBUILD | 61 +++++++++++++++++++++++++++++++++++++++++++++
fix-version-string.patch | 21 +++++++++++++++
2 files changed, 82 insertions(+)
Copied: freeorion/repos/community-staging-x86_64/PKGBUILD (from rev 1237444, freeorion/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD (rev 0)
+++ community-staging-x86_64/PKGBUILD 2022-06-13 10:53:46 UTC (rev 1237445)
@@ -0,0 +1,61 @@
+# Maintainer: George Rawlinson <grawlinson at archlinux.org>
+# Contributor: Dimitris Kiziridis <ragouel at outlook dot com>
+# Contributor: Christian Krause ("wookietreiber") <christian.krause at mailbox.org>
+
+pkgname=freeorion
+pkgver=0.4.10.2
+pkgrel=3
+pkgdesc='A turn-based space empire and galactic conquest game'
+url='https://www.freeorion.org'
+arch=('x86_64')
+license=('GPL2')
+depends=(
+ 'boost-libs'
+ 'python'
+ 'sdl2'
+ 'libvorbis'
+ 'glew'
+ 'openal'
+ 'hicolor-icon-theme'
+ 'freetype2'
+)
+makedepends=(
+ 'git'
+ 'cmake'
+ 'boost'
+)
+_commit='f663dad6379658b539bd28c95229218eb4333ef2'
+source=(
+ "$pkgname::git+https://github.com/freeorion/freeorion.git#commit=$_commit"
+ 'fix-version-string.patch'
+)
+sha512sums=('SKIP'
+ 'e3287063a3128f5589d44ed780ba7e3cdfb4a60bcb0aa833f9a48e51405e3f06ba11eb89b9d59313e629deaf35f78704574bf7620607b96c161037b54a63a71f')
+b2sums=('SKIP'
+ '38828f5cfd0ad3cba854c3457599a851b5d0af72ec00f742f5d828fffc1ef1a6163c771f69ce42f4c39ba2cff3b82330e16fdb89b63570d0b7f71810a257eade')
+
+pkgver() {
+ cd "$pkgname"
+ git describe --tags | sed 's/^v//'
+}
+
+prepare() {
+ patch \
+ --directory "$pkgname" \
+ --strip=1 \
+ --input=../fix-version-string.patch
+
+ cmake \
+ -B build \
+ -S "$pkgname" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_BUILD_TYPE=Release
+}
+
+build() {
+ cmake --build build
+}
+
+package() {
+ DESTDIR="$pkgdir" cmake --install build
+}
Copied: freeorion/repos/community-staging-x86_64/fix-version-string.patch (from rev 1237444, freeorion/trunk/fix-version-string.patch)
===================================================================
--- community-staging-x86_64/fix-version-string.patch (rev 0)
+++ community-staging-x86_64/fix-version-string.patch 2022-06-13 10:53:46 UTC (rev 1237445)
@@ -0,0 +1,21 @@
+Prevent 'makepkg' showing up in version string.
+
+This is because the branch name is acquired during creation of
+the version string. The branch variable is normally empty, as
+shown by the diff below.
+
+--- a/cmake/make_versioncpp.py
++++ b/cmake/make_versioncpp.py
+@@ -133,11 +133,6 @@ branch = ""
+ build_no = INVALID_BUILD_NO
+
+ try:
+- branch = check_output(['git', 'rev-parse', '--abbrev-ref', 'HEAD'], universal_newlines=True).strip()
+- if (branch == "master") or (branch[:7] == "release"):
+- branch = ""
+- else:
+- branch += " "
+ commit = check_output(["git", "show", "--no-show-signature", "-s", "--format=%h", "--abbrev=7", "HEAD"], universal_newlines=True).strip()
+ timestamp = float(check_output(["git", "show", "--no-show-signature", "-s", "--format=%ct", "HEAD"], universal_newlines=True).strip())
+ build_no = ".".join([datetime.utcfromtimestamp(timestamp).strftime("%Y-%m-%d"), commit])
+
More information about the arch-commits
mailing list