Skip to content

Commit

Permalink
chapel-git track main; use scraped version number until git describe …
Browse files Browse the repository at this point in the history
…correct

Signed-off-by: ghbrown <[email protected]>
  • Loading branch information
ghbrown committed Jun 8, 2022
1 parent 3571c70 commit a0c0a15
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 8 deletions.
4 changes: 2 additions & 2 deletions util/packaging/aur/chapel-git/.SRCINFO
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pkgbase = chapel-git
pkgdesc = Programming language designed for productive parallel computing at scale
pkgver = 1.26.cc0241ef9c
pkgver = 1.27.0.7648.gbcc4ac3109
pkgrel = 1
url = https://chapel-lang.org/
arch = x86_64
Expand All @@ -12,7 +12,7 @@ pkgbase = chapel-git
depends = perl
depends = llvm
depends = clang
source = git+https://github.com/mppf/chapel.git
source = git+https://github.com/chapel-lang/chapel.git
sha256sums = SKIP

pkgname = chapel-git
23 changes: 17 additions & 6 deletions util/packaging/aur/chapel-git/PKGBUILD
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@

# Maintainer: Gabriel Brown <[email protected]>

#_gituser="chapel-lang"
_gituser="mppf" #temp: until PR #19913 is merged
_gituser="chapel-lang"
_gitname="chapel"

pkgname=${_gitname}-git
_basepkgver=1.26
pkgver=1.26.cc0241ef9c
pkgver=1.27.0.7648.gbcc4ac3109
pkgrel=1
pkgdesc="Programming language designed for productive parallel computing at scale"
url="https://chapel-lang.org/"
Expand All @@ -20,12 +18,25 @@ sha256sums=('SKIP') # source is not static

pkgver() {
cd "${srcdir}/${_gitname}"
git describe --long --tags --always | sed 's/\-/\./' | echo "${_basepkgver}.$(cat -)"
# get correct numerical version from internal file
ver_file="compiler/main/version_num.h"
major_ver=$(grep MAJOR_VERSION ${ver_file} | cut -d ' ' -f 3)
minor_ver=$(grep MINOR_VERSION ${ver_file} | cut -d ' ' -f 3)
update_ver=$(grep UPDATE_VERSION ${ver_file} | cut -d ' ' -f 3)
ver_num="${major_ver}.${minor_ver}.${update_ver}"
# keep second (correct) half of git describe result
gitdescribe=$(git describe --long --tags --always)
tail=$(echo ${gitdescribe} | cut -d '-' -f 2,3) # no version number
# combine two pieces
ver_hyphen="${ver_num}-${tail}"
ver=$(echo ${ver_hyphen} | sed 's/\-/\./g')
echo ${ver}
# use below when git describe begins with correct version number
#git describe --long --tags --always | sed 's/\-/\./g'
}

build() {
cd "${srcdir}/${_gitname}"
git checkout less-la #temp: until PR #19913 is merged
./configure --prefix=/usr
make
}
Expand Down

0 comments on commit a0c0a15

Please sign in to comment.