From 03f23200b09c208bbe2bf986a7c18156a808bba5 Mon Sep 17 00:00:00 2001 From: Michael Aldridge Date: Sat, 19 May 2018 23:35:58 -0700 Subject: [PATCH] PopCorn: update to 0.3. --- srcpkgs/PopCorn/files/pqueryd/conf | 2 ++ srcpkgs/PopCorn/files/pqueryd/run | 5 +++++ srcpkgs/PopCorn/template | 17 ++++++++++++----- 3 files changed, 19 insertions(+), 5 deletions(-) create mode 100644 srcpkgs/PopCorn/files/pqueryd/conf create mode 100644 srcpkgs/PopCorn/files/pqueryd/run diff --git a/srcpkgs/PopCorn/files/pqueryd/conf b/srcpkgs/PopCorn/files/pqueryd/conf new file mode 100644 index 00000000000..0f04bde90be --- /dev/null +++ b/srcpkgs/PopCorn/files/pqueryd/conf @@ -0,0 +1,2 @@ +PORT=8002 +DATA_DIR=/srv/www/popcorn/ diff --git a/srcpkgs/PopCorn/files/pqueryd/run b/srcpkgs/PopCorn/files/pqueryd/run new file mode 100644 index 00000000000..876bd1b8064 --- /dev/null +++ b/srcpkgs/PopCorn/files/pqueryd/run @@ -0,0 +1,5 @@ +#!/bin/sh + +[ -r ./conf ] && . ./conf + +exec chpst -u _popcorn:_popcorn pqueryd --checkpoint_enabled=false --port $PORT --data_dir $DATA_DIR diff --git a/srcpkgs/PopCorn/template b/srcpkgs/PopCorn/template index 928fac3b8a8..7b7f7617867 100644 --- a/srcpkgs/PopCorn/template +++ b/srcpkgs/PopCorn/template @@ -1,10 +1,13 @@ # Template file for 'PopCorn' pkgname=PopCorn -version=0.2.1 -revision=2 +version=0.3 +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" +go_package="${go_import_path}/cmd/popcorn + ${go_import_path}/cmd/popcornctl + ${go_import_path}/cmd/statrepo + ${go_import_path}/cmd/pqueryd" hostmakedepends="dep" depends="snooze" short_desc="Package statistics system" @@ -12,7 +15,7 @@ maintainer="Michael Aldridge " license="MIT" homepage="https://github.com/the-maldridge/PopCorn" distfiles="https://github.com/the-maldridge/PopCorn/archive/v${version}.tar.gz" -checksum=9ce2ade5ebae5bb31443423b41ab5d6355a2ac3d65cba1d36c3a5616f323a4a9 +checksum=5e61970c3ba5fd83f6b5b86c30264213461f4a5af8aacd2ba1757333ece05260 system_accounts="_popcorn" _popcorn_homedir="/var/lib/popcorn" @@ -30,16 +33,20 @@ post_install() { vlicense LICENSE vsv popcorn vsv statrepo + vsv pqueryd } PopCorn-Server_package() { short_desc+=" - Server" depends="${sourcepkg}>=${version}_${revision}" - conf_files="/etc/sv/statrepo/conf" + conf_files="/etc/sv/statrepo/conf + /etc/sv/pqueryd/conf" pkg_install() { vmove usr/bin/statrepo vmove usr/bin/popcornctl + vmove usr/bin/pqueryd vmove etc/sv/statrepo + vmove etc/sv/pqueryd } }