Skip to content

Commit

Permalink
deb: update deb package builds with new patch
Browse files Browse the repository at this point in the history
  • Loading branch information
R1kaB3rN committed Jan 4, 2025
1 parent fb7f95c commit a0ea96e
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
From 0c938fb23479d7d7a95f83850572089c446026e8 Mon Sep 17 00:00:00 2001
From 01a6b1c6e545fab6d01d24dfe1e240d327e77c3d Mon Sep 17 00:00:00 2001
From: R1kaB3rN <[email protected]>
Date: Thu, 2 Jan 2025 09:31:31 -0800
Subject: [PATCH] debian: fix build by using rustup
Date: Fri, 3 Jan 2025 22:58:17 -0800
Subject: [PATCH] deb: fix build by using rustup

---
Makefile.in | 8 +++++++-
packaging/deb/debian/control | 1 +
2 files changed, 8 insertions(+), 1 deletion(-)
Makefile.in | 10 +++++++++-
packaging/deb/debian/control | 1 +
packaging/deb/ubuntu/control | 1 +
3 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/Makefile.in b/Makefile.in
index 03b18fc4..bbb7d5bf 100644
index 03b18fc4..b9cfeb10 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -3,6 +3,8 @@ PROJECT := umu-launcher
Expand All @@ -21,26 +22,40 @@ index 03b18fc4..bbb7d5bf 100644
# If this is changed to umu (uppercase), `uninstall` target will also remove the SLR directory
INSTALLDIR ?= umu

@@ -170,10 +172,14 @@ zipapp-install: zipapp
@@ -170,10 +172,16 @@ zipapp-install: zipapp
@echo "Standalone application 'umu-run' created at '$(DESTDIR)$(PREFIX)/bin'"

PYTHON_PLATFORM_TAG = $(shell $(PYTHON_INTERPRETER) -c 'import sysconfig; print(sysconfig.get_config_var("EXT_SUFFIX"))')
+CARGO_BIN := $(HOME)/.cargo/bin/cargo
+RUSTUP_BIN := $(HOME)/.cargo/bin/rustup

$(OBJDIR)/.build-umu-delta: | $(OBJDIR)
$(info :: Building delta dependencies )
- cargo build -r
+ curl -LJO https://sh.rustup.rs
+ chmod u+x ./rustup-init.sh
+ $(SHELL_INTERPRETER) rustup-init.sh --default-toolchain stable -y
+ $(SHELL_INTERPRETER) rustup-init.sh --default-toolchain none -y
+ $(RUSTUP_BIN) toolchain install 1.83
+ $(CARGO_BIN) build -r
cp -a ./target/release/libumu_delta.so $(OBJDIR)/umu_delta$(PYTHON_PLATFORM_TAG)

.PHONY: umu-delta
diff --git a/packaging/deb/debian/control b/packaging/deb/debian/control
index 98ab7a4a..eec2c26f 100644
index 243d1771..5372875d 100644
--- a/packaging/deb/debian/control
+++ b/packaging/deb/debian/control
@@ -14,6 +14,7 @@ Build-Depends:
python3-installer,
python3-build,
python3-pip,
+ curl,
Standards-Version: 4.6.2
Homepage: https://github.com/Open-Wine-Components/umu-launcher
Vcs-Browser: https://github.com/Open-Wine-Components/umu-launcher
diff --git a/packaging/deb/ubuntu/control b/packaging/deb/ubuntu/control
index 243d1771..5372875d 100644
--- a/packaging/deb/ubuntu/control
+++ b/packaging/deb/ubuntu/control
@@ -14,6 +14,7 @@ Build-Depends:
python3-installer,
python3-build,
Expand Down
2 changes: 1 addition & 1 deletion packaging/deb/debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ PYTHONDIR = /usr/lib/python3/dist-packages
dh $@

override_dh_auto_configure:
patch -p1 < packaging/deb/debian/0001-debian-compile-using-latest-stable.patch
patch -p1 < packaging/deb/0001-deb-fix-build-by-using-rustup.patch
./configure.sh --prefix=/usr

override_dh_auto_build:
Expand Down
2 changes: 1 addition & 1 deletion packaging/deb/ubuntu/rules
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ PYTHONDIR = /usr/lib/python3/dist-packages
dh $@

override_dh_auto_configure:
patch -p1 < packaging/deb/debian/0001-debian-compile-using-latest-stable.patch
patch -p1 < packaging/deb/0001-deb-fix-build-by-using-rustup.patch
./configure.sh --prefix=/usr

override_dh_auto_build:
Expand Down

0 comments on commit a0ea96e

Please sign in to comment.