summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 8b8ae0534078b84faff77919e521e18a0d49b0e5 (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
# Maintainer: Philipp Wolfer <ph.wolfer@gmail.com>
_pkgname=gifski
pkgname=${_pkgname}-git
pkgver=0.7.3.r0.g8c8aa92
pkgrel=1
pkgdesc="GIF encoder based on libimagequant (pngquant, gifquant?). Squeezes maximum possible quality from the awful GIF format"
arch=('i686' 'x86_64')
url="https://gif.ski/"
license=('AGPL3')
provides=("${_pkgname}=${pkgver}")
conflicts=("${_pkgname}")
depends=(gcc-libs ffmpeg)
makedepends=(git rust clang)
source=(${_pkgname}::git+https://github.com/ImageOptim/${_pkgname}.git)
sha256sums=('SKIP')

build() {
  cd "${srcdir}/${_pkgname}"
  cargo build --release --features=video,openmp
}

package() {
  cd "${srcdir}/${_pkgname}"
  install -Dm755 target/release/gifski "$pkgdir/usr/bin/gifski"
}

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