diff options
author | xiota | 2024-03-26 10:50:22 +0000 |
---|---|---|
committer | xiota | 2024-03-26 10:50:22 +0000 |
commit | 4f479919a4303b4a1172fbe0eae21a4444649b3a (patch) | |
tree | f5c3246916f48ed177f301b9d2bc00590b3d9a65 /PKGBUILD | |
parent | e8387bc478255ec0f7e04fe6cf9b43f7c231542b (diff) | |
download | aur-epdfview-git.tar.gz |
minor updates
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 58 |
1 files changed, 24 insertions, 34 deletions
@@ -3,16 +3,22 @@ _pkgname="epdfview" pkgname="$_pkgname-git" pkgver=0.2.0.r28.g6f907bd -pkgrel=1 +pkgrel=2 pkgdesc='Lightweight PDF document viewer' url='https://github.com/Flow-It/epdfview_old' +license=('GPL-2.0-or-later') arch=('x86_64') -license=('GPL2') depends=( 'gtk3' 'hicolor-icon-theme' 'poppler-glib' + + ## implicit + #cairo + #gdk-pixbuf2 + #glib2 + #pango ) makedepends=( 'doxygen' @@ -23,45 +29,29 @@ makedepends=( options=('!emptydirs') -if [ x"$_pkgname" != x"$pkgname" ] ; then - provides=("$_pkgname") - conflicts=("$_pkgname") -fi +provides=("$_pkgname=${pkgver%%.r*}") +conflicts=("$_pkgname") _pkgsrc="$_pkgname" -source=( - "$_pkgname"::"git+$url" -) -sha256sums=( - 'SKIP' -) +source=("$_pkgname"::"git+$url.git") +sha256sums=('SKIP') pkgver() { - cd "$srcdir/$_pkgsrc" + cd "$_pkgsrc" + local _regex="^\s+version:\s+'([0-9]+\\.[0-9]+\\.[0-9]+)',\$" + local _file='meson.build' - _regex="^\s+version:\s+'([0-9]+\\.[0-9]+\\.[0-9]+)',\$" - _file='meson.build' + local _line=$(grep -Esm1 "$_regex" "$_file") + local _line_num=$(grep -Ensm1 "$_regex" "$_file" | cut -d':' -f1) - _line=$( - grep -E "$_regex" "$_file" | head -1 - ) - _version=$( - printf '%s' "$_line" | sed -E "s@$_regex@\1@" - ) - _commit=$( - git log -G "$_line" -1 --pretty=oneline --no-color | sed 's@\ .*$@@' - ) - _revision=$( - git rev-list --count $_commit..HEAD - ) - _hash=$( - git rev-parse --short HEAD - ) + local _version=$(sed -E "s@$_regex@\1@" <<< "$_line") + + local _commit=$(git blame -L $_line_num,+1 -- "$_file" | awk '{print $1;}') + + local _revision=$(git rev-list --count --cherry-pick "$_commit"...HEAD) + local _hash=$(git rev-parse --short=7 HEAD) - printf '%s.r%s.g%s' \ - "$_version" \ - "$_revision" \ - "$_hash" + printf '%s.r%s.g%s' "${_version:?}" "${_revision:?}" "${_hash:?}" } build() { |