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