Skip to content

Commit

Permalink
flamelens-git: init at 0.1.0.r4.g22d978f
Browse files Browse the repository at this point in the history
  • Loading branch information
RiverOnVenus committed Jul 1, 2024
1 parent 60da1f0 commit c5b38fa
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions flamelens-git/PKGBUILD
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"
}

0 comments on commit c5b38fa

Please sign in to comment.