Make debian package building work
I gave up on getting it to build on bullseye, as its cargo/rustc is too old for the 2021 edition. Building newer deb packages of rust is apparently a difficult, manual process. I tried installing rustup and pulling the latest compiler, but that failed with strange errors that I am tired of debugging.
This commit is contained in:
parent
b63de1d416
commit
aafe026092
3
.dockerignore
Normal file
3
.dockerignore
Normal file
@ -0,0 +1,3 @@
|
||||
/target
|
||||
.tags
|
||||
/docker-out
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -7,3 +7,4 @@ debian/bscreensaver.substvars
|
||||
debian/bscreensaver/
|
||||
debian/debhelper-build-stamp
|
||||
debian/files
|
||||
/docker-out/
|
||||
|
12
Dockerfile
12
Dockerfile
@ -1,15 +1,11 @@
|
||||
FROM debian:bullseye-slim
|
||||
|
||||
ARG RUST_VERSION=1.60
|
||||
|
||||
WORKDIR /bscreensaver
|
||||
FROM debian:bookworm-slim
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get -y full-upgrade && \
|
||||
apt-get -y install curl devscripts && \
|
||||
mkdir -p /build
|
||||
apt-get -y install devscripts && \
|
||||
mkdir -p /bscreensaver-build
|
||||
|
||||
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
||||
WORKDIR /bscreensaver
|
||||
|
||||
# Do this first to get our build deps cached.
|
||||
COPY debian ./debian
|
||||
|
12
Makefile
12
Makefile
@ -82,16 +82,16 @@ $(RELEASE_OUT)/bscreensaver-settings.desktop: settings/bscreensaver-settings.des
|
||||
|
||||
deb-pkg:
|
||||
@[ "$(RELEASE_VERSION)" ] || { echo "RELEASE_VERSION not set" >&2; exit 1; }
|
||||
docker build -t bscreensaver-build:latest .
|
||||
sudo rm -rf docker-out
|
||||
docker build -t bscreensaver-build:latest .
|
||||
mkdir docker-out
|
||||
docker run --rm -v $(shell pwd)/docker-out:/build:rw bscreensaver-build:latest bash -c '\
|
||||
cp -a /bscreensaver /build/bscreensaver-$(RELEASE_VERSION) && \
|
||||
cd /build && \
|
||||
docker run --rm -v $(shell pwd)/docker-out:/bscreensaver-build:rw bscreensaver-build:latest bash -c '\
|
||||
cp -a /bscreensaver /bscreensaver-build/bscreensaver-$(RELEASE_VERSION) && \
|
||||
cd /bscreensaver-build && \
|
||||
tar cvzf bscreensaver_$(RELEASE_VERSION).orig.tar.gz bscreensaver-$(RELEASE_VERSION) && \
|
||||
cd bscreensaver-$(RELEASE_VERSION) && \
|
||||
debuild --prepend-path=/root/.cargo/bin -uc -us && \
|
||||
rm -rf /build/bscreensaver'
|
||||
debuild -uc -us && \
|
||||
rm -rf /bscreensaver-build/bscreensaver'
|
||||
|
||||
clean:
|
||||
cargo clean
|
||||
|
4
debian/control
vendored
4
debian/control
vendored
@ -11,8 +11,8 @@ Build-Depends:
|
||||
libxcb1-dev,
|
||||
libgtk-3-dev,
|
||||
libpam0g-dev,
|
||||
cargo,
|
||||
rustc,
|
||||
cargo (>= 0.57),
|
||||
rustc (>= 1.58),
|
||||
help2man
|
||||
|
||||
Package: bscreensaver
|
||||
|
4
debian/rules
vendored
4
debian/rules
vendored
@ -9,10 +9,6 @@ MAKE_ARGS = \
|
||||
dh $@
|
||||
|
||||
override_dh_auto_clean:
|
||||
@echo "HOME=$$HOME"
|
||||
@echo "PATH=$$PATH"
|
||||
ls $$HOME/.rustup
|
||||
ls $$HOME/.cargo
|
||||
dh_auto_clean -- $(MAKE_ARGS)
|
||||
|
||||
override_dh_auto_build:
|
||||
|
Loading…
Reference in New Issue
Block a user