]>
Commit | Line | Data |
---|---|---|
1 | RELEASE=5.2 | |
2 | ||
3 | VERSION=1.7 | |
4 | PACKAGE=pve-zsync | |
5 | PKGREL=2 | |
6 | ||
7 | DESTDIR= | |
8 | SBINDIR=${DESTDIR}/usr/sbin | |
9 | MAN8DIR=${DESTDIR}/usr/share/man/man8 | |
10 | DOCDIR=${DESTDIR}/usr/share/doc/${PACKAGE} | |
11 | WORKDIR=${DESTDIR}/var/lib/pve-zsync | |
12 | ||
13 | BUILDDIR=build | |
14 | ||
15 | ARCH=all | |
16 | GITVERSION:=$(shell git rev-parse HEAD) | |
17 | ||
18 | DEB=${PACKAGE}_${VERSION}-${PKGREL}_${ARCH}.deb | |
19 | ||
20 | all: | |
21 | ||
22 | .PHONY: dinstall | |
23 | dinstall: deb | |
24 | dpkg -i ${DEB} | |
25 | ||
26 | pve-zsync.8: pve-zsync | |
27 | ./pve-zsync printpod | pod2man -c "Proxmox Documentation" -s 8 -r ${RELEASE} -n pve-zsync - pve-zsync.8 | |
28 | ||
29 | .PHONY: install | |
30 | install: pve-zsync.8 | |
31 | install -d ${SBINDIR} | |
32 | install -m 0755 pve-zsync ${SBINDIR}/pve-zsync | |
33 | install -d ${WORKDIR} | |
34 | install -d ${MAN8DIR} | |
35 | install -m 0644 pve-zsync.8 ${MAN8DIR}/pve-zsync.8 | |
36 | install -d ${DOCDIR} | |
37 | echo "git clone git://git.proxmox.com/git/pve-zsync.git\\ngit checkout ${GITVERSION}" > ${DOCDIR}/SOURCE | |
38 | ||
39 | .PHONY: deb | |
40 | deb: ${DEB} | |
41 | ${DEB}: | |
42 | rm -rf ${BUILDDIR} | |
43 | rsync -a * build | |
44 | cd build; dpkg-buildpackage -b -us -uc | |
45 | lintian ${DEB} | |
46 | ||
47 | .PHONY: clean | |
48 | clean: | |
49 | rm -rf ${BUILDDIR} *.deb *.buildinfo *.changes | |
50 | find . -name '*~' -exec rm {} ';' | |
51 | ||
52 | .PHONY: distclean | |
53 | distclean: clean | |
54 | ||
55 | ||
56 | .PHONY: upload | |
57 | upload: ${DEB} | |
58 | tar cf - ${DEB} | ssh repoman@repo.proxmox.com upload --product pve --dist stretch |