mirror of
https://github.com/navidrome/navidrome.git
synced 2026-08-31 07:30:32 +00:00
Signed-off-by: floatlesss <117862164+floatlesss@users.noreply.github.com>
fix(vscodedevcontainer): fix-taglib-build-issues - #4749
This commit is contained in:
parent
131c0c565c
commit
41cc4610af
@ -56,10 +56,11 @@
|
||||
],
|
||||
// Use 'postCreateCommand' to run commands after the container is created.
|
||||
// "postCreateCommand": "make setup-dev",
|
||||
"postCreateCommand": "bash .devcontainer/install-taglib.sh",
|
||||
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
|
||||
"remoteUser": "vscode",
|
||||
"remoteEnv": {
|
||||
"ND_MUSICFOLDER": "./music",
|
||||
"ND_DATAFOLDER": "./data"
|
||||
}
|
||||
}
|
||||
}
|
||||
30
.devcontainer/install-taglib.sh
Normal file
30
.devcontainer/install-taglib.sh
Normal file
@ -0,0 +1,30 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# 1. Detect Architecture
|
||||
ARCH=$(dpkg --print-architecture)
|
||||
TAGLIB_VERSION="v2.1.1-1"
|
||||
|
||||
case $ARCH in
|
||||
"amd64")
|
||||
DOWNLOAD_ARCH="linux-amd64"
|
||||
;;
|
||||
"arm64")
|
||||
DOWNLOAD_ARCH="linux-arm64"
|
||||
;;
|
||||
*)
|
||||
echo "Unsupported architecture: $ARCH"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
URL="https://github.com/navidrome/cross-taglib/releases/download/${TAGLIB_VERSION}/taglib-${DOWNLOAD_ARCH}.tar.gz"
|
||||
|
||||
echo "Downloading TagLib for ${ARCH} from ${URL}"
|
||||
|
||||
wget "$URL" -O /tmp/cross-taglib.tar.gz
|
||||
sudo tar -xzf /tmp/cross-taglib.tar.gz -C /usr --strip-components=1
|
||||
sudo mv /usr/include/taglib/* /usr/include
|
||||
sudo rm /tmp/cross-taglib.tar.gz /usr/provenance.json
|
||||
|
||||
echo "TagLib installation complete"
|
||||
Loading…
x
Reference in New Issue
Block a user