summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorlmartinez-mirror2020-10-07 11:32:36 -0500
committerlmartinez-mirror2020-10-07 11:32:36 -0500
commitcb07514fe336ef87b07b2a1296a7d98653db0fe4 (patch)
tree96eb5f7f8ba91da23556cfec5562634df99ceabc
parentbbc06e9cb688531e38623eb0298de18e7e922cff (diff)
downloadaur-cb07514fe336ef87b07b2a1296a7d98653db0fe4.tar.gz
create PKGBUILD for zoxide-git based on zoxide's PKGBUILD
-rw-r--r--.SRCINFO14
-rw-r--r--PKGBUILD31
2 files changed, 29 insertions, 16 deletions
diff --git a/.SRCINFO b/.SRCINFO
index ba1e172391e..8ed0e8da92d 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,13 +1,17 @@
-pkgbase = zoxide
+pkgbase = zoxide-git
pkgdesc = A fast cd command that learns your habits
- pkgver = 0.4.3
+ pkgver = v0.4.3.r17.geaf63bc
pkgrel = 1
url = https://github.com/ajeetdsouza/zoxide
arch = x86_64
license = MIT
makedepends = rust
- source = zoxide-0.4.3.tar.gz::https://github.com/ajeetdsouza/zoxide/archive/v0.4.3.tar.gz
- sha512sums = 4ab395835c5ac095a21f5f129e67a0c4eaf7466d3f5b3ccb0b724bd94385faf3ff2422eec2c7c4da60ee8cc51495f205ef1501114fbd9784fe22ab3704901e9a
+ makedepends = git
+ provides = zoxide
+ conflicts = zoxide
+ conflicts = zoxide-bin
+ source = zoxide-git::git+https://github.com/ajeetdsouza/zoxide
+ sha512sums = SKIP
-pkgname = zoxide
+pkgname = zoxide-git
diff --git a/PKGBUILD b/PKGBUILD
index a6539da0049..c41790601f3 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,22 +1,31 @@
-# Maintainer: desbma
-pkgname=zoxide
-pkgver=0.4.3
+# Maintainer: Luis Martinez
+# Credit: desbma
+pkgname=zoxide-git
+_pkgname=zoxide
+pkgver=v0.4.3.r17.geaf63bc
pkgrel=1
pkgdesc='A fast cd command that learns your habits'
arch=('x86_64')
-url="https://github.com/ajeetdsouza/${pkgname}"
+url="https://github.com/ajeetdsouza/${_pkgname}"
license=('MIT')
-makedepends=('rust')
-source=("${pkgname}-${pkgver}.tar.gz::https://github.com/ajeetdsouza/${pkgname}/archive/v${pkgver}.tar.gz")
-sha512sums=('4ab395835c5ac095a21f5f129e67a0c4eaf7466d3f5b3ccb0b724bd94385faf3ff2422eec2c7c4da60ee8cc51495f205ef1501114fbd9784fe22ab3704901e9a')
+makedepends=('rust' 'git')
+provides=('zoxide')
+conflicts=('zoxide' 'zoxide-bin')
+source=("${pkgname}::git+${url}")
+sha512sums=('SKIP')
+
+pkgver() {
+ cd "${pkgname}"
+ git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
+}
build() {
- cd "${pkgname}-${pkgver}"
+ cd "${pkgname}"
cargo build --release --locked
}
package() {
- cd "${pkgname}-${pkgver}"
- install -Dm 755 -t "${pkgdir}/usr/bin" ./target/release/${pkgname}
- install -Dm 644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+ cd "${pkgname}"
+ install -Dm 755 -t "${pkgdir}/usr/bin" ./target/release/${_pkgname}
+ install -Dm 644 LICENSE "${pkgdir}/usr/share/licenses/${_pkgname}/LICENSE"
}