]> git.proxmox.com Git - pve-manager.git/blame - Makefile
d/control: bump versioned proxmox-widget-toolkit dependency
[pve-manager.git] / Makefile
CommitLineData
a74ba607
TL
1include /usr/share/dpkg/pkg-info.mk
2include /usr/share/dpkg/architecture.mk
beb651ee
DM
3include defines.mk
4
180a86d3
TL
5export PVERELEASE=${DEB_VERSION_UPSTREAM}
6export VERSION=${DEB_VERSION_UPSTREAM_REVISION}
7a961fde 7
beb651ee
DM
8DESTDIR=
9
73ed0af1 10SUBDIRS = aplinfo PVE bin www services configs network-hooks test
beb651ee 11
80b36896 12GITVERSION:=$(shell git rev-parse HEAD)
46c17bd2 13
fb992042
FG
14# possibly set via debian/rules(.env)
15REPOID?=$(shell git rev-parse --short=8 HEAD)
16
180a86d3 17DEB=${PACKAGE}_${VERSION}_${DEB_BUILD_ARCH}.deb
beb651ee
DM
18
19all: ${SUBDIRS}
1b9008bf 20 set -e && for i in ${SUBDIRS}; do ${MAKE} -C $$i; done
beb651ee 21
7f4d4526 22.PHONY: check
c15d821e 23check: bin test www
7f4d4526 24 ${MAKE} -C bin check
73ed0af1 25 ${MAKE} -C test check
c15d821e 26 ${MAKE} -C www check
53f13052 27
beb651ee
DM
28.PHONY: dinstall
29dinstall: ${DEB}
30 dpkg -i ${DEB}
31
c27e8e49
WB
32.PHONY: deb
33deb: $(DEB)
34$(DEB):
beb651ee
DM
35 rm -rf dest
36 mkdir dest
ff9c5f01 37 rsync -a * dest
ff9c5f01 38 echo "git clone git://git.proxmox.com/git/pve-manager.git\\ngit checkout ${GITVERSION}" > dest/debian/SOURCE
fb992042 39 echo "REPOID_GENERATED=${REPOID}" > dest/debian/rules.env
8c200508 40 cd dest; dpkg-buildpackage -b -us -uc
46c17bd2 41 # supress lintian error: statically-linked-binary usr/bin/pvemailforward
85fd9b52 42 lintian -X binaries ${DEB}
beb651ee
DM
43
44.PHONY: upload
53f13052 45upload: ${DEB} check
de79fddd
TL
46 # check if working directory is clean
47 git diff --exit-code --stat && git diff --exit-code --stat --staged
8b1b7d43 48 tar cf - ${DEB} | ssh -X repoman@repo.proxmox.com upload --product pve --dist buster
beb651ee 49
beb651ee 50.PHONY: install
6ebc0106 51install: vzdump-hook-script.pl
3dad8dc7 52 install -d -m 0700 -o www-data -g www-data ${DESTDIR}/var/log/pveproxy
9ff497a9 53 install -d ${DOCDIR}/examples
beb651ee
DM
54 install -d ${DESTDIR}/var/lib/${PACKAGE}
55 install -d ${DESTDIR}/var/lib/vz/images
56 install -d ${DESTDIR}/var/lib/vz/template/cache
57 install -d ${DESTDIR}/var/lib/vz/template/iso
58 install -d ${DESTDIR}/var/lib/vz/template/qemu
9ff497a9 59 install -m 0644 vzdump-hook-script.pl ${DOCDIR}/examples/vzdump-hook-script.pl
072188dc 60 install -m 0644 spice-example-sh ${DOCDIR}/examples/spice-example-sh
beb651ee
DM
61 set -e && for i in ${SUBDIRS}; do ${MAKE} -C $$i $@; done
62
63.PHONY: distclean
64distclean: clean
beb651ee
DM
65
66.PHONY: clean
67clean:
68 set -e && for i in ${SUBDIRS}; do ${MAKE} -C $$i $@; done
69 find . -name '*~' -exec rm {} ';'
45868655 70 rm -rf dest country.dat *.deb *.buildinfo *.changes ca-tmp