summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaleb Bassi2020-01-18 10:40:49 -0800
committerCaleb Bassi2020-01-18 10:40:49 -0800
commit9da222b06206cb1855664cf567c79445ae8f7369 (patch)
treee205037d0a69a3e7b37a3f344264cef89353fe7f
parent04c17cd7e376aea20480262580e0f95fe068901f (diff)
downloadaur-9da222b06206cb1855664cf567c79445ae8f7369.tar.gz
Refactor pkgbuild
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD35
2 files changed, 17 insertions, 24 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 5aac4bdf8027..a46c0423d737 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = ytop-git
pkgdesc = A TUI system monitor written in Rust
- pkgver = r85.0611d52
+ pkgver = r101.115fb7f
pkgrel = 1
url = https://github.com/cjbassi/ytop
arch = x86_64
@@ -9,8 +9,8 @@ pkgbase = ytop-git
makedepends = cargo
provides = ytop
conflicts = ytop
- source = git+https://github.com/cjbassi/ytop
- md5sums = SKIP
+ source = ytop::git+https://github.com/cjbassi/ytop
+ sha256sums = SKIP
pkgname = ytop-git
diff --git a/PKGBUILD b/PKGBUILD
index 1005eacb3cdd..65ddd9644e19 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,8 +1,11 @@
# Maintainer: Caleb Bassi <calebjbassi@gmail.com>
+# https://wiki.archlinux.org/index.php/VCS_package_guidelines
+# https://wiki.archlinux.org/index.php/Rust_package_guidelines
+
pkgname=ytop-git
_pkgname=${pkgname%-git}
-pkgver=r85.0611d52
+pkgver=r101.115fb7f
pkgrel=1
pkgdesc="A TUI system monitor written in Rust"
arch=(x86_64)
@@ -11,32 +14,22 @@ license=("MIT")
makedepends=("git" "cargo")
provides=(${_pkgname})
conflicts=(${_pkgname})
-source=("git+${url}")
-md5sums=("SKIP")
+source=("${_pkgname}::git+${url}")
+sha256sums=("SKIP")
-# https://wiki.archlinux.org/index.php/VCS_package_guidelines
pkgver() {
- cd "${_pkgname}"
- ( set -o pipefail
- git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
- printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
- )
+ cd "${_pkgname}"
+ ( set -o pipefail
+ git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+ )
}
-# https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=loop
build() {
- cd "${_pkgname}"
- if command -v rustup > /dev/null 2>&1; then
- RUSTFLAGS="-C target-cpu=native" rustup run stable \
- cargo build --release
- elif rustc --version | grep -q nightly; then
- RUSTFLAGS="-C target-cpu=native" \
- cargo build --release
- else
- cargo build --release
- fi
+ cd "${_pkgname}"
+ cargo build --release --locked --all-features
}
package() {
- install -Dm755 "${srcdir}/${_pkgname}/target/release/${_pkgname}" "${pkgdir}/usr/bin/${_pkgname}"
+ install -Dm755 "${srcdir}/${_pkgname}/target/release/${_pkgname}" "${pkgdir}/usr/bin/${_pkgname}"
}