summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMikuro Kagamine2018-07-22 19:29:52 +1000
committerMikuro Kagamine2018-07-22 19:29:52 +1000
commitdc62b050caac73cbca05a899abefbfb2f2fffdcb (patch)
treea52fde127f31eb2f20e5a064a2f27e093d3a354d
downloadaur-dc62b050caac73cbca05a899abefbfb2f2fffdcb.tar.gz
3.0.6
-rw-r--r--.SRCINFO16
-rw-r--r--PKGBUILD40
2 files changed, 56 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..2b4a4f66e212
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,16 @@
+pkgbase = croc
+ pkgdesc = Easily and securely send things from one computer to another.
+ pkgver = 3.0.6
+ pkgrel = 1
+ url = https://github.com/schollz/croc
+ arch = x86_64
+ license = MIT
+ makedepends = go
+ provides = croc
+ conflicts = croc-bin
+ conflicts = croc-git
+ source = https://github.com/schollz/croc/archive/v3.0.6.tar.gz
+ sha512sums = 2166fbbb3f1bfccc9de7d12ddf90eadb238a1efab70209fecaea1a558799b3d89d0be1e09aad7d4bc946a357926dc71545b75f3dda681838cefdebeb4f0dc14c
+
+pkgname = croc
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..6715ffd2182d
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,40 @@
+# Maintainer: Mikuro Kagamine <mikurok@forgecrushing.com>
+
+_gonamespc='github.com/schollz/croc'
+pkgname=croc
+pkgver=3.0.6
+pkgrel=1
+pkgdesc="Easily and securely send things from one computer to another."
+arch=('x86_64')
+url="https://${_gonamespc}"
+license=('MIT')
+#depends=()
+makedepends=('go')
+provides=('croc')
+conflicts=('croc-bin' 'croc-git')
+#options=()
+source=("${url}/archive/v${pkgver}.tar.gz")
+sha512sums=('2166fbbb3f1bfccc9de7d12ddf90eadb238a1efab70209fecaea1a558799b3d89d0be1e09aad7d4bc946a357926dc71545b75f3dda681838cefdebeb4f0dc14c')
+
+prepare() {
+ if [ ! $(wc -w <<< $srcdir) == 1 ]; then echo srcdir can\'t contain spaces because of trimpath; return 1; fi
+ export GOPATH="${srcdir}/.gopath"
+ export GOBIN="${srcdir}/.gopath/bin"
+ mkdir -p "${GOPATH}/src/${_gonamespc%/*}"
+ if [ -e "${GOPATH}/src/${_gonamespc}" ]; then rm -r "${GOPATH}/src/${_gonamespc}"; fi
+ mv "${srcdir}/${pkgname}-${pkgver}" "${GOPATH}/src/${_gonamespc}"
+ go get -d -t -v $_gonamespc
+}
+
+build() {
+ go clean -i -x $_gonamespc
+ go build -x -ldflags "-X main.version=${pkgver}" -gcflags "all=-trimpath=${srcdir}" $_gonamespc
+}
+
+check() {
+ go test $_gonamespc
+}
+
+package() {
+ install -Dm755 "${srcdir}/${pkgname}" "${pkgdir}/usr/bin/${pkgname}"
+}