blob: 1e3676f26a82f516c2dd1b8200638e03df958111 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
# Maintainer: Keiran <keircn@proton.me>
pkgname=seanime
pkgver=3.10.4
pkgrel=1
pkgdesc="A self-hosted media server for anime with anilist integration"
arch=(x86_64)
url="https://github.com/5rahim/seanime"
license=('MIT')
conflicts=(seanime-bin)
depends=('systemd')
makedepends=('go' 'npm' 'nodejs')
source=(https://github.com/5rahim/seanime/archive/refs/tags/v${pkgver}.tar.gz)
sha256sums=('df7d83ae203c199d16dbc362bfac4fdca74aed40d53eae1a8a4ae2df78a258a6')
prepare() {
cd "${pkgname}-${pkgver}"
cd seanime-web
npm install
npm run build
mkdir -p ../web
cp -r out/* ../web/
cd ..
}
build() {
cd "${pkgname}-${pkgver}"
export CGO_ENABLED=1
go build -o seanime -trimpath -ldflags="-s -w"
}
package() {
cd "${pkgname}-${pkgver}"
install -d "${pkgdir}/usr/bin/"
install -dm755 "${pkgdir}/opt/${pkgname}"
install -m 755 seanime -t "${pkgdir}/opt/${pkgname}/"
cp -r web "${pkgdir}/opt/${pkgname}/"
ln -s "/opt/${pkgname}/seanime" "${pkgdir}/usr/bin/"
install -Dm644 /dev/stdin "${pkgdir}/usr/lib/systemd/user/seanime.service" <<EOF
[Unit]
Description=Seanime Service
After=network.target
[Service]
ExecStart=/usr/bin/seanime
Restart=always
[Install]
WantedBy=default.target
EOF
}
|