1 include /usr
/share
/dpkg
/default.mk
3 PACKAGE
=libproxmox-backup-qemu0
5 ARCH
:=$(shell dpkg-architecture
-qDEB_BUILD_ARCH
)
6 export GITVERSION
:=$(shell git rev-parse HEAD
)
8 MAIN_DEB
=${PACKAGE}_
${DEB_VERSION}_
${ARCH}.deb
10 ${PACKAGE}-dev_
${DEB_VERSION}_
${ARCH}.deb \
11 ${PACKAGE}-dbgsym_
${DEB_VERSION}_
${ARCH}.deb
12 DEBS
=$(MAIN_DEB
) $(OTHER_DEBS
)
16 ifeq ($(BUILD_MODE
), release
)
17 CARGO_BUILD_ARGS
+= --release
21 ifneq ($(BUILD_MODE
), skip
)
22 cargo build
$(CARGO_BUILD_ARGS
)
23 diff
-up current-api.h proxmox-backup-qemu.h
26 # always re-create this dir
27 # but also copy the local target/ dir as a build-cache
32 diff
-I
'PROXMOX_BACKUP_QEMU_VERSION' -up current-api.h proxmox-backup-qemu.h
33 rsync
-a debian Makefile Cargo.toml Cargo.lock build.rs proxmox-backup-qemu.h src target current-api.h build
/
36 install: target
/release
/libproxmox_backup_qemu.so
37 install -D
-m
0755 target
/release
/libproxmox_backup_qemu.so
${DESTDIR}/usr
/lib
//libproxmox_backup_qemu.so
.0
38 cd
${DESTDIR}/usr
/lib
/; ls
*; ln
-s libproxmox_backup_qemu.so
.0 libproxmox_backup_qemu.so
42 $(OTHER_DEBS
): $(MAIN_DEB
)
44 cd build
; dpkg-buildpackage
-b
-us
-uc
--no-pre-clean
47 simpletest
: simpletest.c proxmox-backup-qemu.h
48 gcc simpletest.c
-o simpletest
-lc
-Wl
,-rpath
=.
/target
/$(BUILD_MODE
) -L .
/target
/$(BUILD_MODE
) -l proxmox_backup_qemu
54 rm -rf
*.deb
*.dsc
*.
tar.gz
*.buildinfo
*.changes Cargo.lock proxmox-backup-qemu.h build
55 find .
-name
'*~' -exec
rm {} ';'
63 # check if working directory is clean
64 git diff
--exit-code
--stat
&& git diff
--exit-code
--stat
--staged
65 tar cf
- ${DEBS} | ssh
-X repoman@repo.proxmox.com upload
--product pve
--dist bullseye