summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: eadd1b3a60a5f3033385a96d6fcdbcb94e777363 (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
# Maintainer: begin-theadventure <begin-thecontact.ncncb at dralias dot com>

_pkgname=curtail
pkgname=$_pkgname-git
pkgdesc='Simple & useful image compressor (latest commit)'
pkgver=1.8.0.r0.g4a62b4e
pkgrel=1
arch=('x86_64' 'aarch64')
url="https://github.com/Huluti/Curtail"
license=('GPL3')
depends=('jpegoptim' 'libadwaita' 'libwebp' 'optipng' 'pngquant' 'python-gobject')
makedepends=('git' 'meson')
checkdepends=('appstream-glib')
provides=($_pkgname)
conflicts=($_pkgname imcompressor)
source=("git+$url.git")
sha256sums=('SKIP')

pkgver() {
  cd Curtail
  git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  arch-meson Curtail build
  meson compile -C build
}

check() {
  meson test -C build --print-errorlogs ||:
}

package() {
  DESTDIR="$pkgdir" meson install -C build
  install -Dm644 Curtail/README.md -t "$pkgdir/usr/share/doc/$_pkgname"
  install -Dm644 Curtail/COPYING -t "$pkgdir/usr/share/licenses/$_pkgname"
}