From d0a82fb77ef09120097cc9ea368f24f4fd3500d7 Mon Sep 17 00:00:00 2001 From: Jakub Jirutka Date: Thu, 9 Sep 2021 00:08:53 +0200 Subject: [PATCH] community/swaylock: fix --version --- community/swaylock/APKBUILD | 13 ++++++++++--- community/swaylock/fix-version.patch | 11 +++++++++++ community/swaylock/ungit-version.patch | 21 +++++++++++++++++++++ 3 files changed, 42 insertions(+), 3 deletions(-) create mode 100644 community/swaylock/fix-version.patch create mode 100644 community/swaylock/ungit-version.patch diff --git a/community/swaylock/APKBUILD b/community/swaylock/APKBUILD index 8a833f2ee10..83af4c20c29 100644 --- a/community/swaylock/APKBUILD +++ b/community/swaylock/APKBUILD @@ -2,7 +2,7 @@ # Maintainer: Drew DeVault pkgname=swaylock pkgver=1.5 -pkgrel=4 +pkgrel=5 pkgdesc="Screen locker for Wayland" url="https://swaywm.org" arch="all" @@ -24,7 +24,10 @@ subpackages=" $pkgname-fish-completion $pkgname-zsh-completion " -source="$pkgname-$pkgver.tar.gz::https://github.com/swaywm/swaylock/archive/$pkgver.tar.gz" +source="$pkgname-$pkgver.tar.gz::https://github.com/swaywm/swaylock/archive/$pkgver.tar.gz + ungit-version.patch + fix-version.patch + " prepare() { default_prepare @@ -57,4 +60,8 @@ package() { mv "$pkgdir"/usr/share/fish/vendor_completions.d "$pkgdir"/usr/share/fish/completions } -sha512sums="16dd9b912ca702849290cf18d91ffbd64a70118cc284982a84b567c4974fd4590b12707c0aae1fcda7ccd1caa7880f342c633b9345bd795c36702916696d1f67 swaylock-1.5.tar.gz" +sha512sums=" +16dd9b912ca702849290cf18d91ffbd64a70118cc284982a84b567c4974fd4590b12707c0aae1fcda7ccd1caa7880f342c633b9345bd795c36702916696d1f67 swaylock-1.5.tar.gz +9919bb17e2cf2c8dc4fbac3ba91434f775574caca345026bd8f56e6e9caeff85fa5ad86a9485b103da9be7e393734c37c20c32141cd42cc7f479273ca2147f6b ungit-version.patch +3e9316339d6a255662ed7b59e8405885e25bddf95f064f8a0042baaec661affe6588c59cd6d0e0ab44a06bc322b910c61aed86c13189874b98cc978ec446993f fix-version.patch +" diff --git a/community/swaylock/fix-version.patch b/community/swaylock/fix-version.patch new file mode 100644 index 00000000000..a9f6a448c6d --- /dev/null +++ b/community/swaylock/fix-version.patch @@ -0,0 +1,11 @@ +--- a/meson.build ++++ b/meson.build +@@ -1,7 +1,7 @@ + project( + 'swaylock', + 'c', +- version: '1.4', ++ version: '1.5', + license: 'MIT', + meson_version: '>=0.48.0', + default_options: [ diff --git a/community/swaylock/ungit-version.patch b/community/swaylock/ungit-version.patch new file mode 100644 index 00000000000..fe542d8be5a --- /dev/null +++ b/community/swaylock/ungit-version.patch @@ -0,0 +1,21 @@ +--- a/meson.build ++++ b/meson.build +@@ -46,18 +46,10 @@ + crypt = cc.find_library('crypt', required: not libpam.found()) + math = cc.find_library('m') + +-git = find_program('git', required: false) + scdoc = find_program('scdoc', required: get_option('man-pages')) + wayland_scanner = find_program('wayland-scanner') + + version = '"@0@"'.format(meson.project_version()) +-if git.found() +- git_commit_hash = run_command([git.path(), 'describe', '--always', '--tags']) +- git_branch = run_command([git.path(), 'rev-parse', '--abbrev-ref', 'HEAD']) +- if git_commit_hash.returncode() == 0 and git_branch.returncode() == 0 +- version = '"@0@ (" __DATE__ ", branch \'@1@\')"'.format(git_commit_hash.stdout().strip(), git_branch.stdout().strip()) +- endif +-endif + add_project_arguments('-DSWAYLOCK_VERSION=@0@'.format(version), language: 'c') + + wl_protocol_dir = wayland_protos.get_pkgconfig_variable('pkgdatadir')