generated from ouuan/AUR-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
flamelens-git: init at 0.1.0.r4.g22d978f
- Loading branch information
1 parent
60da1f0
commit c5b38fa
Showing
1 changed file
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Maintainer: RiverOnVenus <error@zhui.dev> | ||
pkgname=flamelens-git | ||
pkgver=0.1.0.r4.g22d978f | ||
pkgrel=1 | ||
pkgdesc="Flamegraph viewer in the terminal" | ||
arch=('x86_64') | ||
url="https://github.com/YS-L/flamelens" | ||
license=('MIT') | ||
depends=('gcc-libs' 'glibc' 'libunwind') | ||
optdepends=( | ||
"py-spy: Display a live flamegraph of a running Python program using py-spy as the profiler" | ||
) | ||
makedepends=('git' 'cargo') | ||
provides=('flamelens') | ||
conflicts=('flamelens') | ||
source=("$pkgname"::"git+${url}") | ||
sha256sums=('SKIP') | ||
|
||
pkgver() { | ||
cd $pkgname | ||
git describe --long --tags --abbrev=7 | sed 's/^v//;s/-/.r/;s/-/./' | ||
} | ||
|
||
prepare() { | ||
cd $pkgname | ||
export RUSTUP_TOOLCHAIN=stable | ||
cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')" | ||
} | ||
|
||
build() { | ||
cd $pkgname | ||
export RUSTUP_TOOLCHAIN=stable | ||
export CARGO_TARGET_DIR=target | ||
cargo build --frozen --release --all-features | ||
} | ||
|
||
package() { | ||
install -Dm0755 -t "$pkgdir/usr/bin/" "$pkgname/target/release/flamelens" | ||
install -Dm644 "$srcdir/$pkgname/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" | ||
} |