debian+makefile: expose POSTIT_RUNTIME override for arm64 builds
Default stays linux-x64 (the only architecture built today). Override on the command line to target arm64 (or any other RID supported by Avalonia 12 on Linux): make deb POSTIT_RUNTIME=linux-arm64 The Makefile passes POSTIT_RUNTIME through to dpkg-buildpackage, which propagates it to debian/rules, which threads it into dotnet publish --runtime. Note: the .deb is mono-architecture. For a multi-arch .deb, the build must run twice (once per RID) and the resulting .debs can be combined with dpkg-gencontrol / Multi-Arch: same. Update README accordingly.
This commit is contained in:
parent
a0b9912709
commit
28303435cc
3 changed files with 25 additions and 6 deletions
4
Makefile
4
Makefile
|
|
@ -13,16 +13,18 @@
|
||||||
# Environment overrides (or pass on the make command line):
|
# Environment overrides (or pass on the make command line):
|
||||||
# POSTIT_GIT_URL default: https://github.com/pazof/yavsc.git
|
# POSTIT_GIT_URL default: https://github.com/pazof/yavsc.git
|
||||||
# POSTIT_GIT_TAG default: 1.0.0
|
# POSTIT_GIT_TAG default: 1.0.0
|
||||||
|
# POSTIT_RUNTIME default: linux-x64 (override to linux-arm64 etc.)
|
||||||
# POSTIT_OUT_DIR default: $(CURDIR)/.. (artifacts land here)
|
# POSTIT_OUT_DIR default: $(CURDIR)/.. (artifacts land here)
|
||||||
|
|
||||||
POSTIT_GIT_URL ?= https://github.com/pazof/yavsc.git
|
POSTIT_GIT_URL ?= https://github.com/pazof/yavsc.git
|
||||||
POSTIT_GIT_TAG ?= 1.0.0
|
POSTIT_GIT_TAG ?= 1.0.0
|
||||||
|
POSTIT_RUNTIME ?= linux-x64
|
||||||
POSTIT_OUT_DIR ?= $(CURDIR)/..
|
POSTIT_OUT_DIR ?= $(CURDIR)/..
|
||||||
|
|
||||||
.PHONY: deb clean source
|
.PHONY: deb clean source
|
||||||
|
|
||||||
deb:
|
deb:
|
||||||
POSTIT_GIT_URL=$(POSTIT_GIT_URL) POSTIT_GIT_TAG=$(POSTIT_GIT_TAG) \
|
POSTIT_GIT_URL=$(POSTIT_GIT_URL) POSTIT_GIT_TAG=$(POSTIT_GIT_TAG) POSTIT_RUNTIME=$(POSTIT_RUNTIME) \
|
||||||
dpkg-buildpackage -us -uc -b
|
dpkg-buildpackage -us -uc -b
|
||||||
mv ../postit_*$(POSTIT_GIT_TAG)*.deb $(POSTIT_OUT_DIR)/ 2>/dev/null || \
|
mv ../postit_*$(POSTIT_GIT_TAG)*.deb $(POSTIT_OUT_DIR)/ 2>/dev/null || \
|
||||||
mv ../postit_*.deb $(POSTIT_OUT_DIR)/ || true
|
mv ../postit_*.deb $(POSTIT_OUT_DIR)/ || true
|
||||||
|
|
|
||||||
15
README.md
15
README.md
|
|
@ -61,9 +61,22 @@ sudo apt -f install # résout les dépendances manquantes
|
||||||
Pour installer sur **arm64** :
|
Pour installer sur **arm64** :
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
make clean && make deb # sur une machine arm64, le .deb sera _arm64.deb
|
# Sur une machine arm64 :
|
||||||
|
make clean && make deb # le .deb sera _arm64.deb
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Le `debian/rules` publie avec `--runtime linux-x64` pour
|
||||||
|
amd64. Pour produire un .deb arm64, override :
|
||||||
|
|
||||||
|
```bash
|
||||||
|
make deb POSTIT_RUNTIME=linux-arm64
|
||||||
|
```
|
||||||
|
|
||||||
|
(le paramètre est exposé par `debian/rules` ; bump à ajouter si
|
||||||
|
besoin). À noter : **un seul runtime par build** — le `--runtime`
|
||||||
|
exclut les autres plateformes, donc le .deb est portable mais
|
||||||
|
mono-architecture.
|
||||||
|
|
||||||
## Vérification
|
## Vérification
|
||||||
|
|
||||||
Après installation :
|
Après installation :
|
||||||
|
|
|
||||||
6
debian/rules
vendored
6
debian/rules
vendored
|
|
@ -21,6 +21,10 @@
|
||||||
|
|
||||||
POSTIT_GIT_URL ?= https://github.com/pazof/yavsc.git
|
POSTIT_GIT_URL ?= https://github.com/pazof/yavsc.git
|
||||||
POSTIT_GIT_TAG ?= 1.0.0
|
POSTIT_GIT_TAG ?= 1.0.0
|
||||||
|
# Runtime identifier passed to `dotnet publish --runtime`. Override
|
||||||
|
# at build time for non-amd64 targets:
|
||||||
|
# make deb POSTIT_RUNTIME=linux-arm64
|
||||||
|
POSTIT_RUNTIME ?= linux-x64
|
||||||
POSTIT_DESKTOP_PROJECT := src/PostIt/PostIt.Desktop/PostIt.Desktop.csproj
|
POSTIT_DESKTOP_PROJECT := src/PostIt/PostIt.Desktop/PostIt.Desktop.csproj
|
||||||
POSTIT_BUILD_DIR := $(CURDIR)/build
|
POSTIT_BUILD_DIR := $(CURDIR)/build
|
||||||
POSTIT_SRC_DIR := $(POSTIT_BUILD_DIR)/yavsc-src
|
POSTIT_SRC_DIR := $(POSTIT_BUILD_DIR)/yavsc-src
|
||||||
|
|
@ -56,7 +60,7 @@ override_dh_auto_build:
|
||||||
dotnet publish $(POSTIT_SRC_DIR)/$(POSTIT_DESKTOP_PROJECT) \
|
dotnet publish $(POSTIT_SRC_DIR)/$(POSTIT_DESKTOP_PROJECT) \
|
||||||
-c Release \
|
-c Release \
|
||||||
--self-contained false \
|
--self-contained false \
|
||||||
--runtime linux-x64 \
|
--runtime $(POSTIT_RUNTIME) \
|
||||||
-p:PublishReadyToRun=false \
|
-p:PublishReadyToRun=false \
|
||||||
-o $(POSTIT_BUILD_DIR)/postit-app
|
-o $(POSTIT_BUILD_DIR)/postit-app
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue