summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorfrealgagu2018-03-24 23:21:07 -0500
committerfrealgagu2018-03-24 23:21:07 -0500
commitef61aee27e8fbe5c4671b864cf7cc2a36f38ed6a (patch)
treef53d5edbf204256c486df5c1b9e4d3d820b0b375
parent31ddedaf615ceb50cabbd2586f8437283b346dc0 (diff)
downloadaur-ef61aee27e8fbe5c4671b864cf7cc2a36f38ed6a.tar.gz
Changing pkgver to print git commit correctly
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD35
2 files changed, 19 insertions, 18 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 7ecea1f45ccc..60e3721fb300 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = just-git
pkgdesc = Just a command runner, like make.
- pkgver = 0.3.5.3.g573cebd
+ pkgver = latest
pkgrel = 1
url = https://github.com/casey/just
arch = x86_64
diff --git a/PKGBUILD b/PKGBUILD
index 301aa4671ecc..d6ba1f65724f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,31 +1,32 @@
-# Maintainer: Stefan Husmann <stefan-husmann@t-online.de>
+# Maintainer: Fredy GarcĂ­a <frealgagu at gmail dot com>
+# Contributor: Stefan Husmann <stefan-husmann@t-online.de>
pkgname=just-git
-pkgver=0.3.5.3.g573cebd
+pkgver=latest
pkgrel=1
pkgdesc="Just a command runner, like make."
-arch=('x86_64' 'i686')
-url="https://github.com/casey/just"
-license=('custom:WTFPL' 'custom:MIT' 'APACHE')
-depends=('gcc-libs')
-makedepends=('cargo')
-provides=('just')
-conflicts=('just')
-source=(git+https://github.com/casey/just.git)
-sha256sums=('SKIP')
+arch=("x86_64" "i686")
+url="https://github.com/casey/${pkgname%-git}"
+license=("custom:WTFPL" "custom:MIT" "APACHE")
+depends=("gcc-libs")
+makedepends=("cargo")
+provides=("${pkgname%-git}")
+conflicts=("${pkgname%-git}")
+source=("git+https://github.com/casey/${pkgname%-git}.git")
+sha256sums=("SKIP")
pkgver() {
- cd ${pkgname%-git}
- echo $(git describe --tags|tr - .|tr -d v)
+ cd "${pkgname%-git}"
+ git describe --long --tags | sed 's/\([^-]*-\)g/r\1/;s/-/./g' | tr -d v
}
build() {
- cd ${pkgname%-git}
+ cd "${pkgname%-git}"
cargo build --release
}
package() {
- cd ${pkgname%-git}
- install -Dm755 "$srcdir"/${pkgname%-git}/target/release/just "$pkgdir"/usr/bin/just
- install -Dm644 "$srcdir"/${pkgname%-git}/LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+ cd "${pkgname%-git}"
+ install -Dm755 "${srcdir}/${pkgname%-git}/target/release/${pkgname%-git}" "${pkgdir}/usr/bin/${pkgname%-git}"
+ install -Dm644 "${srcdir}/${pkgname%-git}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}