[arch-commits] Commit in (5 files)
George Rawlinson
grawlinson at gemini.archlinux.org
Sat Jan 15 07:43:06 UTC 2022
Date: Saturday, January 15, 2022 @ 07:43:05
Author: grawlinson
Revision: 1104090
addpkg: freeorion 0.4.10.2-2
Added:
freeorion/
freeorion/repos/
freeorion/trunk/
freeorion/trunk/PKGBUILD
freeorion/trunk/fix-version-string.patch
--------------------------+
PKGBUILD | 62 +++++++++++++++++++++++++++++++++++++++++++++
fix-version-string.patch | 21 +++++++++++++++
2 files changed, 83 insertions(+)
Added: freeorion/trunk/PKGBUILD
===================================================================
--- freeorion/trunk/PKGBUILD (rev 0)
+++ freeorion/trunk/PKGBUILD 2022-01-15 07:43:05 UTC (rev 1104090)
@@ -0,0 +1,62 @@
+# 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=2
+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
+}
+
Added: freeorion/trunk/fix-version-string.patch
===================================================================
--- freeorion/trunk/fix-version-string.patch (rev 0)
+++ freeorion/trunk/fix-version-string.patch 2022-01-15 07:43:05 UTC (rev 1104090)
@@ -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