1 include /usr
/share
/dpkg
/architecture.mk
2 include /usr
/share
/dpkg
/pkg-info.mk
6 GITVERSION
:=$(shell git rev-parse HEAD
)
10 ifeq ($(BUILD_MODE
), release
)
11 CARGO_BUILD_ARGS
+= --release
12 COMPILEDIR
:= target
/release
14 COMPILEDIR
:= target
/debug
17 SERVICE_BIN
:= pve-lxc-syscalld
20 $(addprefix $(COMPILEDIR
)/,$(SERVICE_BIN
))
22 DEB
=$(PACKAGE
)_
$(DEB_VERSION_UPSTREAM_REVISION
)_
$(DEB_HOST_ARCH
).deb
23 DSC
=$(PACKAGE
)_
$(DEB_VERSION_UPSTREAM_REVISION
).dsc
24 BUILDSRC
:= $(PACKAGE
)-$(DEB_VERSION_UPSTREAM
)
26 all: cargo-build
$(SUBDIRS
)
34 cargo build
$(CARGO_BUILD_ARGS
)
39 cargo fmt
--all -- --check
42 $(COMPILED_BINS
): cargo-build
44 install: $(COMPILED_BINS
)
45 install -dm755
$(DESTDIR
)$(LIBEXECDIR
)/proxmox-backup
46 $(foreach i
,$(SERVICE_BIN
), \
47 install -m755
$(COMPILEDIR
)/$(i
) $(DESTDIR
)$(LIBEXECDIR
)/proxmox-backup
/ ;)
49 # always re-create this dir
50 # but also copy the local target/ dir as a build-cache
55 rsync
-a debian Makefile defines.mk Cargo.toml Cargo.lock \
59 $(foreach i
,$(SUBDIRS
), \
60 $(MAKE
) -C
$(BUILDSRC
)/$(i
) clean ;)
65 cd
$(BUILDSRC
); dpkg-buildpackage
-b
-us
-uc
--no-pre-clean
71 cd
$(BUILDSRC
); dpkg-buildpackage
-S
-us
-uc
-d
-nc
75 $(foreach i
,$(SUBDIRS
), \
76 $(MAKE
) -C
$(i
) clean ;)
78 rm -rf
*.deb
*.dsc
*.
tar.gz
*.buildinfo
*.changes
$(BUILDSRC
)