56 lines
1.4 KiB
Bash
56 lines
1.4 KiB
Bash
# Maintainer: Orhun Parmaksız <orhun@archlinux.org>
|
||
# Maintainer: kpcyrd <kpcyrd[at]archlinux[dot]org>
|
||
|
||
pkgname=arti
|
||
pkgver=1.1.12
|
||
pkgrel=1
|
||
pkgdesc="An implementation of Tor in Rust"
|
||
arch=('x86_64')
|
||
url="https://gitlab.torproject.org/tpo/core/arti"
|
||
license=('MIT' 'Apache')
|
||
depends=(
|
||
'liblzma.so'
|
||
'libsqlite3.so'
|
||
'libssl.so'
|
||
)
|
||
makedepends=('cargo')
|
||
backup=('etc/arti.d/arti.toml')
|
||
options=('!lto')
|
||
source=("$pkgname-$pkgver.tar.gz::$url/-/archive/$pkgname-v$pkgver/$pkgname-$pkgname-v$pkgver.tar.gz")
|
||
sha256sums=('e15dc574ea29391b95839208a59196abfad3ee3c7d14a6e42c8946a16025c9bd')
|
||
b2sums=('f1bec1c26a147372f19a66022dda7a2f8989d40338399f926f84c8ad17d6cd9d92ad565154a7a994152141fcfb72bacb677fd388c1c67032debfd0802f114c79')
|
||
|
||
prepare() {
|
||
mv "$pkgname-$pkgname-v$pkgver" "$pkgname-$pkgver"
|
||
cd "$pkgname-$pkgver"
|
||
cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
|
||
}
|
||
|
||
build() {
|
||
cd "$pkgname-$pkgver"
|
||
cargo build --release --frozen
|
||
}
|
||
|
||
check() {
|
||
cd "$pkgname-$pkgver"
|
||
cargo test --frozen
|
||
"target/release/$pkgname" --help
|
||
}
|
||
|
||
package() {
|
||
cd "$pkgname-$pkgver"
|
||
install -Dm 755 "target/release/$pkgname" -t "$pkgdir/usr/bin"
|
||
|
||
# config
|
||
install -Dm 640 crates/arti/src/arti-example-config.toml "$pkgdir/etc/arti.d/arti.toml"
|
||
|
||
# docs
|
||
install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname" \
|
||
README.md \
|
||
crates/arti/src/arti-example-config.toml
|
||
|
||
install -Dm 644 LICENSE-MIT -t "$pkgdir/usr/share/licenses/$pkgname"
|
||
}
|
||
|
||
# vim:set ts=2 sw=2 et:
|