2018-11-30 13:39:40 +01:00
#!/usr/bin/make -f
# See debhelper(7) (uncomment to enable)
# output every command that modifies files on the build system.
2019-12-20 09:34:14 +01:00
DH_VERBOSE = 1
include /usr/share/dpkg/pkg-info.mk
include /usr/share/rustc/architecture.mk
2018-11-30 13:39:40 +01:00
2019-01-31 16:11:09 +01:00
export BUILD_MODE=release
2018-11-30 13:39:40 +01:00
2019-12-20 09:34:14 +01:00
CARGO=/usr/share/cargo/bin/cargo
export CFLAGS CXXFLAGS CPPFLAGS LDFLAGS
export DEB_HOST_RUST_TYPE DEB_HOST_GNU_TYPE
export CARGO_HOME = $(CURDIR)/debian/cargo_home
export DEB_CARGO_CRATE=proxmox-backup_$(DEB_VERSION_UPSTREAM)
export DEB_CARGO_PACKAGE=proxmox-backup
2018-11-30 13:39:40 +01:00
%:
2019-11-11 08:35:33 +01:00
dh $@ --with=bash-completion
2018-11-30 13:39:40 +01:00
2019-12-20 09:34:14 +01:00
override_dh_auto_configure:
$(CARGO) prepare-debian $(CURDIR)/debian/cargo_registry --link-from-system
dh_auto_configure
2019-01-31 15:42:47 +01:00
override_dh_auto_build:
dh_auto_build -- \
2019-02-16 09:29:04 +01:00
PROXY_USER=backup \
2019-01-31 15:42:47 +01:00
LIBDIR=/usr/lib/$(DEB_HOST_MULTIARCH)
2019-11-11 08:35:33 +01:00
override_dh_missing:
dh_missing --fail-missing
2019-01-31 15:42:47 +01:00
override_dh_auto_install:
dh_auto_install -- \
2019-02-16 09:29:04 +01:00
PROXY_USER=backup \
2019-01-31 15:42:47 +01:00
LIBDIR=/usr/lib/$(DEB_HOST_MULTIARCH)
2019-01-28 13:17:03 +01:00
2020-06-22 09:39:37 +02:00
override_dh_installsystemd:
2020-10-31 21:27:06 +01:00
dh_installsystemd -pproxmox-backup-server proxmox-backup-daily-update.timer
2020-06-22 09:39:37 +02:00
# note: we start/try-reload-restart services manually in postinst
dh_installsystemd --no-start --no-restart-after-upgrade
2019-12-16 16:38:00 +01:00
2020-12-28 13:22:17 +01:00
override_dh_fixperms:
dh_fixperms --exclude sg-tape-cmd
2021-01-14 17:30:09 +01:00
override_dh_strip:
dh_strip
2021-03-31 12:21:48 +02:00
for exe in $$(find \
debian/proxmox-backup-client/usr \
debian/proxmox-backup-server/usr \
2021-04-13 12:18:29 +02:00
debian/proxmox-backup-file-restore \
2021-03-31 12:21:48 +02:00
-executable -type f); do \
2021-01-14 17:30:09 +01:00
debian/scripts/elf-strip-unused-dependencies.sh "$$exe" || true; \
done
2020-07-04 17:53:01 +02:00
override_dh_compress:
dh_compress -X.pdf