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 /PKGBUILD | |
download | aur-697c51d7bfa203588b82691842b69c641e10b2b8.tar.gz |
Initial commit
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 39 |
1 files changed, 39 insertions, 0 deletions
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 |