Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions srcpkgs/navidrome/files/navidrome/run
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env sh

exec 2>&1

[ -r ./conf ] && . ./conf

export ND_CONFIGFILE=/var/lib/navidrome/navidrome.toml
exec chpst -u _navidrome:_navidrome navidrome
Comment on lines +7 to +8
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
export ND_CONFIGFILE=/var/lib/navidrome/navidrome.toml
exec chpst -u _navidrome:_navidrome navidrome
exec chpst -u _navidrome:_navidrome navidrome ${OPTS:- --configfile "/etc/navidrome/navidrome.toml"}

Its always better to match upstream default locations and services (https://github.com/navidrome/navidrome/blob/4570dec675f904aa0cecd09b2c842685b762527e/contrib/navidrome.service#L14). Config files belong in /etc.

32 changes: 32 additions & 0 deletions srcpkgs/navidrome/template
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Template file for 'navidrome'
pkgname=navidrome
version=0.61.1
revision=1
build_style=go
go_import_path=github.com/navidrome/navidrome
go_ldflags=" -X github.com/navidrome/navidrome/consts.gitSha=e7c7cba87374ebe1bace57271bc5e8cf731b7a6e -X github.com/navidrome/navidrome/consts.gitTag=v${version}"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Things like the commit will end up being outdated, either don't set it or set it to the version.

go_build_tags="netgo,sqlite_fts5"
hostmakedepends="nodejs pkg-config sqlite-devel taglib-devel"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sqlite-devel taglib-devel sound like they belong in makedepends.

depends="ffmpeg"
short_desc="Your personal streaming service"
maintainer="micro80 <me@micro80.com>"
license="GPL-3.0-only"
homepage="https://www.navidrome.org"
checksum=68273cf2a8938a167d68fd6c6b341f0e06c1f23acfca83698f5673048f9beaae

Check failure on line 15 in srcpkgs/navidrome/template

View workflow job for this annotation

GitHub Actions / Lint templates

Template Lint

Place checksum= after distfiles=
distfiles="https://github.com/navidrome/navidrome/archive/refs/tags/v${version}.tar.gz"

system_accounts="_navidrome"
_navidrome_homedir="/var/lib/navidrome"
make_dirs="/var/lib/navidrome 0755 _navidrome _navidrome"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
conf_files="/etc/navidrome/navidrome.toml"

pre_build() {
npm --prefix ./ui ci
npm --prefix ./ui run build
}

post_install() {
vlicense LICENSE

Check failure on line 28 in srcpkgs/navidrome/template

View workflow job for this annotation

GitHub Actions / Lint templates

Template Lint

license GPL-3.0-only should not be installed
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is GPL, the license file doesn't need to be installed.

vmkdir var/lib/navidrome
vcopy release/linux/navidrome.toml var/lib/navidrome/navidrome.toml
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
vcopy release/linux/navidrome.toml var/lib/navidrome/navidrome.toml
vinstall release/linux/navidrome.toml 644 etc/navidrome

vsv navidrome
}

Check failure on line 32 in srcpkgs/navidrome/template

View workflow job for this annotation

GitHub Actions / Lint templates

Template Lint

File does not end with newline character
Loading