summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f765a5d2cf516196e1126bf559070e60bdfe9146 (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
# Maintainer: Stefan Husmann <stefan-husmann@t-online.de>

pkgname=svgcleaner-git
pkgver=0.9.5.r466.0439732
pkgrel=1
pkgdesc="Program for reducing size of svg images without loss"
arch=('i686' 'x86_64')
url="https://github.com/RazrFalcon/SVGCleaner"
license=('GPL2')
depends=('gcc-libs')
makedepends=('git' 'rust' 'cargo')
conflicts=('svgcleaner')
provides=('svgcleaner')
source=('git+https://github.com/RazrFalcon/SVGCleaner.git')
md5sums=('SKIP')
_gitname="SVGCleaner"

pkgver() {
  cd "$srcdir"/"$_gitname"
  printf "%s.r%s.%s" $(awk -F# '/version/ {print $1}' Cargo.toml|head -1|tr -d \"|cut -c10-) $(git rev-list --count HEAD) $(git rev-parse --short HEAD)
}

build() {
  cd ${_gitname}
  cargo clean
  cargo build --release --verbose
}

package() {
  cd ${_gitname}/target/release
  install -Dm755 svgcleaner "$pkgdir"/usr/bin/svgcleaner
}