New package: PopCorn-0.2

This commit is contained in:
Michael Aldridge 2018-05-06 13:47:55 -07:00
parent b91839a067
commit ed4f5d5b45
6 changed files with 61 additions and 0 deletions

1
srcpkgs/PopCorn-Server Symbolic link
View file

@ -0,0 +1 @@
PopCorn/

View file

@ -0,0 +1,2 @@
SERVER=popcorn.voidlinux.org
PORT=8001

View file

@ -0,0 +1,7 @@
#!/bin/sh
[ -r ./conf ] && . ./conf
mkdir -p /etc/popcorn
chown -R _popcorn:_popcorn /etc/popcorn
exec chpst -u _popcorn:_popcorn popcorn --server $SERVER --port $PORT

View file

@ -0,0 +1,2 @@
PORT=8001
KEY=RESET_KEY

View file

@ -0,0 +1,5 @@
#!/bin/sh
[ -r ./conf ] && . ./conf
exec chpst -u _popcorn:_popcorn statrepo --port $PORT --reset_key $KEY

44
srcpkgs/PopCorn/template Normal file
View file

@ -0,0 +1,44 @@
# Template file for 'PopCorn'
pkgname=PopCorn
version=0.2
revision=1
build_style=go
go_import_path="github.com/the-maldridge/popcorn"
go_package="${go_import_path}/cmd/popcorn ${go_import_path}/cmd/popcornctl ${go_import_path}/cmd/statrepo"
hostmakedepends="dep"
short_desc="Package statistics system"
maintainer="Michael Aldridge <maldridge@VoidLinux.eu>"
license="MIT"
homepage="https://github.com/the-maldridge/PopCorn"
distfiles="https://github.com/the-maldridge/PopCorn/archive/v${version}.tar.gz"
checksum=eb5623f72a59eec7de84e625cbfb58677fc59fc7cfe0e5e52e50f9288eb9abe8
system_accounts="_popcorn"
_popcorn_homedir="/var/lib/popcorn"
make_dirs="/var/lib/popcorn 0755 _popcorn _popcorn
/etc/popcorn 0755 _popcorn _popcorn"
conf_files="/etc/sv/popcorn/conf"
pre_build() {
cd $GOSRCPATH
dep ensure
cd $wrksrc
}
post_install() {
vlicense LICENSE
vsv popcorn
vsv statrepo
}
PopCorn-Server_package() {
short_desc+=" - Server"
depends="${sourcepkg}>=${version}_${revision}"
conf_files="/etc/sv/statrepo/conf"
pkg_install() {
vmove usr/bin/statrepo
vmove usr/bin/popcornctl
vmove etc/sv/statrepo
}
}