From e36a42f35686afa5a9cf172f7c42fabeb75d9535 Mon Sep 17 00:00:00 2001 From: Deluan Date: Fri, 13 Mar 2020 12:40:08 -0400 Subject: [PATCH] build: generate binaries for Linux armv6, armv7 and arm68 (v8) (fixes #92) --- .goreleaser.yml | 60 ++++++++++++++++++++++++++++++++++++++----------- README.md | 4 ++-- 2 files changed, 49 insertions(+), 15 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index b3bfd24d..401d1cc5 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -2,11 +2,58 @@ before: hooks: + - apt-get update + - apt-get install -y gcc-arm-linux-gnueabi gcc-aarch64-linux-gnu - go get -u github.com/go-bindata/go-bindata/... - go-bindata -fs -prefix ui/build -tags embed -nocompress -pkg assets -o assets/embedded_gen.go ui/build/... - git checkout . builds: + - id: navidrome_linux_amd64 + env: + - CGO_ENABLED=1 + goos: + - linux + goarch: + - amd64 + flags: + - -tags=embed + ldflags: + - "-extldflags '-static'" + - -X github.com/deluan/navidrome/consts.gitSha={{.ShortCommit}} -X github.com/deluan/navidrome/consts.gitTag={{.Tag}} + + - id: navidrome_linux_arm + env: + - CGO_ENABLED=1 + - CC=arm-linux-gnueabi-gcc + goos: + - linux + goarch: + - arm + goarm: + - 6 + - 7 + flags: + - -tags=embed + ldflags: + - "-extldflags '-static'" + - "-extld=$CC" + - -X github.com/deluan/navidrome/consts.gitSha={{.ShortCommit}} -X github.com/deluan/navidrome/consts.gitTag={{.Tag}} + + - id: navidrome_linux_arm64 + env: + - CGO_ENABLED=1 + - CC=aarch64-linux-gnu-gcc + goos: + - linux + goarch: + - arm64 + flags: + - -tags=embed + ldflags: + - "-extldflags '-static'" + - -X github.com/deluan/navidrome/consts.gitSha={{.ShortCommit}} -X github.com/deluan/navidrome/consts.gitTag={{.Tag}} + - id: navidrome_darwin env: - CGO_ENABLED=1 @@ -21,19 +68,6 @@ builds: ldflags: - -X github.com/deluan/navidrome/consts.gitSha={{.ShortCommit}} -X github.com/deluan/navidrome/consts.gitTag={{.Tag}} - - id: navidrome_linux - env: - - CGO_ENABLED=1 - goos: - - linux - goarch: - - amd64 - flags: - - -tags=embed - ldflags: - - "-extldflags '-static'" - - -X github.com/deluan/navidrome/consts.gitSha={{.ShortCommit}} -X github.com/deluan/navidrome/consts.gitTag={{.Tag}} - - id: navidrome_windows_i686 env: - CGO_ENABLED=1 diff --git a/README.md b/README.md index fff050ae..ebf74c1c 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,6 @@ This project is being actively worked on. Expect a more polished experience and on a frequent basis. Some upcoming features planned: - Last.FM integration -- Pre-build binaries for Raspberry Pi - Smart/dynamic playlists (similar to iTunes) - Support for audiobooks (bookmarking) - Jukebox mode @@ -49,7 +48,8 @@ Various options are available: ### Pre-built executables Just head to the [releases page](https://github.com/deluan/navidrome/releases) and download the latest version for you -platform. There are builds available for Linux, macOS and Windows (32 and 64 bits). +platform. There are builds available for Linux (amd64 and arm), macOS and Windows (32 and 64 bits). +For Raspberry Pi (tested with Raspbian Buster on Pi 4), use the Linux arm builds. Remember to install [ffmpeg](https://ffmpeg.org/download.html) in your system, a requirement for Navidrome to work properly. You may find the latest static build for your platform here: https://johnvansickle.com/ffmpeg/