blob: d6c05b96a35a982557ab1c26fd7b8e69d99511a4 (
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
53
54
55
56
57
|
# Maintainer: lifespirit <life@crabs.pro>
pkgname=pict-rs
pkgver=0.5.16
pkgrel=1
pkgdesc='A simple image hosting service'
arch=('x86_64')
url='https://git.asonix.dog/asonix/pict-rs'
license=('AGPL3')
depends=(
'glibc'
'gcc-libs'
'imagemagick'
'ffmpeg'
'perl-image-exiftool'
)
makedepends=('git' 'rust' 'protobuf')
options=('!lto')
_commit='31049d3922c9ec4207a8da02d6f1e4714f17dee8'
source=("$pkgname::git+$url#commit=$_commit")
b2sums=('SKIP')
pkgver() {
cd "$pkgname"
git describe --tags | sed -e 's/^v//' -e 's/-/./g'
}
prepare() {
cd "$pkgname"
# download dependencies
cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
}
build() {
cd "$pkgname"
cargo build --frozen --release --all-features
}
check() {
cd "$pkgname"
cargo test --frozen --all-features
}
package() {
cd "$pkgname"
# binary
install -vDm755 -t "$pkgdir/usr/bin" "target/release/$pkgname"
# documentation
install -vDm644 -t "$pkgdir/usr/share/doc/$pkgname" README.md ./*.toml
cp -vr client-examples "$pkgdir/usr/share/doc/$pkgname"
}
|