72 lines
2.3 KiB
Text
72 lines
2.3 KiB
Text
|
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
||
|
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||
|
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
|
||
|
"
|