forked from proxmox/pve-zsync
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
69 lines (52 loc) · 1.57 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
include /usr/share/dpkg/pkg-info.mk
PACKAGE=pve-zsync
DESTDIR=
SBINDIR=$(DESTDIR)/usr/sbin
MAN8DIR=$(DESTDIR)/usr/share/man/man8
DOCDIR=$(DESTDIR)/usr/share/doc/$(PACKAGE)
WORKDIR=$(DESTDIR)/var/lib/pve-zsync
BUILDDIR ?= $(PACKAGE)-$(DEB_VERSION_UPSTREAM)
GITVERSION:=$(shell git rev-parse HEAD)
DEB=$(PACKAGE)_$(DEB_VERSION_UPSTREAM_REVISION)_all.deb
DSC=$(PACKAGE)_$(DEB_VERSION_UPSTREAM_REVISION).dsc
all:
.PHONY: dinstall
dinstall: deb
dpkg -i $(DEB)
pve-zsync.8: pve-zsync
./pve-zsync printpod | pod2man -c "Proxmox Documentation" -s 8 -r $(DEB_VERSION_UPSTREAM) -n pve-zsync - pve-zsync.8
.PHONY: install
install: pve-zsync.8
install -d $(SBINDIR)
install -m 0755 pve-zsync $(SBINDIR)/pve-zsync
install -d $(WORKDIR)
install -d $(MAN8DIR)
install -m 0644 pve-zsync.8 $(MAN8DIR)/pve-zsync.8
install -d $(DOCDIR)
$(BUILDDIR):
rm -rf [email protected] $@
rsync -a * [email protected]
echo "git clone git://git.proxmox.com/git/pve-zsync.git\\ngit checkout $(GITVERSION)" > [email protected]/debian/SOURCE
mv [email protected] $@
.PHONY: deb
deb: $(DEB)
$(DEB): $(BUILDDIR)
cd $(BUILDDIR); dpkg-buildpackage -b -us -uc
lintian $(DEB)
.PHONY: dsc
dsc: $(DSC)
$(DSC):$(BUILDDIR)
cd $(BUILDDIR); dpkg-buildpackage -S -us -uc -d
lintian $(DSC)
sbuild: $(DSC)
sbuild $(DSC)
.PHONY: clean
clean:
rm -rf $(PACKAGE)-[0-9]*/ *.deb *.dsc $(PACKAGE)*.tar.?z *.build *.buildinfo *.changes
find . -name '*~' -exec rm {} ';'
.PHONY: distclean
distclean: clean
.PHONY: upload
upload: UPLOAD_DIST ?= $(DEB_DISTRIBUTION)
upload: $(DEB)
tar cf - $(DEB) | ssh [email protected] upload --product pve --dist $(UPLOAD_DIST)