diff options
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | PKGBUILD | 53 |
2 files changed, 29 insertions, 30 deletions
@@ -1,14 +1,14 @@ pkgbase = go-outline-git pkgdesc = Utility to extract JSON representation of declarations from a Go source file pkgver = 20161011.9_e785568 - pkgrel = 1 + pkgrel = 2 + url = https://github.com/lukehoban/go-outline arch = i686 arch = x86_64 license = GPL makedepends = go makedepends = git - source = git://github.com/lukehoban/go-outline.git + source = git+https://github.com/lukehoban/go-outline.git md5sums = SKIP pkgname = go-outline-git - @@ -1,49 +1,48 @@ pkgname=go-outline-git pkgver=20161011.9_e785568 -pkgrel=1 +pkgrel=2 pkgdesc="Utility to extract JSON representation of declarations from a Go source file" arch=('i686' 'x86_64') license=('GPL') -depends=( -) +url="https://github.com/lukehoban/go-outline" makedepends=( - 'go' - 'git' + 'go' + 'git' ) source=( - "git://github.com/lukehoban/go-outline.git" + "git+https://github.com/lukehoban/go-outline.git" ) md5sums=( - 'SKIP' -) - -backup=( -) - -conflicts=( + 'SKIP' ) pkgver() { - cd "$srcdir/go-outline" - local date=$(git log -1 --format="%cd" --date=short | sed s/-//g) - local count=$(git rev-list --count HEAD) - local commit=$(git rev-parse --short HEAD) - echo "$date.${count}_$commit" + cd "$srcdir/go-outline" + local date=$(git log -1 --format="%cd" --date=short | sed s/-//g) + local count=$(git rev-list --count HEAD) + local commit=$(git rev-parse --short HEAD) + echo "$date.${count}_$commit" +} + +prepare() { + cd "${pkgname%-git}" + go mod init "${url#https://}" + go mod tidy } build() { - GOPATH=$srcdir - GOBIN=$srcdir/bin/ - mkdir -p $srcdir/src - ln -sf $srcdir/go-outline $srcdir/src - cd $srcdir/src/go-outline - go get -v + GOPATH=$srcdir + GOBIN=$srcdir/bin/ + mkdir -p $srcdir/src + ln -sf $srcdir/go-outline $srcdir/src + cd $srcdir/src/go-outline + go get -v } package() { - find "$srcdir/bin/" -type f -executable | while read filename; do - install -DT "$filename" "$pkgdir/usr/bin/$(basename $filename)" - done + find "$srcdir/bin/" -type f -executable | while read filename; do + install -DT "$filename" "$pkgdir/usr/bin/$(basename $filename)" + done } |