summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 2514663690adb384a6a0c36f2fb61ae3badc3236 (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
# Maintainer:
# Contributor: Matthew Sexton <matthew@asylumtech.com>
# Contributor: Lubosz Sarnecki <lubosz at gmail dot com>
# Contributor: Vincent Hourdin <vh|at|free-astro=DOT=vinvin.tf>

_pkgname="siril"
pkgname="$_pkgname-git"
pkgver=1.4.4.r643.g506e9c0
pkgrel=1
pkgdesc="Astronomical image processing software for Linux (IRIS clone)"
url="https://gitlab.com/free-astro/siril"
arch=('i686' 'x86_64')
license=('GPL-3.0-or-later')

depends=(
  'cfitsio'
  'curl'
  'exiv2'
  'ffms2'
  'fftw'
  'gsl'
  'gtk4'
  'gtksourceview5'
  'kplotting'
  'libgit2'
  'libheif'
  'libraw'
  'libxisf'
  'opencv4'
  'wcslib'
)
makedepends=(
  'cmake'
  'git'
  'meson'
  'ninja'
)
checkdepends=(
  'criterion'
)

options=('!lto')

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

_pkgsrc="$_pkgname"
source=("$_pkgsrc"::"git+$url.git")
sha256sums=('SKIP')

prepare() {
  cd "$_pkgsrc"
  git submodule update --init --recursive --depth=1
}

pkgver() {
  cd "$_pkgsrc"
  local _tag _version _revision _hash
  _tag=$(git tag | grep -Ev '(1\.3\.3|[a-z][a-z])' | sort -rV | head -1)
  _version=${_tag:?}
  _revision=$(git rev-list --count --cherry-pick "$_tag"...HEAD)
  _hash=$(git rev-parse --short=7 HEAD)
  printf '%s.r%s.g%s' "${_version:?}" "${_revision:?}" "${_hash:?}"
}

build() {
  local _meson_options=()
  if ((CHECKFUNC)); then
    _meson_options+=(-Dcriterion=true)
  fi

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

check() {
  sed -e "/test('qhy_gps_test/d" -i "$_pkgsrc/src/tests/meson.build"

  meson test -C build --print-errorlogs
}

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