3 ifeq ($(BUILD_MODE
), release
)
4 CARGO_BUILD_ARGS
+= --release
7 DEBUG_LIBPATH
:= "-L./target/debug",
10 define upload_template
12 dcmd
--deb lib
$(1)-rs-perl
*.changes \
13 | grep
-v
'.changes$$' \
14 |
tar -cf
"$@.tar" -T-
; \
15 cat
"$@.tar" | ssh
-X repoman@repo.proxmox.com upload
--product
$(2) --dist bullseye
20 ifeq ($(BUILD_TARGET
), pve
)
22 else ifeq ($(BUILD_TARGET
), pmg
)
32 $(CARGO
) build
$(CARGO_BUILD_ARGS
) -p
$@
-rs
37 echo system
>build
/rust-toolchain
38 cp
-a .
/Cargo.toml .
/build
39 cp
-a .
/common .
/build
40 cp
-a .
/pve-rs .
/build
41 cp
-a .
/pmg-rs .
/build
42 # Replace the symlinks with copies of the common code in pve/pmg:
43 cd build
; for i in pve pmg
; do \
44 rm .
/$$i-rs
/common
; \
45 mkdir .
/$$i-rs
/common
; \
46 cp
-R .
/common
/src .
/$$i-rs
/common
/src
; \
48 # So the common packages end up in ./build, rather than ./build/common
49 mv .
/build
/common
/pkg .
/build
/common-pkg
52 cd .
/build
/pve-rs
&& dpkg-buildpackage
-b
-uc
-us
56 cd .
/build
/pmg-rs
&& dpkg-buildpackage
-b
-uc
-us
60 cd .
/build
/common-pkg
&& dpkg-buildpackage
-b
-uc
-us
64 $(call upload_template
,pve
,pve
)
66 $(call upload_template
,pmg
,pmg
)
68 # need to put into variable to ensure comma isn't interpreted as param separator on call
70 common-upload
: common-deb
71 $(call upload_template
,proxmox
,$(common_target
))
76 rm -rf .
/build .
/PVE .
/PMG .
/pve-deb .
/pmg-deb .
/common-deb