]>
Commit | Line | Data |
---|---|---|
fe0e04c6 | 1 | PACKAGE=proxmox-backup |
209bb433 | 2 | PKGVER=0.1 |
de779814 DM |
3 | PKGREL=1 |
4 | ||
209bb433 DM |
5 | ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH) |
6 | GITVERSION:=$(shell git rev-parse HEAD) | |
7 | ||
4b26195c DM |
8 | export PROXMOX_PKG_VERSION=${PKGVER} |
9 | export PROXMOX_PKG_RELEASE=${PKGREL} | |
10 | export PROXMOX_PKG_REPOID=${GITVERSION} | |
209bb433 DM |
11 | |
12 | DEB=${PACKAGE}_${PKGVER}-${PKGREL}_${ARCH}.deb | |
13 | ||
14 | DESTDIR= | |
de779814 | 15 | |
4b26195c DM |
16 | all: |
17 | cargo build | |
de779814 | 18 | |
f7dd683b DM |
19 | test: |
20 | cargo test | |
21 | ||
209bb433 DM |
22 | .PHONY: deb |
23 | deb ${DEB}: | |
de779814 DM |
24 | rm -rf build |
25 | # build here to cache results | |
26 | cargo build --release | |
5c7a1b15 | 27 | make -C www |
ebc9a692 | 28 | rsync -a debian Cargo.lock Cargo.toml src www target build |
de779814 DM |
29 | cd build; dpkg-buildpackage -b -us -uc |
30 | ||
31 | ||
209bb433 | 32 | distclean: clean |
de779814 DM |
33 | |
34 | clean: | |
4b26195c | 35 | make -C www clean |
de779814 | 36 | cargo clean |
d3cb69c4 DM |
37 | rm -rf *.deb *.buildinfo *.changes build |
38 | find . -name '*~' -exec rm {} ';' | |
39 | ||
209bb433 DM |
40 | .PHONY: dinstall |
41 | dinstall: ${DEB} | |
42 | dpkg -i ${DEB} |