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/bscreensaver/
|
||||||
debian/debhelper-build-stamp
|
debian/debhelper-build-stamp
|
||||||
debian/files
|
debian/files
|
||||||
|
/docker-out/
|
||||||
|
12
Dockerfile
12
Dockerfile
@ -1,15 +1,11 @@
|
|||||||
FROM debian:bullseye-slim
|
FROM debian:bookworm-slim
|
||||||
|
|
||||||
ARG RUST_VERSION=1.60
|
|
||||||
|
|
||||||
WORKDIR /bscreensaver
|
|
||||||
|
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
apt-get -y full-upgrade && \
|
apt-get -y full-upgrade && \
|
||||||
apt-get -y install curl devscripts && \
|
apt-get -y install devscripts && \
|
||||||
mkdir -p /build
|
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.
|
# Do this first to get our build deps cached.
|
||||||
COPY debian ./debian
|
COPY debian ./debian
|
||||||
|
12
Makefile
12
Makefile
@ -82,16 +82,16 @@ $(RELEASE_OUT)/bscreensaver-settings.desktop: settings/bscreensaver-settings.des
|
|||||||
|
|
||||||
deb-pkg:
|
deb-pkg:
|
||||||
@[ "$(RELEASE_VERSION)" ] || { echo "RELEASE_VERSION not set" >&2; exit 1; }
|
@[ "$(RELEASE_VERSION)" ] || { echo "RELEASE_VERSION not set" >&2; exit 1; }
|
||||||
docker build -t bscreensaver-build:latest .
|
|
||||||
sudo rm -rf docker-out
|
sudo rm -rf docker-out
|
||||||
|
docker build -t bscreensaver-build:latest .
|
||||||
mkdir docker-out
|
mkdir docker-out
|
||||||
docker run --rm -v $(shell pwd)/docker-out:/build:rw bscreensaver-build:latest bash -c '\
|
docker run --rm -v $(shell pwd)/docker-out:/bscreensaver-build:rw bscreensaver-build:latest bash -c '\
|
||||||
cp -a /bscreensaver /build/bscreensaver-$(RELEASE_VERSION) && \
|
cp -a /bscreensaver /bscreensaver-build/bscreensaver-$(RELEASE_VERSION) && \
|
||||||
cd /build && \
|
cd /bscreensaver-build && \
|
||||||
tar cvzf bscreensaver_$(RELEASE_VERSION).orig.tar.gz bscreensaver-$(RELEASE_VERSION) && \
|
tar cvzf bscreensaver_$(RELEASE_VERSION).orig.tar.gz bscreensaver-$(RELEASE_VERSION) && \
|
||||||
cd bscreensaver-$(RELEASE_VERSION) && \
|
cd bscreensaver-$(RELEASE_VERSION) && \
|
||||||
debuild --prepend-path=/root/.cargo/bin -uc -us && \
|
debuild -uc -us && \
|
||||||
rm -rf /build/bscreensaver'
|
rm -rf /bscreensaver-build/bscreensaver'
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
cargo clean
|
cargo clean
|
||||||
|
4
debian/control
vendored
4
debian/control
vendored
@ -11,8 +11,8 @@ Build-Depends:
|
|||||||
libxcb1-dev,
|
libxcb1-dev,
|
||||||
libgtk-3-dev,
|
libgtk-3-dev,
|
||||||
libpam0g-dev,
|
libpam0g-dev,
|
||||||
cargo,
|
cargo (>= 0.57),
|
||||||
rustc,
|
rustc (>= 1.58),
|
||||||
help2man
|
help2man
|
||||||
|
|
||||||
Package: bscreensaver
|
Package: bscreensaver
|
||||||
|
4
debian/rules
vendored
4
debian/rules
vendored
@ -9,10 +9,6 @@ MAKE_ARGS = \
|
|||||||
dh $@
|
dh $@
|
||||||
|
|
||||||
override_dh_auto_clean:
|
override_dh_auto_clean:
|
||||||
@echo "HOME=$$HOME"
|
|
||||||
@echo "PATH=$$PATH"
|
|
||||||
ls $$HOME/.rustup
|
|
||||||
ls $$HOME/.cargo
|
|
||||||
dh_auto_clean -- $(MAKE_ARGS)
|
dh_auto_clean -- $(MAKE_ARGS)
|
||||||
|
|
||||||
override_dh_auto_build:
|
override_dh_auto_build:
|
||||||
|
Loading…
Reference in New Issue
Block a user