summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f0f75d817877d31e90472ffd9b709a85f6372a75 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Maintainer: Salamandar <felix@piedallu.me>
pkgname='aur-updater-git'
_gitname='aur-updater'
pkgver=r2.303470e
pkgrel=1
pkgdesc="Easy tool to update your PKGBUILDS and update the AUR database automatically"
arch=('any')
url="https://github.com/Salamandar/$_gitname.git"
license=('GPL')
groups=()
makedepends=('git')
depends=('bash' 'pkgbuild-introspection' 'pacman' 'namcap')
source=("git+$url")
sha256sums=('SKIP')

pkgver() {
    cd "$srcdir/$_gitname"
    printf "%s.%s" "$( set -o pipefail
        git describe --long --tags 2>/dev/null \
            | sed 's/\([^-]*-g\)/r\1/;s/-/./g' \
            | sed -r 's/.([0-9,a-g,A-G]{7}.*)//' ||
        printf "r%s" "$(git rev-list --count HEAD)"
    )" "$(git rev-parse --short HEAD)"
}


package() {
    cd "$srcdir/$_gitname"
    chmod +x ./aur-updater.sh

    install -d $pkgdir/usr/bin/
    cp ./aur-updater.sh "$pkgdir/usr/bin"
}