This commit is contained in:
AB
2020-04-26 15:07:45 +03:00
parent 4b0fbcce84
commit af482cf759
3 changed files with 17 additions and 6 deletions

View File

@ -15,25 +15,24 @@ backup=('etc/mus-fuse.yml')
pkgver() {
cd "$srcdir/$pkgname"
echo git describe --long --tags | awk -F '-' '{print $1}'| sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
git describe --long --tags | awk -F '-' '{print $1}'| sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}
prepare() {
cd $pkgname-$pkgver
cd "$srcdir/$pkgname"
cargo fetch --target x86_64-unknown-linux-gnu
}
build() {
cd $pkgname-$pkgver
cd "$srcdir/$pkgname"
cargo build --release --frozen --all-targets
}
package() {
cd $pkgname-$pkgver
cd "$srcdir/$pkgname"
install -Dt "$pkgdir/usr/bin" target/release/$pkgname
install -Dt "$pkgdir/usr/share/doc/$pkgname" -m644 README.md
install -Dt "$pkgdir/usr/lib/systemd/system" assets/$pkgname.service
mkdir -p "$pkgdir/etc"
cp -n assets/mus-fuse.yml "$pkgdir/etc/mus-fuse.yml"
}

2
.gitignore vendored
View File

@ -1,5 +1,5 @@
/target
mus-fuse.yml
/mus-fuse.yml
Cargo.lock
/mnt
.vscode/

12
assets/mus-fuse.yml Normal file
View File

@ -0,0 +1,12 @@
---
server: https://mus.test.com
mountpoint: /srv/mus-fuse
http_user: username
http_pass: passwd1337
# How many KiB of file beginnings download and store in RAM.
# It's speeding up any metadata operations and media library scanning.
cache_head: 768
# How many count of `cache_head` store.
cache_max_count: 10