]> git.proxmox.com Git - pve-manager-legacy.git/blame - Makefile
bump version to 7.4-4
[pve-manager-legacy.git] / Makefile
CommitLineData
bcef9bde
TL
1include /usr/share/dpkg/pkg-info.mk
2include /usr/share/dpkg/architecture.mk
c3731ed2
DM
3include defines.mk
4
b597d23d
TL
5export PVERELEASE=${DEB_VERSION_UPSTREAM}
6export VERSION=${DEB_VERSION_UPSTREAM_REVISION}
593cd555 7
c3731ed2
DM
8DESTDIR=
9
8f014598 10SUBDIRS = aplinfo PVE bin www services configs network-hooks test
c3731ed2 11
85e14dcd 12GITVERSION:=$(shell git rev-parse HEAD)
eceb9171 13
71bef866
FG
14# possibly set via debian/rules(.env)
15REPOID?=$(shell git rev-parse --short=8 HEAD)
16
b597d23d 17DEB=${PACKAGE}_${VERSION}_${DEB_BUILD_ARCH}.deb
c3731ed2
DM
18
19all: ${SUBDIRS}
2ad78c97 20 set -e && for i in ${SUBDIRS}; do ${MAKE} -C $$i; done
c3731ed2 21
946a2dad 22.PHONY: check
a5bc0ec6 23check: bin test www
946a2dad 24 ${MAKE} -C bin check
8f014598 25 ${MAKE} -C test check
a5bc0ec6 26 ${MAKE} -C www check
8372a03e 27
c3731ed2
DM
28.PHONY: dinstall
29dinstall: ${DEB}
30 dpkg -i ${DEB}
31
8d676c8a
WB
32.PHONY: deb
33deb: $(DEB)
34$(DEB):
c3731ed2
DM
35 rm -rf dest
36 mkdir dest
dd147b56 37 rsync -a * dest
dd147b56 38 echo "git clone git://git.proxmox.com/git/pve-manager.git\\ngit checkout ${GITVERSION}" > dest/debian/SOURCE
71bef866 39 echo "REPOID_GENERATED=${REPOID}" > dest/debian/rules.env
f86235f1 40 cd dest; dpkg-buildpackage -b -us -uc
ee07dab1 41 lintian ${DEB}
c3731ed2
DM
42
43.PHONY: upload
8372a03e 44upload: ${DEB} check
24def72f
TL
45 # check if working directory is clean
46 git diff --exit-code --stat && git diff --exit-code --stat --staged
4619a943 47 tar cf - ${DEB} | ssh -X repoman@repo.proxmox.com upload --product pve --dist bullseye
c3731ed2 48
c3731ed2 49.PHONY: install
bf25a4c1 50install: vzdump-hook-script.pl
4b73743a 51 install -d -m 0700 -o www-data -g www-data ${DESTDIR}/var/log/pveproxy
99118d54 52 install -d ${DOCDIR}/examples
c3731ed2
DM
53 install -d ${DESTDIR}/var/lib/${PACKAGE}
54 install -d ${DESTDIR}/var/lib/vz/images
55 install -d ${DESTDIR}/var/lib/vz/template/cache
56 install -d ${DESTDIR}/var/lib/vz/template/iso
99118d54 57 install -m 0644 vzdump-hook-script.pl ${DOCDIR}/examples/vzdump-hook-script.pl
b282dec2 58 install -m 0644 spice-example-sh ${DOCDIR}/examples/spice-example-sh
c3731ed2
DM
59 set -e && for i in ${SUBDIRS}; do ${MAKE} -C $$i $@; done
60
61.PHONY: distclean
62distclean: clean
c3731ed2
DM
63
64.PHONY: clean
65clean:
66 set -e && for i in ${SUBDIRS}; do ${MAKE} -C $$i $@; done
67 find . -name '*~' -exec rm {} ';'
614dfac4 68 rm -rf dest country.dat *.deb *.buildinfo *.changes ca-tmp