diff options
author | Gabriel Arakaki Giovanini <mail@gabrielgio.me> | 2023-01-24 22:08:57 +0100 |
---|---|---|
committer | Gabriel Arakaki Giovanini <mail@gabrielgio.me> | 2023-01-24 22:08:57 +0100 |
commit | e481d980ad7c9f9e6985e9178ea709dbeab8a805 (patch) | |
tree | 1e97ec9298c864ae9c5989bf0efffd5af8048fd9 | |
parent | 1b1036f1353d2625bdebe1aacc327210dea401a4 (diff) | |
download | apkbuilds-e481d980ad7c9f9e6985e9178ea709dbeab8a805.tar.gz apkbuilds-e481d980ad7c9f9e6985e9178ea709dbeab8a805.tar.bz2 apkbuilds-e481d980ad7c9f9e6985e9178ea709dbeab8a805.zip |
chore: Remove jellyfin and add alps
-rw-r--r-- | apks/alps/APKBUILD | 45 | ||||
-rw-r--r-- | apks/alps/alps.confd | 11 | ||||
-rw-r--r-- | apks/alps/alps.initd | 23 | ||||
-rw-r--r-- | apks/alps/alps.pre-install | 6 | ||||
-rw-r--r-- | apks/alps/fix-statics-dir.patch | 26 | ||||
-rw-r--r-- | apks/jellyfin-web/APKBUILD | 28 | ||||
-rw-r--r-- | apks/jellyfin-web/jellyfin-web.post-install | 6 | ||||
-rw-r--r-- | apks/jellyfin/APKBUILD | 63 | ||||
-rw-r--r-- | apks/jellyfin/jellyfin.confd | 5 | ||||
-rw-r--r-- | apks/jellyfin/jellyfin.initd | 20 | ||||
-rw-r--r-- | apks/jellyfin/jellyfin.pre-install | 9 |
11 files changed, 111 insertions, 131 deletions
diff --git a/apks/alps/APKBUILD b/apks/alps/APKBUILD new file mode 100644 index 0000000..e7bab57 --- /dev/null +++ b/apks/alps/APKBUILD @@ -0,0 +1,45 @@ +# Contributor: Patrycja Rosa <alpine@ptrcnull.me> +# Maintainer: Patrycja Rosa <alpine@ptrcnull.me> +pkgname=alps +pkgver=0_git20221018 +pkgrel=0 +_commit=f01fbcbc48db5e65d69a0ebd9d7cb0deb378cf13 +pkgdesc="Simple and extensible webmail" +url="https://sr.ht/~migadu/alps/" +arch="all" +license="MIT" +makedepends="go" +install="$pkgname.pre-install" +subpackages="$pkgname-openrc" +source="$pkgname-$_commit.tar.gz::https://git.sr.ht/~migadu/alps/archive/$_commit.tar.gz + fix-statics-dir.patch + + alps.confd + alps.initd + " +builddir="$srcdir/alps-$_commit" +options="!check net" # no tests in upstream + +build() { + go build -o alps ./cmd/alps +} + +package() { + install -Dm755 alps "$pkgdir"/usr/bin/alps + + install -dm755 "$pkgdir"/var/lib/alps + cp -r themes "$pkgdir"/var/lib/alps + for asset in plugins/*/public/*.html plugins/*/public/**/*; do + install -Dm644 "$asset" "$pkgdir"/var/lib/alps/"$asset" + done + + install -Dm755 "$srcdir"/alps.initd "$pkgdir"/etc/init.d/alps + install -Dm644 "$srcdir"/alps.confd "$pkgdir"/etc/conf.d/alps +} + +sha512sums=" +682a8dc80f5812a033c57eb91f17a3e2da7320a642a04f08abda2baeb93a69528c446323d089773061f6a6b91dcda7e4dfa0885285532d310bdcc1565d6d3e81 alps-f01fbcbc48db5e65d69a0ebd9d7cb0deb378cf13.tar.gz +789b4cae9b2c4acb5b05288c4f9858de1b5cfda87bc96c40505e9447ec9ad39fdabbd5af0c65007c51a5f3a425602ea7a81d3f6c62894dddf6790fe26793755c fix-statics-dir.patch +61c1b05851ae05fbf51cb8eb060c5677de7145a07dac3a194a3f7513b2ff3bf5f3792a749d1a2eef09fc6378f2fbf2021cc49dffe652f51230120c40a7062b6c alps.confd +6e109577d662ce61d2b753e5b82237827646f10d0af02b10b3f184a10bb747c3c8303e7d20a5cc2b7c31ac4a6f3aef62290c068868e647c9b1ce711dfb6e025a alps.initd +" diff --git a/apks/alps/alps.confd b/apks/alps/alps.confd new file mode 100644 index 0000000..cd61010 --- /dev/null +++ b/apks/alps/alps.confd @@ -0,0 +1,11 @@ +# Configuration for /etc/init.d/alps + +# space-separated list of imap/smtp servers +servers="imap://localhost" + +theme="alps" +listen_address=":1323" +command_user="alps:alps" + +# comment this out for old style service management +supervisor=supervise-daemon diff --git a/apks/alps/alps.initd b/apks/alps/alps.initd new file mode 100644 index 0000000..307c6e3 --- /dev/null +++ b/apks/alps/alps.initd @@ -0,0 +1,23 @@ +#!/sbin/openrc-run + +name="alps webmail server" + +command="/usr/bin/alps" +command_args="${listen_address:+-addr $listen_address} ${theme:+-theme $theme} $servers" +: ${command_user:="alps:alps"} +command_background=yes +directory="/var/lib/alps" +pidfile="/run/alps.pid" + +output_log="/var/log/alps.log" +error_log="/var/log/alps.log" + +depend() { + need net + after firewall +} + +start_pre() { + checkpath -d -m 755 -o "$command_user" /var/lib/alps + checkpath -f -m 644 -o "$command_user" /var/log/alps.log +} diff --git a/apks/alps/alps.pre-install b/apks/alps/alps.pre-install new file mode 100644 index 0000000..176a801 --- /dev/null +++ b/apks/alps/alps.pre-install @@ -0,0 +1,6 @@ +#!/bin/sh + +addgroup -S alps +adduser -S -D -H -h /var/lib/alps -s /sbin/nologin -G alps -g alps alps + +exit 0 diff --git a/apks/alps/fix-statics-dir.patch b/apks/alps/fix-statics-dir.patch new file mode 100644 index 0000000..72eaffa --- /dev/null +++ b/apks/alps/fix-statics-dir.patch @@ -0,0 +1,26 @@ +diff --git a/cmd/alps/main.go b/cmd/alps/main.go +index 5a00957..f537177 100644 +--- a/cmd/alps/main.go ++++ b/cmd/alps/main.go +@@ -23,7 +23,7 @@ import ( + _ "git.sr.ht/~migadu/alps/plugins/viewtext" + ) + +-var themesPath = "./themes" ++var themesPath = "/var/lib/alps/themes" + + func main() { + var ( +diff --git a/plugin.go b/plugin.go +index e634f02..43b8164 100644 +--- a/plugin.go ++++ b/plugin.go +@@ -7,7 +7,7 @@ import ( + ) + + // PluginDir is the path to the plugins directory. +-const PluginDir = "plugins" ++const PluginDir = "/var/lib/alps/plugins" + + // Plugin extends alps with additional functionality. + type Plugin interface { diff --git a/apks/jellyfin-web/APKBUILD b/apks/jellyfin-web/APKBUILD deleted file mode 100644 index 5781b3e..0000000 --- a/apks/jellyfin-web/APKBUILD +++ /dev/null @@ -1,28 +0,0 @@ -# Maintainer: Simon Zeni <simon@bl4ckb0ne.ca> -pkgname=jellyfin-web -pkgver=10.8.8 -pkgrel=0 -pkgdesc="Web Client for Jellyfin" -url="https://jellyfin.org/" -# armv7: oom -arch="x86_64" -options="!check net" # no tests -license="GPL-2.0-only" -install="$pkgname.post-install" -depends="jellyfin" -makedepends="npm" -source="$pkgname-$pkgver.tar.gz::https://github.com/jellyfin/jellyfin-web/archive/refs/tags/v$pkgver.tar.gz" - -build() { - npm ci --no-audit -} - -package() { - mkdir -p "$pkgdir"/usr/lib/jellyfin/jellyfin-web - - cp -r "$builddir"/dist/* "$pkgdir"/usr/lib/jellyfin/jellyfin-web -} - -sha512sums=" -88a829248f1d2506509a3610cc67575899df4fcb371fdd766b4a91f2005f387055ac716047293882cc494e2894f4121049c9525f468a33c99a12ff5d0c87fb19 jellyfin-web-10.8.8.tar.gz -" diff --git a/apks/jellyfin-web/jellyfin-web.post-install b/apks/jellyfin-web/jellyfin-web.post-install deleted file mode 100644 index a6e6942..0000000 --- a/apks/jellyfin-web/jellyfin-web.post-install +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh - -printf " *\n * The default jellyfin configuration does not enable the web ui.\n" -printf " * Remove the '--nowebclient' option from /etc/conf.d/jellyfin to enable it.\n *\n" - -exit 0 diff --git a/apks/jellyfin/APKBUILD b/apks/jellyfin/APKBUILD deleted file mode 100644 index d2eb212..0000000 --- a/apks/jellyfin/APKBUILD +++ /dev/null @@ -1,63 +0,0 @@ -# Maintainer: Simon Zeni <simon@bl4ckb0ne.ca> -pkgname=jellyfin -pkgver=10.8.8 -pkgrel=0 -pkgdesc="The Free Software Media System" -pkgusers="$pkgname" -pkggroups="$pkgname" -install="$pkgname.pre-install" -url="https://jellyfin.org/" -arch="x86_64" -license="GPL-2.0-only" -makedepends="dotnet6-sdk" -depends="aspnetcore6-runtime ffmpeg" -subpackages="$pkgname-openrc" -source="$pkgname-$pkgver.tar.gz::https://github.com/jellyfin/jellyfin/archive/refs/tags/v$pkgver.tar.gz - $pkgname.initd - $pkgname.confd" - -case $CARCH in - x86_64) _dotnet_arch=x64;; - aarch64) _dotnet_arch=arm64;; - armv7|armhf) _dotnet_arch=arm;; -esac - -# parses RID from /etc/os-release depending on if edge or production release -# to set _runtime_id -# shellcheck disable=SC2034 -. /etc/os-release -[ -n "${VERSION_ID//[^_]}" ] && _runtime_id="alpine.${VERSION_ID%_*}-$_dotnet_arch" || _runtime_id="alpine.${VERSION_ID%.*}-$_dotnet_arch" - -build() { - dotnet build --configuration Release Jellyfin.Server --no-self-contained --runtime $_runtime_id - dotnet publish --configuration Release Jellyfin.Server --no-self-contained --output publish --runtime $_runtime_id -} - -check() { - # check on aarch64 is broken for dotnet6-sdk v6.0.1xx due to - # https://github.com/microsoft/vstest/issues/2566 - if [ "$CARCH" = "aarch64" ]; then - return - fi - - dotnet test --runtime $_runtime_id -} - -package() { - mkdir -p "$pkgdir"/usr/lib - cp -dr publish "$pkgdir"/usr/lib/jellyfin - - mkdir -p "$pkgdir"/usr/bin - ln -s /usr/lib/jellyfin/jellyfin "$pkgdir"/usr/bin/jellyfin - - install -Dm755 "$srcdir"/$pkgname.initd \ - "$pkgdir"/etc/init.d/$pkgname - install -Dm644 "$srcdir"/$pkgname.confd \ - "$pkgdir"/etc/conf.d/$pkgname -} - -sha512sums=" -1866a8e6a730d2d2211a907aa9087c8bc7069ef53010ba652f1dbbe2c6c638a29259531e31ccf5bee797651999ec0963b2ff3588e791f3b523e43bf4a3556070 jellyfin-10.8.8.tar.gz -364a70a953d921048a249fd370642c1782e434c850334cd55e35bbb10d1bb93482d37faa1c11da5d7acba96a084d9832e5db212b65b0fa9907c7d3afe553aaf9 jellyfin.initd -d35eb07d11d711b8ad35c7726e151a8096609712fee3bfea00c9adeff8e56660e3cde3d9b0b2dc8a847514af4d2b32340e2b29b77facfab4f8921ba15ba671b0 jellyfin.confd -" diff --git a/apks/jellyfin/jellyfin.confd b/apks/jellyfin/jellyfin.confd deleted file mode 100644 index 6cd891c..0000000 --- a/apks/jellyfin/jellyfin.confd +++ /dev/null @@ -1,5 +0,0 @@ -supervisor=supervise-daemon -datadir="/var/lib/jellyfin" -cachedir="/var/cache/jellyfin" -logdir="/var/log/jellyfin" -opts="--nowebclient" diff --git a/apks/jellyfin/jellyfin.initd b/apks/jellyfin/jellyfin.initd deleted file mode 100644 index 278d79d..0000000 --- a/apks/jellyfin/jellyfin.initd +++ /dev/null @@ -1,20 +0,0 @@ -#!/sbin/openrc-run - -name=jellyfin -description="The Free Software Media System" - -command=/usr/bin/jellyfin -command_user=jellyfin:jellyfin -command_args="--datadir ${datadir} --cachedir ${cachedir} --logdir ${logdir} ${opts}" - -depend() { - use logger dns - need net - after firewall -} - -start_pre() { - checkpath -d -o $command_user "$datadir" - checkpath -d -o $command_user "$cachedir" - checkpath -d -o $command_user "$logdir" -} diff --git a/apks/jellyfin/jellyfin.pre-install b/apks/jellyfin/jellyfin.pre-install deleted file mode 100644 index 6e64716..0000000 --- a/apks/jellyfin/jellyfin.pre-install +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -user=jellyfin -group=jellyfin - -addgroup -S $group 2>/dev/null -adduser -S -D -h /var/lib/$user -s /sbin/nologin -G $group -g $user $user 2>/dev/null - -exit 0 |