Package Details: audiobookshelf 1:2.18.1-1

Git Clone URL: https://aur.archlinux.org/audiobookshelf.git (read-only, click to copy)
Package Base: audiobookshelf
Description: Self-hosted audiobook server for managing and playing audiobooks
Upstream URL: https://github.com/advplyr/audiobookshelf
Licenses: GPL-3.0-only
Submitter: ruahcra
Maintainer: ruahcra (wnndgws, evine)
Last Packager: evine
Votes: 6
Popularity: 0.81
First Submitted: 2024-02-24 08:28 (UTC)
Last Updated: 2025-01-20 23:14 (UTC)

Latest Comments

1 2 3 Next › Last »

ruahcra commented on 2025-01-14 02:13 (UTC)

@evine can you remove the v prefix again, but this time increase the epoch: https://wiki.archlinux.org/title/PKGBUILD#epoch

Gilrain commented on 2025-01-13 10:15 (UTC)

Hi, Could you drop the v prefix in pkgver? Even though there are no official guidelines preventing it, it's simply not used. And it breaks a lot of automated build scripts…

ruahcra commented on 2025-01-06 12:50 (UTC)

Thanks for the suggestion @evine . I have not come across that method before. Added as co-maintainer

evine commented on 2025-01-02 04:51 (UTC) (edited on 2025-01-02 05:51 (UTC) by evine)

@ruahcra If possible, could you add me as a collaborative maintainer?

The following PKGBUILD can reuse the system's nodejs, significantly reducing package size.

pkgname=audiobookshelf
pkgver=2.17.7
pkgrel=1
pkgdesc="Self-hosted audiobook and podcast server"
arch=("x86_64" "aarch64")
url="https://github.com/advplyr/${pkgname}"
license=("GPL-3.0-or-later")
backup=("etc/conf.d/${pkgname}")
depends=("ffmpeg" "libnusqlite3" "nodejs")
makedepends=("npm")
source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/refs/tags/v${pkgver}.tar.gz"
        "${pkgname}.conf"
        "${pkgname}.hook"
        "${pkgname}.service"
        "${pkgname}.sysusers"
        "${pkgname}.tmpfiles")
sha256sums=('f889909ecd2324fa355ccc02b72c21da592afa07c70f56b82c2da9cff72993ad'
            '839c778b8ae951d82a602d370452d702ad9b1d8ab6844984c934a3d2af0b710a'
            '91d00bbc9800f80cde439fd9b5343cf031b6a09557f03172c92d40f2f0775c2b'
            '4f37d8e407eda555231dc23d1cd35d329075ae6686acbb89d0b4612a824d594d'
            'cd5db44865de6f7401093b60869f937703213f196220e8c3325fa7f1b02db1fa'
            'ec04988b13dd049fbd021a51275c92120179f74f1e71fd9141bd720633e5f99f')

build() {
    cd "${pkgname}-${pkgver}"
    npm run client
    npm ci --only=production
    find {client/dist,node_modules,server} -type f -name "*.map" | xargs rm -rf
    sed -i '1i #!/usr/bin/node\n' prod.js
}

package() {
    install -Dm644 "${pkgname}.conf"     "${pkgdir}/etc/conf.d/${pkgname}"
    install -Dm644 "${pkgname}.hook"     "${pkgdir}/usr/share/doc/${pkgname}/${pkgname}.hook"
    install -Dm644 "${pkgname}.service"  "${pkgdir}/usr/lib/systemd/system/${pkgname}.service"
    install -Dm644 "${pkgname}.sysusers" "${pkgdir}/usr/lib/sysusers.d/${pkgname}.conf"
    install -Dm644 "${pkgname}.tmpfiles" "${pkgdir}/usr/lib/tmpfiles.d/${pkgname}.conf"

    cd "${pkgname}-${pkgver}"
    install -Dm644 readme.md             "${pkgdir}/usr/share/doc/${pkgname}/readme.md"
    install -Dm644 *.json             -t "${pkgdir}/usr/lib/${pkgname}"
    install -Dm755 prod.js            -t "${pkgdir}/usr/lib/${pkgname}"
    mv node_modules                      "${pkgdir}/usr/lib/${pkgname}"
    find {client/dist,server} -type f |
        xargs -I {} install -Dm644 {}    "${pkgdir}/usr/lib/${pkgname}/"{}
    install -dm755                       "${pkgdir}/usr/bin"
    ln -s "/usr/lib/${pkgname}/prod.js"  "${pkgdir}/usr/bin/${pkgname}"
}

ruahcra commented on 2024-09-03 13:36 (UTC)

FYI I find that when running with the supplied systemd unit, it fails with the below error unless I create /usr/share/audiobookshelf and chown it to the audiobookshelf user. I haven't been able to figure out if it is a packaging bug or upstream bug. Help would be appreciated.

Sep 03 22:32:22 audiobookshelf systemd[1]: Started Self-hosted audiobook server for managing and playing audiobooks.
Sep 03 22:32:23 audiobookshelf audiobookshelf[74432]: pkg/prelude/bootstrap.js:1872
Sep 03 22:32:23 audiobookshelf audiobookshelf[74432]:       throw error;
Sep 03 22:32:23 audiobookshelf audiobookshelf[74432]:       ^
Sep 03 22:32:23 audiobookshelf audiobookshelf[74432]: Error: EACCES: permission denied, mkdir '/usr/share/audiobookshelf'
Sep 03 22:32:23 audiobookshelf audiobookshelf[74432]:     at Object.mkdirSync (node:fs:1380:26)
Sep 03 22:32:23 audiobookshelf audiobookshelf[74432]:     at Object.mkdirSync (pkg/prelude/bootstrap.js:1639:33)
Sep 03 22:32:23 audiobookshelf audiobookshelf[74432]:     at createDirRecursively (pkg/prelude/bootstrap.js:256:8)
Sep 03 22:32:23 audiobookshelf audiobookshelf[74432]:     at createDirRecursively (pkg/prelude/bootstrap.js:255:5)
Sep 03 22:32:23 audiobookshelf audiobookshelf[74432]:     at createDirRecursively (pkg/prelude/bootstrap.js:255:5)
Sep 03 22:32:23 audiobookshelf audiobookshelf[74432]:     at createDirRecursively (pkg/prelude/bootstrap.js:255:5)
Sep 03 22:32:23 audiobookshelf audiobookshelf[74432]:     at process.dlopen (pkg/prelude/bootstrap.js:2217:7)
Sep 03 22:32:23 audiobookshelf audiobookshelf[74432]:     at Module._extensions..node (node:internal/modules/cjs/loader:1473:18)
Sep 03 22:32:23 audiobookshelf audiobookshelf[74432]:     at Module.load (node:internal/modules/cjs/loader:1207:32)
Sep 03 22:32:23 audiobookshelf audiobookshelf[74432]:     at Module._load (node:internal/modules/cjs/loader:1023:12) {
Sep 03 22:32:23 audiobookshelf audiobookshelf[74432]:   errno: -13,
Sep 03 22:32:23 audiobookshelf audiobookshelf[74432]:   code: 'EACCES',
Sep 03 22:32:23 audiobookshelf audiobookshelf[74432]:   syscall: 'mkdir',
Sep 03 22:32:23 audiobookshelf audiobookshelf[74432]:   path: '/usr/share/audiobookshelf'
Sep 03 22:32:23 audiobookshelf audiobookshelf[74432]: }
Sep 03 22:32:23 audiobookshelf audiobookshelf[74432]: Node.js v20.11.1
Sep 03 22:32:23 audiobookshelf systemd[1]: audiobookshelf.service: Main process exited, code=exited, status=1/FAILURE

EnragedN3wb commented on 2024-07-20 11:18 (UTC) (edited on 2024-07-20 11:19 (UTC) by EnragedN3wb)

Good call C0rn3j, after another system update all is working now. :)

C0rn3j commented on 2024-07-20 08:14 (UTC) (edited on 2024-07-20 08:14 (UTC) by C0rn3j)

Builds fine here both on my server and in a clean chroot, maybe it was a transient issue of npm?

@ruahcra could you please swap md5 for something more modern? sha256 is fine

EnragedN3wb commented on 2024-07-20 06:31 (UTC)

Ah ok, thanks for confirmation it's not just me! Can be hard to tell sometimes when your new. :P

ruahcra commented on 2024-07-20 01:35 (UTC)

It's broken for me as well. Haven't been able to figure it out yet otherwise would push a fix.

EnragedN3wb commented on 2024-07-20 00:17 (UTC) (edited on 2024-07-20 00:19 (UTC) by EnragedN3wb)

So I'm rather new to Linux, but every problem I've had so far I've been able to solve except installing this. It goes fine up until it hits

"npm warn deprecated @npmcli/move-file@1.1.2: This functionality has been moved to @npmcli/fs"

which seems normal from other people's installs, but then it just seems to sit there forever. If I could get an error or see what exactly it was doing maybe I could figure it out, but unlike most things so far this just gives me a spinning indicator in the terminal so I have no idea what to do & would really appreciate if someone could nudge me in the right direction if they have encountered this before!

I'm using CachyOS with KDE plasma if that helps.