summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 83369b7106d32b0727e85a72cb1bdbddc8cf0962 (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
# shellcheck disable=SC2034,SC2154,SC2164
# Maintainer: JustKidding <jk@vin.ovh>

pkgname=ueberzugpp-new-git
_pkgname=ueberzugpp-new
pkgver=r308.f25afb5
pkgrel=1
pkgdesc="Display images in the terminal (drop-in replacement for ueberzug written in C++)"
arch=('x86_64')
url="https://github.com/jstkdng/ueberzugpp-new"
license=("GPL-3.0-or-later")
provides=("ueberzug" "ueberzugpp")
conflicts=("ueberzug" "ueberzugpp")
makedepends=("cmake" "wayland-protocols" "extra-cmake-modules")
depends=("libvips" "libxcb" "xcb-util-image" "xcb-util-errors" "xcb-util-errors" "wayland" "glib2" "glibc" "gcc-libs")
source=("git+https://github.com/jstkdng/ueberzugpp-new.git"
        "git+https://github.com/gabime/spdlog.git"
        "git+https://github.com/CLIUtils/CLI11.git"
        "git+https://github.com/stephenberry/glaze.git")
sha256sums=("SKIP" "SKIP" "SKIP" "SKIP")
options=(!debug)

pkgver() {
  cd "$_pkgname"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
}

prepare() {
  cd "$_pkgname"
  git submodule init
  git config "submodule.spdlog/spdlog.url" "$srcdir/third_party/spdlog"
  git config "submodule.spdlog/CLI11.url" "$srcdir/third_party/CLI11"
  git config "submodule.spdlog/glaze.url" "$srcdir/third_party/glaze"
  git -c protocol.file.allow=always submodule update
}

build() {
  cmake -B build -S "$_pkgname" \
    -DCMAKE_BUILD_TYPE='None' \
    -DCMAKE_INSTALL_PREFIX='/usr' \
    -DENABLE_X11=ON \
    -DENABLE_WAYLAND=ON \
    -DENABLE_LIBVIPS=ON \
    -Wno-dev
  cmake --build build -j "$(nproc)"
}

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

# vim:set ts=2 sw=2 et: