]> git.proxmox.com Git - pmg-log-tracker.git/blame - Makefile
add testcase for accepted/blocked/quarantined mail
[pmg-log-tracker.git] / Makefile
CommitLineData
e5f30e2e
TL
1include /usr/share/dpkg/pkg-info.mk
2include /usr/share/dpkg/architecture.mk
61b8223f 3
e5f30e2e 4PACKAGE=pmg-log-tracker
61b8223f 5
e5f30e2e 6GITVERSION:=$(shell git rev-parse HEAD)
61b8223f 7
e5f30e2e 8DEB=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_${DEB_BUILD_ARCH}.deb
0594496c 9DSC=rust-${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}.dsc
839951d6 10
e029c60d
WB
11ifeq ($(BUILD_MODE), release)
12CARGO_BUILD_ARGS += --release
13COMPILEDIR := target/release
14else
15COMPILEDIR := target/debug
16endif
839951d6 17
e029c60d
WB
18all: cargo-build $(SUBDIRS)
19
20.PHONY: cargo-build
21cargo-build:
22 cargo build $(CARGO_BUILD_ARGS)
23
24.PHONY: build
25build:
26 rm -rf build
27 debcargo package \
28 --config debian/debcargo.toml \
29 --changelog-ready \
30 --no-overlay-write-back \
31 --directory build \
32 $(PACKAGE) \
33 $(shell dpkg-parsechangelog -l debian/changelog -SVersion | sed -e 's/-.*//')
34 rm build/Cargo.lock
35 find build/debian -name "*.hint" -delete
839951d6 36
61b8223f 37.PHONY: deb
e029c60d
WB
38deb: $(DEB)
39$(DEB): build
40 cd build; dpkg-buildpackage -b -us -uc --no-pre-clean --build-profiles=nodoc
41 lintian $(DEB)
61b8223f 42
e5f30e2e 43.PHONY: dsc
e029c60d
WB
44dsc: $(DSC)
45$(DSC): build
46 cd build; dpkg-buildpackage -S -us -uc -d -nc
47 lintian $(DSC)
e5f30e2e 48
61b8223f
DM
49.PHONY: dinstall
50dinstall: ${DEB}
51 dpkg -i ${DEB}
52
53.PHONY: upload
54upload: ${DEB} ${DBG_DEB}
670f0640 55 tar cf - ${DEB} ${DBG_DEB}| ssh -X repoman@repo.proxmox.com -- upload --product pmg --dist buster --arch ${DEB_BUILD_ARCH}
839951d6 56
c41a37e8
DM
57.PHONY: distclean
58distclean: clean
839951d6 59
c41a37e8
DM
60.PHONY: clean
61clean:
813c4657 62 rm -rf *.deb ${PACKAGE}-* *.buildinfo *.changes *.dsc rust-${PACKAGE}_*.tar.?z build/
c41a37e8 63 find . -name '*~' -exec rm {} ';'