From bc63f1ddb8504a0e147824ca012e7f32f3e4ef58 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Fri, 9 Aug 2024 22:32:29 -0400 Subject: [PATCH] user/listmonk: drop due migration to ilot iports --- user/listmonk/APKBUILD | 71 ----------------------------- user/listmonk/listmonk.openrc | 29 ------------ user/listmonk/listmonk.post-install | 27 ----------- user/listmonk/listmonk.post-upgrade | 1 - user/listmonk/listmonk.pre-install | 21 --------- user/listmonk/listmonk.sh | 12 ----- 6 files changed, 161 deletions(-) delete mode 100644 user/listmonk/APKBUILD delete mode 100644 user/listmonk/listmonk.openrc delete mode 100644 user/listmonk/listmonk.post-install delete mode 120000 user/listmonk/listmonk.post-upgrade delete mode 100644 user/listmonk/listmonk.pre-install delete mode 100644 user/listmonk/listmonk.sh diff --git a/user/listmonk/APKBUILD b/user/listmonk/APKBUILD deleted file mode 100644 index 00951f0..0000000 --- a/user/listmonk/APKBUILD +++ /dev/null @@ -1,71 +0,0 @@ -# Contributor: Antoine Martin (ayakael) -# Maintainer: Antoine Martin (ayakael) -pkgname=listmonk -pkgver=3.0.0 -pkgrel=0 -pkgdesc='Self-hosted newsletter and mailing list manager with a modern dashboard' -arch="all" -url=https://listmonk.app -license="AGPL3" -depends=" - libcap-setcap - postgresql - procps - " -makedepends="go npm nodejs yarn" -source=" - $pkgname-$pkgver.tar.gz::https://github.com/knadh/listmonk/archive/v$pkgver.tar.gz - listmonk.sh - listmonk.openrc - " -install="$pkgname.pre-install $pkgname.post-install $pkgname.post-upgrade" -subpackages="$pkgname-openrc" -pkgusers="listmonk" -pkggroups="listmonk" - -build() { - go build \ - -trimpath \ - -buildmode=pie \ - -mod=readonly \ - -modcacherw \ - -ldflags "-extldflags '$LDFLAGS' -X 'main.buildString=Alpine Linux v$pkgver-$pkgrel' -X 'main.versionString=v$pkgver'" \ - -o $pkgname \ - cmd/*.go - - ( - cd frontend - export YARN_CACHE_FOLDER="$srcdir/node_modules" - export VUE_APP_VERSION="v$pkgver" - yarn install --frozen-lockfile - yarn build - ) -} - -check() { - go test ./... -} - -package() { - install -Dm755 "$srcdir"/listmonk.sh "$pkgdir"/usr/bin/listmonk - install -Dm644 config.toml.sample "$pkgdir"/etc/listmonk/config.toml - install -Dm644 -t "$pkgdir"/usr/share/webapps/listmonk/ \ - schema.sql \ - queries.sql \ - config.toml.sample - install -Dm755 listmonk "$pkgdir"/usr/share/webapps/listmonk/ - install -Dm644 -t "$pkgdir"/usr/share/webapps/listmonk/frontend/dist/ \ - frontend/dist/static/favicon.png - cp -a frontend/dist/static "$pkgdir"/usr/share/webapps/listmonk/frontend/dist/static - cp -a frontend/dist/index.html "$pkgdir"/usr/share/webapps/listmonk/frontend/dist/index.html - cp -a static "$pkgdir"/usr/share/webapps/listmonk/ - cp -a i18n "$pkgdir"/usr/share/webapps/listmonk/ - install -Dm755 "$srcdir"/$pkgname.openrc \ - "$pkgdir"/etc/init.d/$pkgname - ln -s /etc/listmonk/config.toml "$pkgdir"/usr/share/webapps/listmonk/config.toml -} -sha512sums=" -afd0ea1d4d2b2753c3043526590cf09c45a541a2d818f5d1581644ffd10818326fd553a3b04bca59494860a7bb6e96364b08afd33d337a9fc5c71bedd1a5ee6c listmonk-3.0.0.tar.gz -939450af4b23708e3d23a5a88fad4c24b957090bdd21351a6dd520959e52e45e5fcac117a3eafa280d9506616dae39ad3943589571f008cac5abe1ffd8062424 listmonk.sh -8e9c0b1f335c295fb741418246eb17c7566e5e4200a284c6483433e8ddbf5250aa692435211cf062ad1dfcdce3fae9148def28f03f2492d33fe5e66cbeebd4bd listmonk.openrc -" diff --git a/user/listmonk/listmonk.openrc b/user/listmonk/listmonk.openrc deleted file mode 100644 index e2ccb5b..0000000 --- a/user/listmonk/listmonk.openrc +++ /dev/null @@ -1,29 +0,0 @@ -#!/sbin/openrc-run - -name="$RC_SVCNAME" -cfgfile="/etc/conf.d/$RC_SVCNAME.conf" -pidfile="/run/$RC_SVCNAME.pid" -working_directory="/usr/share/webapps/listmonk" -command="/usr/share/webapps/listmonk/listmonk" -command_user="listmonk" -command_group="listmonk" -start_stop_daemon_args="" -command_background="yes" -output_log="/var/log/listmonk/$RC_SVCNAME.log" -error_log="/var/log/listmonk/$RC_SVCNAME.err" - -depend() { - need postgresql -} - -start_pre() { - cd "$working_directory" - checkpath --directory --owner $command_user:$command_group --mode 0775 \ - /var/log/listmonk \ - /var/lib/listmonk -} - -stop_pre() { - ebegin "Killing child processes" - kill $(ps -o pid= --ppid $(cat $pidfile)) || true -} diff --git a/user/listmonk/listmonk.post-install b/user/listmonk/listmonk.post-install deleted file mode 100644 index fe3cc8d..0000000 --- a/user/listmonk/listmonk.post-install +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/sh -set -eu - -setcap 'cap_net_bind_service=+ep' /usr/share/webapps/listmonk/listmonk - -if [ "${0##*.}" = 'post-upgrade' ]; then - cat >&2 <<-EOF - * - * To finish Listmonk upgrade run: - * - * listmonk --upgrade - * - EOF -else - cat >&2 <<-EOF - * - * 1. Adjust settings in /etc/listmonk/config.toml. - * - * 2. Create database for Listmonk: - * - * psql -c "CREATE ROLE listmonk PASSWORD 'top-secret' INHERIT LOGIN;" - * psql -c "CREATE DATABASE listmonk OWNER listmonk ENCODING 'UTF-8';" - * - * 3. Run "listmonk --install" - * - EOF -fi diff --git a/user/listmonk/listmonk.post-upgrade b/user/listmonk/listmonk.post-upgrade deleted file mode 120000 index 0b729b1..0000000 --- a/user/listmonk/listmonk.post-upgrade +++ /dev/null @@ -1 +0,0 @@ -listmonk.post-install \ No newline at end of file diff --git a/user/listmonk/listmonk.pre-install b/user/listmonk/listmonk.pre-install deleted file mode 100644 index 71eb3a0..0000000 --- a/user/listmonk/listmonk.pre-install +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -# It's very important to set user/group correctly. - -listmonk_dir='/var/lib/listmonk' - -if ! getent group listmonk 1>/dev/null; then - echo '* Creating group listmonk' 1>&2 - - addgroup -S listmonk -fi - -if ! id listmonk 2>/dev/null 1>&2; then - echo '* Creating user listmonk' 1>&2 - - adduser -DHS -G listmonk -h "$listmonk_dir" -s /bin/sh \ - -g "added by apk for listmonk" listmonk - passwd -u listmonk 1>/dev/null # unlock -fi - - -exit 0 diff --git a/user/listmonk/listmonk.sh b/user/listmonk/listmonk.sh deleted file mode 100644 index d89ca52..0000000 --- a/user/listmonk/listmonk.sh +++ /dev/null @@ -1,12 +0,0 @@ - -#!/bin/sh - -BUNDLE_DIR='/usr/share/webapps/listmonk' - -cd $BUNDLE_DIR - -if [ "$(id -un)" != 'listmonk' ]; then - exec su listmonk -c '"$0" "$@"' -- ./listmonk "$@" -else - exec ./listmonk "$@" -fi