summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaleb Maclennan2021-05-06 18:07:03 +0300
committerCaleb Maclennan2021-05-06 18:07:03 +0300
commite5567696fbdb1fb22a53b5425293e34ec9eeefa6 (patch)
tree028148032e80647001c244e9d3ecc26a3b9b80b8
parenta09d408c87c6777ed1491a665d8d1b779b6273e0 (diff)
downloadaur-e5567696fbdb1fb22a53b5425293e34ec9eeefa6.tar.gz
upgpkg: listmonk 0.9.0-5
Normalize configs with other packages
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD14
-rw-r--r--listmonk.install30
3 files changed, 30 insertions, 16 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 321e8ceb05ea..bcd57d915176 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = listmonk
pkgdesc = Self-hosted newsletter and mailing list manager with a modern dashboard
pkgver = 0.9.0
- pkgrel = 4
+ pkgrel = 5
url = https://listmonk.app
install = listmonk.install
arch = x86_64
diff --git a/PKGBUILD b/PKGBUILD
index 19adf59a0eee..26754b2527d7 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
pkgname=listmonk
pkgver=0.9.0
-pkgrel=4
+pkgrel=5
pkgdesc='Self-hosted newsletter and mailing list manager with a modern dashboard'
arch=(x86_64)
url=https://listmonk.app
@@ -19,7 +19,11 @@ sha256sums=('20b89ddacd0a42d8f350ef5a96c7e2d95cff82ad2ddc756ff1581cb2a7dbbcdf'
'809ede70c932183889b2fa567b340fb82cce1ada76c7b0a0b9efb82b87c92fa0')
prepare() {
- cd "$pkgname-$pkgver-beta/frontend"
+ cd "$pkgname-$pkgver-beta"
+ sed -i -e 's/^[[:space:]]\+//;s/"db"/"localhost"/;s/0.0.0.0/localhost/' \
+ -e '/password/s/"listmonk"/"<your_password>"/' \
+ config.toml.sample
+ pushd frontend
export YARN_CACHE_FOLDER="$srcdir/node_modules"
yarn install --frozen-lockfile
}
@@ -31,11 +35,11 @@ build() {
-buildmode=pie \
-mod=readonly \
-modcacherw \
- -ldflags "-extldflags '$LDFLAGS' -X 'main.buildString=Arch Linux AUR v$pkgver $pkgrel' -X 'main.versionString=v$pkgver-beta'" \
+ -ldflags "-extldflags '$LDFLAGS' -X 'main.buildString=Arch Linux AUR v$pkgver-$pkgrel' -X 'main.versionString=v$pkgver'" \
-o $pkgname \
cmd/*.go
export YARN_CACHE_FOLDER="$srcdir/node_modules"
- export VUE_APP_VERSION="v$pkgver-beta"
+ export VUE_APP_VERSION="v$pkgver"
pushd frontend
yarn build
}
@@ -48,7 +52,7 @@ check() {
package() {
cd "$pkgname-$pkgver-beta"
install -Dm755 -t "$pkgdir/usr/bin" ${pkgname%-bin}
- install -Dm644 "config.toml.sample" "$pkgdir/etc/$pkgname/config.toml"
+ install -Dm644 config.toml.sample "$pkgdir/etc/$pkgname/config.toml"
install -Dm644 -t "$pkgdir/usr/lib/systemd/system/" "../$pkgname.service"
install -Dm644 -t "$pkgdir/usr/lib/sysusers.d/" "../$pkgname.conf"
install -Dm644 -t "$pkgdir/usr/share/$pkgname/" \
diff --git a/listmonk.install b/listmonk.install
index 48743d4388a1..be3a05e2b306 100644
--- a/listmonk.install
+++ b/listmonk.install
@@ -1,29 +1,39 @@
post_install() {
cat <<- EOF
- Installed with default password. To generate a new random one:
+ WARNING: Installed with default password!
- \$ cd /tmp
- \$ listmonk --new-config
- \$ sudo mv config.toml /etc/listmonk/
+ To setup:
- Setup credentials and a database (substiting your own password!):
+ Setup PostgreSQL with credentials and a database:
\$ sudo -u postgres psql
- postgres=# CREATE USER listmonk WITH PASSWORD 'password';
+ postgres=# CREATE USER listmonk WITH PASSWORD '<your_password>';
postgres=# CREATE DATABASE listmonk;
postgres=# GRANT ALL PRIVILEGES ON DATABASE listmonk TO listmonk;
+ postgres=# \\q
- Edit with PostgreSQL database credentials, then to setup database, run:
+ Then edit /etc/listmonk/config.toml with your new database credentials.
+ Also be sure to change the admin password from the defalut.
- \$ sudo -u listmonk listmonk --config /etc/listmonk/config.toml --static-dir /usr/share/listmonk --install
+ Run manually once to setup the database tables:
+
+ \$ sudo -u listmonk listmonk --config /etc/listmonk/config.toml --install
+
+ Lastly you can enable the system service:
+
+ \$ sudo systemctl enable --now listmonk
EOF
}
post_upgrade() {
cat <<- EOF
- To update database, run
+ To update the Listmonk database format, first backup your data, then run:
+
+ \$ sudo -u listmonk listmonk --config /etc/listmonk/config.toml --upgrade
+
+ Then restart the service:
- \$ sudo -u listmonk listmonk --config /etc/listmonk/config.toml --static-dir /usr/share/listmonk --upgrade
+ \$ sudo systemctl restart listmonk
EOF
}