summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorShatur952018-03-26 01:37:12 +0300
committerShatur952018-03-26 01:37:12 +0300
commit0f34b7c614cf6c3c23db9ac12ea9e87257b0219b (patch)
tree679fecd37ba35eba75c21ceb93ca71ec391b2afa
parent7f869c5b3796d8155701cc29147bad5fd2027b78 (diff)
downloadaur-0f34b7c614cf6c3c23db9ac12ea9e87257b0219b.tar.gz
Fix version detection
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD27
2 files changed, 17 insertions, 16 deletions
diff --git a/.SRCINFO b/.SRCINFO
index cd8a8952a7a8..3ff18cc2cdc6 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,16 +1,18 @@
pkgbase = crow-translate-git
pkgdesc = A simple and lightweight translator that allows to translate and speak the selected text using the Google Translate API
- pkgver = r26.abe8009
+ pkgver = 0.9.5.r0.g7c4b066
pkgrel = 1
url = https://github.com/Shatur95/Crow
arch = x86_64
license = GPL3
makedepends = qt5-tools
+ makedepends = git
depends = qt5-base
depends = qt5-multimedia
depends = gst-plugins-good
depends = openssl
- provides = crow
+ provides = crow-translate
+ conflicts = crow-translate
source = crow-translate::git+https://github.com/Shatur95/CrowTranslate.git
sha256sums = SKIP
diff --git a/PKGBUILD b/PKGBUILD
index 24ee76497736..5d63e299e152 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,42 +1,41 @@
# Maintainer: Shatur <genaloner@gmail.com>
pkgname=crow-translate-git
-pkgver=r26.abe8009
+pkgver=0.9.5.r0.g7c4b066
pkgrel=1
pkgdesc="A simple and lightweight translator that allows to translate and speak the selected text using the Google Translate API"
arch=('x86_64')
url="https://github.com/Shatur95/Crow"
license=('GPL3')
depends=('qt5-base' 'qt5-multimedia' 'gst-plugins-good' 'openssl')
-makedepends=('qt5-tools')
-provides=('crow')
-source=("${pkgname%-*}::git+https://github.com/Shatur95/CrowTranslate.git")
+makedepends=('qt5-tools' 'git')
+provides=("${pkgname%-git}")
+conflicts=("${pkgname%-git}")
+source=("${pkgname%-git}::git+https://github.com/Shatur95/CrowTranslate.git")
sha256sums=('SKIP')
+pkgver() {
+ cd "${pkgname%-git}"
+ git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
# Clone submodules
prepare() {
- cd ${pkgname%-*}
+ cd "${pkgname%-git}"
git submodule init
git submodule update
}
-pkgver() {
- cd ${pkgname%-*}
-
- # Get the version number.
- printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
-}
-
build() {
- cd ${pkgname%-*}
+ cd "${pkgname%-git}"
qmake
make
}
package() {
- cd ${pkgname%-*}
+ cd "${pkgname%-git}"
make INSTALL_ROOT="$pkgdir/" install
}