58 lines
1.5 KiB
Bash
58 lines
1.5 KiB
Bash
# Maintainer: Orhun Parmaksız <orhun@archlinux.org>
|
||
# Maintainer: kpcyrd <kpcyrd[at]archlinux[dot]org>
|
||
|
||
pkgname=arti
|
||
pkgver=1.2.0
|
||
pkgrel=1
|
||
pkgdesc="An implementation of Tor in Rust"
|
||
arch=('x86_64')
|
||
url="https://gitlab.torproject.org/tpo/core/arti"
|
||
license=('MIT' 'Apache-2.0')
|
||
depends=(
|
||
'gcc-libs'
|
||
'glibc'
|
||
'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=('5303da0d272e7be3bcddd482fc61a57f66afb9ced0e653af9d56454808e6a348')
|
||
b2sums=('103b0935447500ae6c957679046edbb1353dd70aab1fea88a63b3fcaa533ab82b5bdfb3e20f12e28c191c8ad5eb7041f41c5ddda9515f1fe456abdd5d8395e7f')
|
||
|
||
prepare() {
|
||
mv "$pkgname-$pkgname-v$pkgver" "$pkgname-$pkgver"
|
||
cd "$pkgname-$pkgver"
|
||
cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
|
||
}
|
||
|
||
build() {
|
||
cd "$pkgname-$pkgver"
|
||
cargo build --release --frozen --features full
|
||
}
|
||
|
||
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:
|