From 48a62dbc03979213cb56e3b6de9ea552c8fc8415 Mon Sep 17 00:00:00 2001 From: miampf Date: Sun, 21 Jan 2024 22:38:05 +0000 Subject: [PATCH] nit: PKGBUILD (#32) --- .SRCINFO | 13 +++++++++++++ Cargo.lock | 2 +- Cargo.toml | 2 ++ PKGBUILD | 36 ++++++++++++++++++++++++++++++++++++ 4 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 .SRCINFO create mode 100644 PKGBUILD diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 0000000..abeafcf --- /dev/null +++ b/.SRCINFO @@ -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 diff --git a/Cargo.lock b/Cargo.lock index b7e56d4..e467b03 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -298,7 +298,7 @@ dependencies = [ [[package]] name = "tag" -version = "0.1.0" +version = "0.2.0" dependencies = [ "clap", "colored", diff --git a/Cargo.toml b/Cargo.toml index 3a38463..d777220 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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"] diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 0000000..0251797 --- /dev/null +++ b/PKGBUILD @@ -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" +}