summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 95b43b0d2e863b30d69a10f4aed82e1f4f6d581b (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
# Maintainer: Jean Lucas <jean@4ray.co>

pkgname=monolith-git
_pkgname=${pkgname/-git/}
pkgver=2.0.1+r18+gcc09c2b
pkgrel=1
pkgdesc='CLI to save web pages as single HTML files (git)'
arch=(i686 x86_64)
url=https://github.com/Y2Z/monolith
license=(custom)
depends=(openssl)
makedepends=(git cargo)
provides=(monolith)
conflicts=(monolith)
source=(git+$url)
sha512sums=('SKIP')

pkgver() {
  cd $_pkgname
  echo $(grep '^version =' Cargo.toml | head -n1 | cut -d\" -f2 | sed s/-/+/)+r$(git rev-list --count HEAD)+g$(git describe --always)
}

build() {
  cd $_pkgname
  cargo build --release
}

package() {
  cd $_pkgname
  install -D target/release/monolith -t "$pkgdir"/usr/bin
  install -Dm 644 README.md -t "$pkgdir"/usr/share/doc/$_pkgname
  install -Dm 644 LICENSE -t "$pkgdir"/usr/share/licenses/$_pkgname
}