New package: PopCorn-0.2
This commit is contained in:
parent
b91839a067
commit
ed4f5d5b45
6 changed files with 61 additions and 0 deletions
1
srcpkgs/PopCorn-Server
Symbolic link
1
srcpkgs/PopCorn-Server
Symbolic link
|
@ -0,0 +1 @@
|
|||
PopCorn/
|
2
srcpkgs/PopCorn/files/popcorn/conf
Normal file
2
srcpkgs/PopCorn/files/popcorn/conf
Normal file
|
@ -0,0 +1,2 @@
|
|||
SERVER=popcorn.voidlinux.org
|
||||
PORT=8001
|
7
srcpkgs/PopCorn/files/popcorn/run
Executable file
7
srcpkgs/PopCorn/files/popcorn/run
Executable 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
|
2
srcpkgs/PopCorn/files/statrepo/conf
Normal file
2
srcpkgs/PopCorn/files/statrepo/conf
Normal file
|
@ -0,0 +1,2 @@
|
|||
PORT=8001
|
||||
KEY=RESET_KEY
|
5
srcpkgs/PopCorn/files/statrepo/run
Executable file
5
srcpkgs/PopCorn/files/statrepo/run
Executable 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
44
srcpkgs/PopCorn/template
Normal 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
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue