summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam Whited2019-01-09 23:52:31 -0600
committerSam Whited2019-01-10 00:08:28 -0600
commit83207a70bce1a9603bcab55da848ceedbf369ea5 (patch)
tree3e85a2780445853767d6dbf1e24226a7c470253c
parentd0f2f19de1d933f59cd12abd56d9ca6fea63ef96 (diff)
downloadaur-83207a70bce1a9603bcab55da848ceedbf369ea5.tar.gz
Add more tools and a service file for godoc
-rw-r--r--.SRCINFO21
-rw-r--r--.gitignore6
-rw-r--r--PKGBUILD108
-rw-r--r--godoc.service10
4 files changed, 78 insertions, 67 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 6cc9a718c68..724bf66bf57 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,18 +1,21 @@
-# Generated by mksrcinfo v8
-# Thu Sep 8 07:59:48 UTC 2016
pkgbase = go-tools-git
- pkgdesc = golang tools
- pkgver = autogenerated
+ pkgdesc = Developer tools for the Go programming language
+ pkgver = v0.0.0_20190110015856_aa033095749b
pkgrel = 1
- arch = i686
+ url = https://godoc.org/golang.org/x/tools/
arch = x86_64
- license = GPL
- makedepends = go
+ license = BSD
makedepends = git
+ makedepends = go>=1.11
+ depends = glibc
+ provides = go-tools
conflicts = go-tools
+ conflicts = go-tools-complete-git
conflicts = go-imports-git
- source = go-tools-git::git://github.com/golang/tools#branch=master
- md5sums = SKIP
+ source = go-tools-git::git+https://go.googlesource.com/tools
+ source = godoc.service
+ sha256sums = SKIP
+ sha256sums = 0afd3dcbf1758b33f6810cc81fc7eb37095db48bc8055ddd6b714c46184a490e
pkgname = go-tools-git
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000000..28942307828
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,6 @@
+go-tools-git/
+pkg/
+src/
+*.tar.gz
+*.tar.xz
+*.zip
diff --git a/PKGBUILD b/PKGBUILD
index a5c5ea4e969..606df1f0a49 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,71 +1,63 @@
-# Maintainer: Egor Kovetskiy <e.kovetskiy@office.ngs.ru>
-pkgname=go-tools-git
-pkgver=${PKGVER:-autogenerated}
-pkgrel=${PKGREL:-1}
-pkgdesc="golang tools"
-arch=('i686' 'x86_64')
-license=('GPL')
-depends=(
-)
-makedepends=(
- 'go'
- 'git'
-)
-
-source=(
- "$pkgname::git://github.com/golang/tools#branch=${BRANCH:-master}"
-)
-
-md5sums=(
- 'SKIP'
-)
+# Maintainer: Sam Whited <sam@samwhited.com>
+# Contributor: Egor Kovetskiy <e.kovetskiy@office.ngs.ru>
-backup=(
-)
-conflicts=(
- 'go-tools'
- 'go-imports-git'
-)
+pkgname=go-tools-git
+pkgver=v0.0.0_20190110015856_aa033095749b
+pkgrel=1
+pkgdesc='Developer tools for the Go programming language'
+arch=(x86_64)
+url='https://godoc.org/golang.org/x/tools/'
+license=(BSD)
+depends=(glibc)
+makedepends=('git'
+ 'go>=1.11')
+conflicts=('go-tools'
+ 'go-tools-complete-git'
+ 'go-imports-git')
+provides=('go-tools')
+source=("${pkgname}::git+https://go.googlesource.com/tools"
+ 'godoc.service')
+sha256sums=('SKIP'
+ '0afd3dcbf1758b33f6810cc81fc7eb37095db48bc8055ddd6b714c46184a490e')
pkgver() {
- if [[ "$PKGVER" ]]; then
- echo "$PKGVER"
- return
- fi
-
- cd "$srcdir/$pkgname"
- 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 "${pkgname}"
+ # Until they start versioning this repo, use the Go Modules special version
+ # format.
+ git show --abbrev-commit --abbrev=12 --pretty=format:v0.0.0_%cd_%h --no-patch HEAD
}
-build() {
- if [ -L "$srcdir/$pkgname" ]; then
- rm "$srcdir/$pkgname" -rf
- mv "$srcdir/go/src/$pkgname/" "$srcdir/$pkgname"
- fi
-
- rm -rf "$srcdir/go/src"
- mkdir -p "$srcdir/go/src/golang.org/x/"
-
- mv "$srcdir/$pkgname" "$srcdir/go/src/golang.org/x/tools/"
- cd "$srcdir/go/src/golang.org/x/tools/"
- git submodule update --init
+prepare() {
+ export GO111MODULE=on
+ rm -rf build/
+ mkdir -p build/
+ mkdir -p cache/
- export GOPATH="$srcdir/go"
- export GOBIN=""
+ cd "${pkgname}"
+ rm -f go.mod
+ go mod init golang.org/x/tools
+}
- rm -rf "$srcdir/go/src/golang.org/x/tools/cmd/"{bundle,stress,godoc}
+build() {
+ export GO111MODULE=on
+ cd "${pkgname}"
+ GOCACHE="${srcdir}/cache" GOBIN="${srcdir}/build" go install -v -a \
+ -gcflags "all=-trimpath=${PWD}" \
+ -asmflags "all=-trimpath=${PWD}" \
+ -ldflags "-extldflags ${LDFLAGS}" \
+ ./cmd/...
+}
- go get -v \
- -gcflags "-trimpath $GOPATH/src" \
- ./cmd/...
+check() {
+ cd "${pkgname}"
+ go test ./cmd/...
}
package() {
- find "$srcdir/go/bin/" -type f -executable | while read filename; do
- install -DT "$filename" "$pkgdir/usr/bin/$(basename $filename)"
- done
+ install -Dm755 build/* -t "${pkgdir}"/usr/bin/
+ install -Dm644 ${pkgname}/LICENSE -t ${pkgdir}/usr/share/licenses/${pkgname}/
+ install -Dm644 godoc.service -t ${pkgdir}/usr/lib/systemd/system/
}
+
+# vim: ts=2 sw=2 et:
diff --git a/godoc.service b/godoc.service
new file mode 100644
index 00000000000..6203f522cba
--- /dev/null
+++ b/godoc.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Godoc
+After=network.target
+
+[Service]
+Type=simple
+ExecStart=/usr/bin/godoc -http=127.0.0.1:6060
+
+[Install]
+WantedBy=multi-user.target