]> git.proxmox.com Git - pve-zsync.git/blob - Makefile
fix #1301 skip if mp has no backup flag.
[pve-zsync.git] / Makefile
1 RELEASE=4.2
2
3 VERSION=1.6
4 PACKAGE=pve-zsync
5 PKGREL=13
6
7 DESTDIR=
8 PREFIX=/usr
9 BINDIR=${PREFIX}/bin
10 SBINDIR=${PREFIX}/sbin
11 MANDIR=${PREFIX}/share/man
12 DOCDIR=${PREFIX}/share/doc/${PACKAGE}
13 PODDIR=${DOCDIR}/pod
14 MAN1DIR=${MANDIR}/man8/
15
16 #ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
17 ARCH=all
18 GITVERSION:=$(shell cat .git/refs/heads/master)
19
20 DEB=${PACKAGE}_${VERSION}-${PKGREL}_${ARCH}.deb
21
22 all: ${DEB}
23
24 .PHONY: dinstall
25 dinstall: deb
26 dpkg -i ${DEB}
27
28 %.8.gz: %.8.man
29 rm -f $@
30 gzip -n pve-zsync.8.man -c9 >$@
31
32 pve-zsync.8.man: pve-zsync
33 pod2man -c "Proxmox Documentation" -s 8 -r ${RELEASE} -n pve-zsync pve-zsync pve-zsync.8.man
34
35 .PHONY: install
36 install: pve-zsync.8.man pve-zsync.8.gz
37 install -d ${DESTDIR}${SBINDIR}
38 install -m 0755 pve-zsync ${DESTDIR}${SBINDIR}
39 install -d ${DESTDIR}/usr/share/man/man8
40 install -d ${DESTDIR}${PODDIR}
41 install -m 0644 pve-zsync.8.gz ${DESTDIR}/usr/share/man/man8/
42
43 .PHONY: deb
44 deb: ${DEB}
45 ${DEB}:
46 rm -rf debian
47 mkdir debian
48 install -d debian/var/lib/pve-zsync
49 make DESTDIR=${CURDIR}/debian install
50 install -d -m 0755 debian/DEBIAN
51 sed -e s/@@VERSION@@/${VERSION}/ -e s/@@PKGRELEASE@@/${PKGREL}/ -e s/@@ARCH@@/${ARCH}/ <control.in >debian/DEBIAN/control
52 install -D -m 0644 copyright debian/${DOCDIR}/copyright
53 install -m 0644 changelog.Debian debian/${DOCDIR}/
54 gzip -n -9 debian/${DOCDIR}/changelog.Debian
55 echo "git clone git://git.proxmox.com/git/pve-storage.git\\ngit checkout ${GITVERSION}" > debian/${DOCDIR}/SOURCE
56 fakeroot dpkg-deb --build debian
57 mv debian.deb ${DEB}
58 lintian ${DEB}
59 rm -rf debian
60
61 .PHONY: clean
62 clean:
63 rm -rf debian *.deb ${PACKAGE}-*.tar.gz dist *.8.man *.8.gz
64 find . -name '*~' -exec rm {} ';'
65
66 .PHONY: distclean
67 distclean: clean
68
69
70 .PHONY: upload
71 upload: ${DEB}
72 tar cf - ${DEB} | ssh repoman@repo.proxmox.com upload