You are not logged in.

#1 2023-05-07 12:59:00

linuxscoop
Member
Registered: 2022-08-09
Posts: 26

How do I run kavita?

How do I run kavita? I've tried writing kavita on the terminal but it doesn't work and there isn't a launcher in the menu.

# Contributor: CountMurphy <spartan1086@gmail.com>
pkgname=kavita-bin
pkgver=0.7.2
pkgrel=0
pkgdesc="Self hosted ebook and comic reader"
arch=('x86_64' 'aarch64' 'armv7h')
url="https://www.kavitareader.com/"
license=('GPL3')
backup=("etc/Kavita/appsettings.json")
depends=()
makedepends=()
source_x86_64=(
https://github.com/Kareadita/Kavita/releases/download/v$pkgver/kavita-linux-x64.tar.gz
)
source_aarch64=(
https://github.com/Kareadita/Kavita/releases/download/v$pkgver/kavita-linux-arm64.tar.gz
)
source_armv7h=(
https://github.com/Kareadita/Kavita/releases/download/v$pkgver/kavita-linux-arm.tar.gz
)
md5sums_x86_64=(
a2f48304bf664dacc77ba544817b0bb2
)
md5sums_aarch64=(
707ff4fc18c3e18ff7dd1ae06d63fa2e
)
md5sums_armv7h=(
c6f500c4b4b52259cb01c6e5ae569934
)

build() {
    cd "${srcdir}"

    tar -xvf kavita-linux-*.tar.gz
    cd Kavita
    chmod 755 Kavita
}

package() {

mkdir -p $pkgdir/opt/kavita
install -Dm 644 $srcdir/Kavita/config/appsettings.json  $pkgdir/etc/Kavita/appsettings.json
cp -Ra $srcdir/Kavita/* $pkgdir/opt/kavita
install=kavita.install
install -Dm 644 ../kavita.service -t "$pkgdir"/usr/lib/systemd/system/
rm $pkgdir/opt/kavita/config/appsettings.json
ln -s /etc/Kavita/appsettings.json $pkgdir/opt/kavita/config/appsettings.json

}

Offline

#2 2023-05-07 13:10:30

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,471

Re: How do I run kavita?

It should have told you how when you installed it. https://aur.archlinux.org/cgit/aur.git/ … kavita-bin

Not that that's a good .install file, but at least that info is there.

Online

#3 2023-10-20 15:42:11

piratebill
Member
From: Sol System
Registered: 2011-10-20
Posts: 133

Re: How do I run kavita?

Not sure if this counts as necrobumping, but as the guy who put that install file together, I am definitely open to suggestions on making it better. Its improved since you've seen it last, but I am not above making mistakes

Last edited by piratebill (2023-10-20 15:48:01)

Offline

#4 2023-10-21 13:43:07

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,471

Re: How do I run kavita?

It is much better now, the only remaining real problem is the userdel kavita. See https://archlinux.org/todo/usergroup-management/

Personally, I wouldn't be giving a specific systemctl command, you don't know if people would want to use --now or enable the service.

Online

#5 2023-10-21 13:59:28

loqs
Member
Registered: 2014-03-06
Posts: 17,199

Re: How do I run kavita?

Some observations on the PKGBUILD:

build() {
    cd "${srcdir}"

    tar -xvf kavita-linux-*.tar.gz
    cd Kavita
    chmod 755 Kavita
}

makepkg will extract the archive for you.  If you move the chmod to package() you can drop build().

package() {

mkdir -p $pkgdir/opt/kavita
install -Dm 644 $srcdir/Kavita/config/appsettings.json  $pkgdir/etc/Kavita/appsettings.json
cp -Ra $srcdir/Kavita/* $pkgdir/opt/kavita
install -Dm 644 ../kavita.sysusers "${pkgdir}"/usr/lib/sysusers.d/${pkgname}.conf
install -Dm 644 ../kavita.tmpfiles "${pkgdir}"/usr/lib/tmpfiles.d/${pkgname}.conf
install=kavita.install
install -Dm 644 ../kavita.service -t "$pkgdir"/usr/lib/systemd/system/
rm $pkgdir/opt/kavita/config/appsettings.json

Missing quoting on $srcdir some uses of $pkgdir.

install=kavita.install

Minor nit as it is not a split package it makes no difference if the install entry is in package() or gloabl but by convention it it goes just above the source array PKGBUILD#install.  It could replace the empty depends and makedepends arrays.

Offline

#6 2023-10-23 13:17:17

piratebill
Member
From: Sol System
Registered: 2011-10-20
Posts: 133

Re: How do I run kavita?

Awesome! Thank you both. I'll work on putting your suggestions in.

Offline

Board footer

Powered by FluxBB