blob: 774c766f0ca85f4550d490c7aa781b2e2a9430e9 (
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: Flaviu Tamas <me@flaviutamas.com>
# Maintainer: Caleb Maclennan <caleb@alerque.com>
# Contributor: Felix Golatofski <contact@xdfr.de>
_pkgname=nushell
pkgname=$_pkgname-git
pkgver=0.104.0.r40.gbb37306
pkgrel=1
pkgdesc='A new type of shell'
arch=('x86_64' 'i686' 'armv6h' 'armv7h')
url='https://www.nushell.sh'
_url="https://github.com/$_pkgname/$_pkgname"
license=('MIT')
depends=('libcrypto.so' 'libssl.so' 'zlib')
makedepends=('cargo' 'git')
provides=("$_pkgname=$pkgver")
conflicts=("$_pkgname")
install=nushell.install
source=("${pkgname%-git}::git+$_url.git")
sha256sums=('SKIP')
prepare() {
cd "${pkgname%-git}"
cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
}
pkgver() {
cd "${pkgname%-git}"
git describe --long --abbrev=7 --tags HEAD |
sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}
build() {
cd "${pkgname%-git}"
export RUSTUP_TOOLCHAIN=stable
export CARGO_TARGET_DIR=target
CFLAGS+=' -ffat-lto-objects'
cargo build --release --frozen --workspace
}
check() {
cd "${pkgname%-git}"
export RUSTUP_TOOLCHAIN=stable
# cargo test --frozen --workspace
}
package() {
cd "${pkgname%-git}"
find target/release \
-maxdepth 1 \
-executable \
-type f \
-name "nu*" \
-exec install -Dm0755 -t "$pkgdir/usr/bin/" {} +
install -Dm0644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md
install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname/" LICENSE
}
|