Date: Tuesday, November 1, 2022 @ 23:11:31
Author: felixonmars
Revision: 1340741
archrelease: copy trunk to community-staging-x86_64
Added:
nushell/repos/community-staging-x86_64/
nushell/repos/community-staging-x86_64/PKGBUILD
(from rev 1340738, nushell/trunk/PKGBUILD)
nushell/repos/community-staging-x86_64/nushell.install
(from rev 1340738, nushell/trunk/nushell.install)
-----------------+
PKGBUILD | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
nushell.install | 12 ++++++++++
2 files changed, 73 insertions(+)
Copied: nushell/repos/community-staging-x86_64/PKGBUILD (from rev 1340738,
nushell/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD (rev 0)
+++ community-staging-x86_64/PKGBUILD 2022-11-01 23:11:31 UTC (rev 1340741)
@@ -0,0 +1,61 @@
+# Maintainer: George Rawlinson <[email protected]>
+# Maintainer: Caleb Maclennan <[email protected]>
+# Contributor: KokaKiwi <[email protected]>
+# Contributor: Felix Golatofski <[email protected]>
+# Contributor: Bumsik Kim <[email protected]>
+
+pkgname=nushell
+pkgver=0.70.0
+pkgrel=2
+pkgdesc='A new type of shell'
+arch=('x86_64')
+url='https://www.nushell.sh'
+license=('MIT')
+depends=('openssl' 'libxcb' 'libx11' 'curl' 'bzip2')
+makedepends=('git' 'rust')
+options=('!lto')
+install=nushell.install
+_commit='9ef65dcd692b502d7476b1787247fae8638c2f0c'
+source=("$pkgname::git+https://github.com/nushell/nushell.git#commit=$_commit")
+b2sums=('SKIP')
+
+# NOTE: as of 0.40.0, upstream uses upx to reduce binary size, but this strips
+# RELRO + PIE, so we do not enable this
+
+pkgver() {
+ cd "$pkgname"
+ git describe --tags
+}
+
+prepare() {
+ cd "$pkgname"
+ cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
+}
+
+build() {
+ cd "$pkgname"
+ cargo build --release --frozen --workspace --features=extra
+}
+
+check() {
+ cd "$pkgname"
+ cargo test --frozen --workspace --features=extra
+}
+
+package() {
+ cd "$pkgname"
+
+ # binaries
+ find target/release \
+ -maxdepth 1 \
+ -executable \
+ -type f \
+ -name "nu*" \
+ -exec install -vDm755 -t "$pkgdir/usr/bin" "{}" +
+
+ # documentation
+ install -vDm644 -t "$pkgdir/usr/share/doc/$pkgname" README.md
+
+ # license
+ install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE
+}
Copied: nushell/repos/community-staging-x86_64/nushell.install (from rev
1340738, nushell/trunk/nushell.install)
===================================================================
--- community-staging-x86_64/nushell.install (rev 0)
+++ community-staging-x86_64/nushell.install 2022-11-01 23:11:31 UTC (rev
1340741)
@@ -0,0 +1,12 @@
+post_install() {
+ grep -Fqx /bin/nu /etc/shells || echo /bin/nu >> /etc/shells
+ grep -Fqx /usr/bin/nu /etc/shells || echo /usr/bin/nu >> /etc/shells
+}
+
+post_upgrade() {
+ post_install
+}
+
+pre_remove() {
+ sed -i -r '/^(\/usr)?\/bin\/nu$/d' etc/shells
+}