diff options
author | Dimitris Kiziridis | 2020-04-08 15:54:56 +0300 |
---|---|---|
committer | Dimitris Kiziridis | 2020-04-08 15:54:56 +0300 |
commit | 697c51d7bfa203588b82691842b69c641e10b2b8 (patch) | |
tree | 7e560940fea4690a61729979643ba2970e3cdf30 | |
download | aur-697c51d7bfa203588b82691842b69c641e10b2b8.tar.gz |
Initial commit
-rw-r--r-- | .SRCINFO | 15 | ||||
-rw-r--r-- | PKGBUILD | 39 |
2 files changed, 54 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..336767153fcd --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,15 @@ +pkgbase = simplehttp-git + pkgdesc = Pretty simple and lightweight http server for serving local files + pkgver = r11.ca3634f + pkgrel = 1 + url = https://github.com/snwfdhmp/simplehttp + arch = x86_64 + license = Apache-2.0 + makedepends = go + makedepends = git + provides = simplehttp + source = git+https://github.com/snwfdhmp/simplehttp + md5sums = SKIP + +pkgname = simplehttp-git + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..f8e6e71ce954 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,39 @@ +# Maintainer: Dimitris Kiziridis <ragouel at outlook dot com> + +pkgname=simplehttp-git +pkgver=r11.ca3634f +pkgrel=1 +pkgdesc="Pretty simple and lightweight http server for serving local files" +arch=('x86_64') +url='https://github.com/snwfdhmp/simplehttp' +license=('Apache-2.0') +provides=('simplehttp') +makedepends=('go' 'git') +source=("git+${url}") +md5sums=('SKIP') + +pkgver() { + cd "${srcdir}/simplehttp" + echo "r$(git rev-list --count HEAD).$(git rev-parse --short HEAD)" +} + +prepare() { + cd "${srcdir}/simplehttp" + mkdir -p $srcdir/go + export GOPATH="${srcdir}"/go + export PATH=$PATH:$GOPATH/bin + go get -d -v ./... +} + +build() { + export GOPATH="${srcdir}"/go + export PATH=$PATH:$GOPATH/bin + cd "${srcdir}/simplehttp" + go build -v -o "${srcdir}/simplehttp-bin" +} + +package() { + cd "${srcdir}/simplehttp" + install -Dm755 "${srcdir}"/simplehttp-bin "${pkgdir}/usr/bin/simplehttp" + go clean -modcache #Remove go libraries +}
\ No newline at end of file |