]> git.proxmox.com Git - pve-manager.git/blame_incremental - Makefile
buildsys: use correct DEB_HOST_ARCH
[pve-manager.git] / Makefile
... / ...
CommitLineData
1include /usr/share/dpkg/pkg-info.mk
2include /usr/share/dpkg/architecture.mk
3include defines.mk
4
5export PVERELEASE=$(DEB_VERSION_UPSTREAM)
6export VERSION=$(DEB_VERSION_UPSTREAM_REVISION)
7
8DESTDIR=
9
10SUBDIRS = aplinfo PVE bin www services configs network-hooks test
11
12GITVERSION:=$(shell git rev-parse --short=16 HEAD)
13
14DEB=$(PACKAGE)_$(VERSION)_$(DEB_HOST_ARCH).deb
15
16all: $(SUBDIRS)
17 set -e && for i in $(SUBDIRS); do $(MAKE) -C $$i; done
18
19.PHONY: check
20check: bin test www
21 $(MAKE) -C bin check
22 $(MAKE) -C test check
23 $(MAKE) -C www check
24
25.PHONY: dinstall
26dinstall: $(DEB)
27 dpkg -i $(DEB)
28
29.PHONY: deb
30deb: $(DEB)
31$(DEB):
32 rm -rf dest
33 mkdir dest
34 rsync -a * dest
35 echo "git clone git://git.proxmox.com/git/pve-manager.git\\ngit checkout $(GITVERSION)" > dest/debian/SOURCE
36 echo "REPOID_GENERATED=$(GITVERSION)" > dest/debian/rules.env
37 cd dest; dpkg-buildpackage -b -us -uc
38 lintian $(DEB)
39
40.PHONY: upload
41upload: $(DEB) check
42 # check if working directory is clean
43 git diff --exit-code --stat && git diff --exit-code --stat --staged
44 tar cf - $(DEB) | ssh -X repoman@repo.proxmox.com upload --product pve --dist bullseye
45
46.PHONY: install
47install: vzdump-hook-script.pl
48 install -d -m 0700 -o www-data -g www-data $(DESTDIR)/var/log/pveproxy
49 install -d $(DOCDIR)/examples
50 install -d $(DESTDIR)/var/lib/$(PACKAGE)
51 install -d $(DESTDIR)/var/lib/vz/images
52 install -d $(DESTDIR)/var/lib/vz/template/cache
53 install -d $(DESTDIR)/var/lib/vz/template/iso
54 install -m 0644 vzdump-hook-script.pl $(DOCDIR)/examples/vzdump-hook-script.pl
55 install -m 0644 spice-example-sh $(DOCDIR)/examples/spice-example-sh
56 set -e && for i in $(SUBDIRS); do $(MAKE) -C $$i $@; done
57
58.PHONY: distclean
59distclean: clean
60
61.PHONY: clean
62clean:
63 set -e && for i in $(SUBDIRS); do $(MAKE) -C $$i $@; done
64 rm -rf dest country.dat *.deb *.buildinfo *.changes ca-tmp