]> git.proxmox.com Git - pve-zsync.git/blob - Makefile
makefile: convert to use simple parenthesis
[pve-zsync.git] / Makefile
1 include /usr/share/dpkg/pkg-info.mk
2
3 PACKAGE=pve-zsync
4
5 DESTDIR=
6 SBINDIR=$(DESTDIR)/usr/sbin
7 MAN8DIR=$(DESTDIR)/usr/share/man/man8
8 DOCDIR=$(DESTDIR)/usr/share/doc/$(PACKAGE)
9 WORKDIR=$(DESTDIR)/var/lib/pve-zsync
10
11 BUILDDIR ?= $(PACKAGE)-$(DEB_VERSION_UPSTREAM)
12
13 GITVERSION:=$(shell git rev-parse HEAD)
14
15 DEB=$(PACKAGE)_$(DEB_VERSION_UPSTREAM_REVISION)_all.deb
16 DSC=$(PACKAGE)_$(DEB_VERSION_UPSTREAM_REVISION).dsc
17
18 all:
19
20 .PHONY: dinstall
21 dinstall: deb
22 dpkg -i $(DEB)
23
24 pve-zsync.8: pve-zsync
25 ./pve-zsync printpod | pod2man -c "Proxmox Documentation" -s 8 -r $(DEB_VERSION_UPSTREAM) -n pve-zsync - pve-zsync.8
26
27 .PHONY: install
28 install: pve-zsync.8
29 install -d $(SBINDIR)
30 install -m 0755 pve-zsync $(SBINDIR)/pve-zsync
31 install -d $(WORKDIR)
32 install -d $(MAN8DIR)
33 install -m 0644 pve-zsync.8 $(MAN8DIR)/pve-zsync.8
34 install -d $(DOCDIR)
35
36 $(BUILDDIR):
37 rm -rf $(BUILDDIR)
38 rsync -a * $(BUILDDIR)
39 echo "git clone git://git.proxmox.com/git/dab.git\\ngit checkout $(GITVERSION)" > $(BUILDDIR)/debian/SOURCE
40
41 .PHONY: deb
42 deb: $(DEB)
43 $(DEB): $(BUILDDIR)
44 cd $(BUILDDIR); dpkg-buildpackage -b -us -uc
45 lintian $(DEB)
46
47 .PHONY: dsc
48 dsc: $(DSC)
49 $(DSC):$(BUILDDIR)
50 cd $(BUILDDIR); dpkg-buildpackage -S -us -uc -d -nc
51 lintian $(DSC)
52
53 .PHONY: clean
54 clean:
55 rm -rf $(BUILDDIR) *.deb *.dsc $(PACKAGE)*.tar.gz *.buildinfo *.changes
56 find . -name '*~' -exec rm {} ';'
57
58 .PHONY: distclean
59 distclean: clean
60
61
62 .PHONY: upload
63 upload: $(DEB)
64 tar cf - $(DEB) | ssh repoman@repo.proxmox.com upload --product pve --dist bullseye