Skip to content

Commit

Permalink
nit: PKGBUILD (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
miampf authored Jan 21, 2024
1 parent 1fca27a commit 48a62db
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 1 deletion.
13 changes: 13 additions & 0 deletions .SRCINFO
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
pkgbase = tag
pkgdesc = Search for local text files with a simple tagging system.
pkgver = 0.2.0
pkgrel = 1
url = https://github.com/miampf/tag
arch = x86_64
license = MIT
makedepends = cargo
provides = tag
source = tag-0.2.0.tar.gz::https://static.crates.io/crates/tag/tag-0.2.0.crate
sha1sums = SKIP

pkgname = tag
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
[package]
name = "tag"
authors = ["miampf"]
version = "0.2.0"
edition = "2021"
description = "Search for local text files with a simple tagging system."
license = "MIT"
repository = "https://github.com/miampf/tag"
homepage = "https://github.com/miampf/tag"
keywords = ["organization", "tagging", "plaintext", "searching"]
categories = ["command-line-utilities", "filesystem"]

Expand Down
36 changes: 36 additions & 0 deletions PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
pkgname=tag
pkgver=0.2.0
pkgrel=1
source=("$pkgname-$pkgver.tar.gz::https://static.crates.io/crates/$pkgname/$pkgname-$pkgver.crate")
pkgdesc="Search for local text files with a simple tagging system."
arch=('x86_64')
url='https://github.com/miampf/tag'
license=('MIT')
provides=('tag')
makedepends=(cargo)
sha1sums=('SKIP')

prepare() {
cd $pkgname-$pkgver
export RUSTUP_TOOLCHAIN=stable
cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
}

build() {
cd $pkgname-$pkgver
export RUSTUP_TOOLCHAIN=stable
export CARGO_TARGET_DIR=target
cargo build --frozen --release --all-features --target "$(rustc -vV | sed -n 's/host: //p')"
}


check() {
cd $pkgname-$pkgver
export RUSTUP_TOOLCHAIN=stable
cargo test --frozen --all-features --target "$(rustc -vV | sed -n 's/host: //p')"
}

package() {
cd $pkgname-$pkgver
install -Dm0755 -t "$pkgdir/usr/bin/" "target/$(rustc -vV | sed -n 's/host: //p')/release/$pkgname"
}

0 comments on commit 48a62db

Please sign in to comment.