ARMv6
This commit is contained in:
parent
0c666f96b1
commit
e22ec2c505
2 changed files with 26 additions and 4 deletions
|
@ -16,6 +16,20 @@ builds:
|
|||
hooks:
|
||||
post:
|
||||
- upx "{{ .Path }}" # apt install upx
|
||||
-
|
||||
id: ntfy_armv6
|
||||
binary: ntfy
|
||||
env:
|
||||
- CGO_ENABLED=1 # required for go-sqlite3
|
||||
- CC=arm-linux-gnueabi-gcc # apt install gcc-arm-linux-gnueabi
|
||||
tags: [sqlite_omit_load_extension,osusergo,netgo]
|
||||
ldflags:
|
||||
- "-linkmode=external -extldflags=-static -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}}"
|
||||
goos: [linux]
|
||||
goarch: [arm]
|
||||
goarm: [6]
|
||||
# No "upx", since it causes random core dumps, see
|
||||
# https://github.com/binwiederhier/ntfy/issues/191#issuecomment-1083406546
|
||||
-
|
||||
id: ntfy_armv7
|
||||
binary: ntfy
|
||||
|
|
16
Makefile
16
Makefile
|
@ -18,6 +18,7 @@ help:
|
|||
@echo "Build server & client (not release version):"
|
||||
@echo " make server - Build server & client (all architectures)"
|
||||
@echo " make server-amd64 - Build server & client (amd64 only)"
|
||||
@echo " make server-armv6 - Build server & client (armv6 only)"
|
||||
@echo " make server-armv7 - Build server & client (armv7 only)"
|
||||
@echo " make server-arm64 - Build server & client (arm64 only)"
|
||||
@echo
|
||||
|
@ -51,6 +52,7 @@ help:
|
|||
@echo
|
||||
@echo "Install locally (requires sudo):"
|
||||
@echo " make install-amd64 - Copy amd64 binary from dist/ to /usr/bin/ntfy"
|
||||
@echo " make install-armv6 - Copy armv6 binary from dist/ to /usr/bin/ntfy"
|
||||
@echo " make install-armv7 - Copy armv7 binary from dist/ to /usr/bin/ntfy"
|
||||
@echo " make install-arm64 - Copy arm64 binary from dist/ to /usr/bin/ntfy"
|
||||
@echo " make install-deb-amd64 - Install .deb from dist/ (amd64 only)"
|
||||
|
@ -104,7 +106,10 @@ server: server-deps
|
|||
server-amd64: server-deps-static-sites
|
||||
goreleaser build --snapshot --rm-dist --debug --id ntfy_amd64
|
||||
|
||||
server-armv7: server-deps-static-sites server-deps-gcc-armv7
|
||||
server-armv6: server-deps-static-sites server-deps-gcc-armv6-armv7
|
||||
goreleaser build --snapshot --rm-dist --debug --id ntfy_armv6
|
||||
|
||||
server-armv7: server-deps-static-sites server-deps-gcc-armv6-armv7
|
||||
goreleaser build --snapshot --rm-dist --debug --id ntfy_armv7
|
||||
|
||||
server-arm64: server-deps-static-sites server-deps-gcc-arm64
|
||||
|
@ -112,7 +117,7 @@ server-arm64: server-deps-static-sites server-deps-gcc-arm64
|
|||
|
||||
server-deps: server-deps-static-sites server-deps-all server-deps-gcc
|
||||
|
||||
server-deps-gcc: server-deps-gcc-armv7 server-deps-gcc-arm64
|
||||
server-deps-gcc: server-deps-gcc-armv6-armv7 server-deps-gcc-arm64
|
||||
|
||||
server-deps-static-sites:
|
||||
mkdir -p server/docs server/site
|
||||
|
@ -121,8 +126,8 @@ server-deps-static-sites:
|
|||
server-deps-all:
|
||||
which upx || { echo "ERROR: upx not installed. On Ubuntu, run: apt install upx"; exit 1; }
|
||||
|
||||
server-deps-gcc-armv7:
|
||||
which arm-linux-gnueabi-gcc || { echo "ERROR: ARMv7 cross compiler not installed. On Ubuntu, run: apt install gcc-arm-linux-gnueabi"; exit 1; }
|
||||
server-deps-gcc-armv6-armv7:
|
||||
which arm-linux-gnueabi-gcc || { echo "ERROR: ARMv6/ARMv7 cross compiler not installed. On Ubuntu, run: apt install gcc-arm-linux-gnueabi"; exit 1; }
|
||||
|
||||
server-deps-gcc-arm64:
|
||||
which aarch64-linux-gnu-gcc || { echo "ERROR: ARM64 cross compiler not installed. On Ubuntu, run: apt install gcc-aarch64-linux-gnu"; exit 1; }
|
||||
|
@ -203,6 +208,9 @@ release-check-tags:
|
|||
install-amd64: remove-binary
|
||||
sudo cp -a dist/ntfy_amd64_linux_amd64/ntfy /usr/bin/ntfy
|
||||
|
||||
install-armv6: remove-binary
|
||||
sudo cp -a dist/ntfy_armv6_linux_armv6/ntfy /usr/bin/ntfy
|
||||
|
||||
install-armv7: remove-binary
|
||||
sudo cp -a dist/ntfy_armv7_linux_armv7/ntfy /usr/bin/ntfy
|
||||
|
||||
|
|
Loading…
Reference in a new issue