Received: from mail-b.keymine.org (mail-b.keymine.org [95.217.10.109]) by nld3-dev1.alpinelinux.org (Postfix) with ESMTPS id D7FF578100E for ; Mon, 15 Aug 2022 09:59:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fmac.xyz; s=mail; t=1660557180; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=BdmKgineyLDyq+smRvM7J+0LxSoOd0g69kxsMi3+W8s=; b=efadAYBvM2j7Gdw27p7pUrd1SNbMnbRGhQ3j080HOjbZnU8FsX6i+sF48PsnZQ0UFzaiep VNgq4twYXa8nm0JYU8+XsWwiF6QbsfRok4f87j+me1ckqIe3Q4xPXOkpveuWBQk8TtZxiJ aAPv5hVvn+dYoAk9zR9VBRKEAw96dN3O9mLTC5yHIwCXw6xPH+uMemGWr1DGvOS1hfqnET 8hS0ifSnciBpmOwcYchsb9bPSm5SqcysifYTwceCyEcEJd2/mMtzvV+pz/22NOKJf6nlzx NfFToxtR1mm7yYEdv/lWhrk9VQmeaaBjryJJVhJiKMPAebrRjIJa8HMmhr19fA== Received: from fmac.xyz (93-41-2-13.ip79.fastwebnet.it [93.41.2.13]) by mail-b.keymine.org (OpenSMTPD) with ESMTPSA id 6306b987 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Mon, 15 Aug 2022 09:53:00 +0000 (UTC) From: Francesco Camuffo To: alpine-aports@lists.alpinelinux.org Cc: Francesco Camuffo Subject: [PATCH] testing/pasticcio: new aport Date: Mon, 15 Aug 2022 11:52:50 +0200 Message-Id: <20220815095250.149119-1-dev@fmac.xyz> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit https://sr.ht/~fmac/Pasticcio/ Pastebin with private and public collections --- testing/pasticcio/APKBUILD | 44 +++++++++++++++++++++++++ testing/pasticcio/pasticcio.initd | 12 +++++++ testing/pasticcio/pasticcio.pre-install | 6 ++++ 3 files changed, 62 insertions(+) create mode 100644 testing/pasticcio/APKBUILD create mode 100644 testing/pasticcio/pasticcio.initd create mode 100644 testing/pasticcio/pasticcio.pre-install diff --git a/testing/pasticcio/APKBUILD b/testing/pasticcio/APKBUILD new file mode 100644 index 0000000000..57d12c617b --- /dev/null +++ b/testing/pasticcio/APKBUILD @@ -0,0 +1,44 @@ +# Maintainer: Francesco Camuffo +pkgname=pasticcio +pkgver=0.1.8 +pkgrel=0 +pkgdesc="Pastebin with private and public collections" +url="https://git.sr.ht/~fmac/pasticcio" +arch="all" +license="MIT" +makedepends=" + go + minify + npm + sassc +" +install="$pkgname.pre-install" +pkgusers="$pkgname" +pkggroups="$pkgname" +options="!check" # no tests +subpackages="$pkgname-openrc" +source=" + $pkgname-$pkgver.tar.gz::https://git.sr.ht/~fmac/pasticcio/archive/v$pkgver.tar.gz + $pkgname.initd +" +builddir="$srcdir/$pkgname-v$pkgver" + +build() { + npm install + make + go build -o pasticcio cmd/server/main.go +} + +package() { + install -vDm 755 pasticcio "$pkgdir"/usr/bin/pasticcio + install -vDm 644 config.example.yaml "$pkgdir"/etc/pasticcio/config.yaml + install -vdm 755 "$pkgdir"/usr/share/webapps/$pkgname + mv web/client/public web/templates "$pkgdir"/usr/share/webapps/$pkgname/ + + install -vDm 755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname +} + +sha512sums=" +43e7eb40da90f65a153c52e2c51dcb59fe8709aa2a8d7517e86053f1ea1ddb3a34ac062a7c14a820daa273e9bf40a63956e4df528c169b5a5a3a560bc6474ba6 pasticcio-0.1.8.tar.gz +091115e5423478d89fa5bd6f0d73eb132a8d4e04316577cc4b687e675baeaa909762f55c8deb344e3d88521e7a2559dd24f7ea4d88b09d299b143f693c7abb81 pasticcio.initd +" diff --git a/testing/pasticcio/pasticcio.initd b/testing/pasticcio/pasticcio.initd new file mode 100644 index 0000000000..1459bfd74f --- /dev/null +++ b/testing/pasticcio/pasticcio.initd @@ -0,0 +1,12 @@ +#!/sbin/openrc-run + +supervisor=supervise-daemon +name=pasticcio +command="/usr/bin/pasticcio" +command_user="${PASTICCIO_USER:-pasticcio}" +pidfile="/run/pasticcio.pid" + +depend() { + need net + after firewall +} diff --git a/testing/pasticcio/pasticcio.pre-install b/testing/pasticcio/pasticcio.pre-install new file mode 100644 index 0000000000..c73d1a29f4 --- /dev/null +++ b/testing/pasticcio/pasticcio.pre-install @@ -0,0 +1,6 @@ +#!/bin/sh + +addgroup -S pasticcio 2>/dev/null +adduser -S -D -h /usr/share/webapps/pasticcio/public -s /sbin/nologin -G pasticcio -g pasticcio pasticcio 2>/dev/null + +exit 0 -- 2.34.1