blob: 45470474ae011c6786e37b7247b788796d48a1e9 (
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
|
# Maintainer: Michael Adler <therisen06@gmail.com>
_pkgname=extension-downloader
pkgname=${_pkgname}-git
pkgver=v0.1.0.r21.g473b4c6
pkgrel=1
pkgdesc='Download browser extensions for Firefox and Chromium-based browsers'
arch=('i686' 'x86_64' 'armv6h' 'armv7h')
url='https://github.com/michaeladler/extension-downloader'
license=('Apache')
depends=()
makedepends=('git' 'cargo')
provides=("${pkgname%-*}")
conflicts=("${pkgname%-*}")
source=("${pkgname%-*}::git+$url")
sha256sums=('SKIP')
pkgver() {
cd "${_pkgname}"
git describe --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}
prepare() {
cd "${_pkgname}"
cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
}
build() {
cd "${_pkgname}"
export RUSTUP_TOOLCHAIN=stable
export CARGO_TARGET_DIR=target
cargo build --frozen --release --all-features
}
check() {
cd "${_pkgname}"
export RUSTUP_TOOLCHAIN=stable
cargo test --frozen --all-features
}
package() {
cd "${_pkgname}"
install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/${_pkgname}"
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/${_pkgname}/LICENSE"
# example config file
install -Dm644 example/config.toml "$pkgdir/usr/share/extension-downloader/config.toml"
}
|