summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorTony Lambiris2019-04-29 15:34:23 -0400
committerTony Lambiris2019-04-29 15:34:23 -0400
commit597af89b1aef6b7ea6f6c2d994c1a2b03e7979fd (patch)
treef9a93038a8ee35b9a032fe349834acc164283545
downloadaur-597af89b1aef6b7ea6f6c2d994c1a2b03e7979fd.tar.gz
Initial commit
-rw-r--r--.SRCINFO14
-rw-r--r--.gitignore5
-rw-r--r--PKGBUILD49
3 files changed, 68 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..29e0a1fdc26
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,14 @@
+pkgbase = goxel-git
+ pkgdesc = Download accelerator written in Go (inspired by axel)
+ pkgver = r124.1b8cbbf
+ pkgrel = 1
+ url = https://github.com/m1ck43l/goxel
+ arch = x86_64
+ arch = i686
+ license = Apache
+ makedepends = go
+ source = goxel-git::git+https://github.com/m1ck43l/goxel
+ sha256sums = SKIP
+
+pkgname = goxel-git
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000000..c480da0483b
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,5 @@
+src
+pkg
+goxel-git
+*pkg.tar.xz
+tags
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..9e02c02f119
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,49 @@
+# Maintainer: Tony Lambiris <tony@criticalstack.com>
+
+pkgname=goxel-git
+pkgver=r124.1b8cbbf
+pkgrel=1
+pkgdesc="Download accelerator written in Go (inspired by axel)"
+url="https://github.com/m1ck43l/goxel"
+arch=('x86_64' 'i686')
+license=('Apache')
+makedepends=('go')
+source=("${pkgname}::git+${url}")
+sha256sums=('SKIP')
+
+pkgver() {
+ cd "${srcdir}/${pkgname}"
+
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+prepare() {
+ cd "${srcdir}/${pkgname}"
+
+ install -m755 -d "${srcdir}/go/src/github.com/m1ck43l/"
+ ln -sf "${srcdir}/${pkgname}" "${srcdir}/go/src/github.com/m1ck43l/goxel"
+
+ cd "${srcdir}/go/src/github.com/m1ck43l/goxel"
+
+ export GOPATH="${srcdir}/go"
+ go get -v ./...
+}
+
+build() {
+ cd "${srcdir}/go/src/github.com/m1ck43l/goxel"
+
+ mkdir -p build
+
+ export GOPATH="${srcdir}/go"
+ go build -ldflags "-s -w" \
+ -gcflags="all=-trimpath=${GOPATH}/src" \
+ -asmflags="all=-trimpath=${GOPATH}/src" \
+ -o build/goxel .
+}
+
+package() {
+ cd "${srcdir}/go/src/github.com/m1ck43l/goxel"
+
+ install -Dm755 "./build/goxel" "${pkgdir}/usr/bin/goxel"
+ install -Dm644 "./LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}