public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Aisha Tammy" <gentoo@aisha.cc>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/proj/guru:dev commit in: net-misc/purritobin/files/, net-misc/purritobin/
Date: Mon, 11 Jan 2021 16:30:48 +0000 (UTC)	[thread overview]
Message-ID: <1610382634.d0d685768daab8011c44f8675b7978d4474ef312.epsilon-0@gentoo> (raw)

commit:     d0d685768daab8011c44f8675b7978d4474ef312
Author:     Aisha Tammy <gentoo <AT> aisha <DOT> cc>
AuthorDate: Mon Jan 11 16:07:35 2021 +0000
Commit:     Aisha Tammy <gentoo <AT> aisha <DOT> cc>
CommitDate: Mon Jan 11 16:30:34 2021 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=d0d68576

net-misc/purritobin: add init file

Package-Manager: Portage-3.0.12, Repoman-3.0.2
Signed-off-by: Aisha Tammy <gentoo <AT> aisha.cc>

 net-misc/purritobin/files/purritobin.initd              | 16 ++++++++++++++++
 net-misc/purritobin/files/purritobin.service            | 17 +++++++++++++++++
 ...rritobin-0.3.3.ebuild => purritobin-0.3.3-r1.ebuild} | 15 ++++++++++++---
 net-misc/purritobin/purritobin-9999.ebuild              | 15 ++++++++++++---
 4 files changed, 57 insertions(+), 6 deletions(-)

diff --git a/net-misc/purritobin/files/purritobin.initd b/net-misc/purritobin/files/purritobin.initd
new file mode 100644
index 00000000..8c070466
--- /dev/null
+++ b/net-misc/purritobin/files/purritobin.initd
@@ -0,0 +1,16 @@
+#!/sbin/openrc-run
+# Copyright 2020-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+name="PurritoBin"
+description="ultra fast, minimalistic command line paste-bin"
+
+command="/usr/bin/purrito"
+command_background=true
+command_args="${ARGS:- -d /var/www/purritobin/}"
+pidfile="/run/${RC_SVCNAME}.pid"
+command_user="purritobin:purritobin"
+
+depend() {
+        need net
+}

diff --git a/net-misc/purritobin/files/purritobin.service b/net-misc/purritobin/files/purritobin.service
new file mode 100644
index 00000000..1a55dbcd
--- /dev/null
+++ b/net-misc/purritobin/files/purritobin.service
@@ -0,0 +1,17 @@
+[Unit]
+Description=PurritoBin
+After=network.target
+
+[Service]
+SyslogIdentifier=purritobin
+Restart=always
+RestartSec=5
+Type=simple
+User=purritobin
+Group=purritobin
+WorkingDirectory=/var/www/purritobin
+ExecStart=/usr/bin/purritobin
+TimeoutStopSec=30
+
+[Install]
+WantedBy=multi-user.target

diff --git a/net-misc/purritobin/purritobin-0.3.3.ebuild b/net-misc/purritobin/purritobin-0.3.3-r1.ebuild
similarity index 63%
rename from net-misc/purritobin/purritobin-0.3.3.ebuild
rename to net-misc/purritobin/purritobin-0.3.3-r1.ebuild
index 37179319..fd9c6136 100644
--- a/net-misc/purritobin/purritobin-0.3.3.ebuild
+++ b/net-misc/purritobin/purritobin-0.3.3-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2019-2020 Gentoo Authors
+# Copyright 2019-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -6,7 +6,7 @@ EAPI=7
 DESCRIPTION="minimalistic commandline pastebin"
 HOMEPAGE="https://bsd.ac"
 
-inherit toolchain-funcs
+inherit systemd toolchain-funcs
 
 if [[ ${PV} == 9999 ]]; then
 	inherit git-r3
@@ -20,7 +20,11 @@ fi
 LICENSE="ISC"
 SLOT="0"
 
-RDEPEND="net-libs/usockets[ssl]"
+RDEPEND="
+	net-libs/usockets[ssl]
+	acct-user/purritobin
+	acct-group/purritobin
+"
 DEPEND="${RDEPEND}
 	www-apps/uwebsockets
 "
@@ -32,5 +36,10 @@ src_configure() {
 
 src_install() {
 	emake PREFIX="/usr" MANDIR="/usr/share/man" DESTDIR="${ED}" install
+	insinto /var/www/purritobin
+	doins frontend/paste.html
+	fowners purritobin:purritobin /var/www/purritobin
+	newinitd "${FILESDIR}"/purritobin.initd purritobin
+	systemd_dounit "${FILESDIR}"/purritobin.service
 	einstalldocs
 }

diff --git a/net-misc/purritobin/purritobin-9999.ebuild b/net-misc/purritobin/purritobin-9999.ebuild
index 37179319..fd9c6136 100644
--- a/net-misc/purritobin/purritobin-9999.ebuild
+++ b/net-misc/purritobin/purritobin-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2019-2020 Gentoo Authors
+# Copyright 2019-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -6,7 +6,7 @@ EAPI=7
 DESCRIPTION="minimalistic commandline pastebin"
 HOMEPAGE="https://bsd.ac"
 
-inherit toolchain-funcs
+inherit systemd toolchain-funcs
 
 if [[ ${PV} == 9999 ]]; then
 	inherit git-r3
@@ -20,7 +20,11 @@ fi
 LICENSE="ISC"
 SLOT="0"
 
-RDEPEND="net-libs/usockets[ssl]"
+RDEPEND="
+	net-libs/usockets[ssl]
+	acct-user/purritobin
+	acct-group/purritobin
+"
 DEPEND="${RDEPEND}
 	www-apps/uwebsockets
 "
@@ -32,5 +36,10 @@ src_configure() {
 
 src_install() {
 	emake PREFIX="/usr" MANDIR="/usr/share/man" DESTDIR="${ED}" install
+	insinto /var/www/purritobin
+	doins frontend/paste.html
+	fowners purritobin:purritobin /var/www/purritobin
+	newinitd "${FILESDIR}"/purritobin.initd purritobin
+	systemd_dounit "${FILESDIR}"/purritobin.service
 	einstalldocs
 }


             reply	other threads:[~2021-01-11 16:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-11 16:30 Aisha Tammy [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-01-12 18:25 [gentoo-commits] repo/proj/guru:dev commit in: net-misc/purritobin/files/, net-misc/purritobin/ Aisha Tammy
2021-02-11 19:01 Aisha Tammy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1610382634.d0d685768daab8011c44f8675b7978d4474ef312.epsilon-0@gentoo \
    --to=gentoo@aisha.cc \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox