summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 722820f636ce0dc1b03c8e69d71cf9eb3087ddf1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# Maintainer:
# Contributor: Mitch Bigelow <mitch.bigelow at gmail.com>
# Contributer: Steven Honeyman <stevenhoneyman at gmail com>

: ${_commit=}

_pkgname="geeqie"
pkgname="$_pkgname-git"
pkgver=2.6.1.r389.ga92906a
pkgrel=1
pkgdesc='Lightweight image viewer'
url="https://github.com/BestImageViewer/geeqie"
license=('GPL-2.0-or-later')
arch=('x86_64')

depends=(
  cfitsio
  djvulibre
  exiv2
  ffmpegthumbnailer
  gspell
  gtk3
  libarchive
  libheif
  libraw
  lua
  openexr
  poppler-glib
)
makedepends=(
  evince
  git
  meson
)
checkdepends=(
  appstream
  markdownlint
  shellcheck
  xorg-server-xvfb
)
optdepends=(
  'evince: for print preview'
  'fbida: for jpeg rotation' # exiftran
  'gawk: to use the geo-decode function'
  'gphoto2: command-line tools for various (plugin) operations'
  'imagemagick: command-line tools for various (plugin) operations'
  'perl-image-exiftool: for the jpeg extraction plugin'
)

provides=("$_pkgname")
conflicts=("$_pkgname")

_pkgsrc="$_pkgname"
source=("$_pkgname"::"git+$url.git${_commit:+#commit=$_commit}")
sha256sums=('SKIP')

pkgver() {
  cd "$_pkgsrc"
  local _version _revision _hash
  _version=$(git tag | grep -Ev '^.*[A-Za-z]{2}.*$' | sort -V | tail -1)
  _revision=$(git rev-list --count --cherry-pick $_version...HEAD)
  _hash=$(git rev-parse --short=7 HEAD)
  printf '%s.r%s.g%s' "${_version#v}" "${_revision:?}" "${_hash:?}"
}

prepare() {
  cd "$_pkgsrc"

  # fix tests
  echo "WarningsAsErrors: ''" > .clang-tidy
}

build() {
  local _meson_opts=(
    -Dgps-map=disabled
  )

  arch-meson "${_meson_opts[@]}" "$_pkgsrc" build
  meson compile -C build
}

check() {
  xvfb-run -a dbus-run-session meson test --print-errorlogs -C build
}

package() {
  DESTDIR="$pkgdir" meson install -C build
}