summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e48d731aec0bc672c090840e72dd6f99e7c56647 (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
# Maintainer: lmartinez-mirror
# Maintainer: Artem Senichev <artemsen@gmail.com>
# Contributor: Artem Senichev <artemsen@gmail.com>

_pkgname=swayimg
pkgname=${_pkgname}-git
pkgver=2.2
pkgrel=1
pkgdesc='Image viewer for Sway/Wayland'
arch=('x86_64')
license=('MIT')
makedepends=(
  'git'
  'bash-completion'
  'meson'
  'wayland-protocols'
  )
depends=(
  'wayland'
  'libxkbcommon'
  'json-c'
  'fontconfig'
  'freetype2'
  'hicolor-icon-theme'
  'libheif'
  'libjxl'
  'librsvg'
  'libwebp'
  'libtiff'
  'libexif'
  'openexr'
  )
optdepends=('bash-completion: Bash completions')
provides=("${_pkgname}")
conflicts=("${_pkgname}")
url='https://github.com/artemsen/swayimg'
source=("${_pkgname}::git+${url}.git")
md5sums=('SKIP')

pkgver() {
  cd "${srcdir}/${_pkgname}"
  git describe --tags --long --always | sed 's/-g.*//;s/^v//;s/-/./'
}

build() {
  local meson_options=(
    -D heif=enabled
    -D bash=enabled
    -D exif=enabled
    -D exr=enabled
    -D gif=enabled
    -D jpeg=enabled
    -D jxl=enabled
    -D svg=enabled
    -D tiff=enabled
    -D webp=enabled
    -D man=true
    -D desktop=true
    -D version=${pkgver}
  )
  arch-meson ${_pkgname} build "${meson_options[@]}"
  meson compile -C build
}

package(){
  meson install -C build --destdir "${pkgdir}"
  install -Dm644 ${_pkgname}/LICENSE -t "${pkgdir}"/usr/share/licenses/${_pkgname}/
}