]> git.proxmox.com Git - pve-storage.git/blobdiff - Makefile
PVE::ReplicationTools::sync_guest - use integer compare for lastsync
[pve-storage.git] / Makefile
index adb911a6963e696d2f9b4608a8e136976bb016ae..da6cc9d61b3f1baa7dc2827d333581a4f86f738d 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,6 @@
-RELEASE=4.2
-
-VERSION=4.0
+VERSION=5.0
 PACKAGE=libpve-storage-perl
-PKGREL=61
+PKGREL=4
 
 DESTDIR=
 PREFIX=/usr
@@ -12,6 +10,8 @@ MANDIR=${PREFIX}/share/man
 DOCDIR=${PREFIX}/share/doc/${PACKAGE}
 MAN1DIR=${MANDIR}/man1/
 BASHCOMPLDIR=${PREFIX}/share/bash-completion/completions/
+CRONDIR=/etc/cron.d
+CRONREPLICA=${CRONDIR}/pve-replica
 
 export PERLDIR=${PREFIX}/share/perl5
 
@@ -35,18 +35,29 @@ pvesm.bash-completion:
        perl -I. -T -e "use PVE::CLI::pvesm; PVE::CLI::pvesm->generate_bash_completions();" >$@.tmp
        mv $@.tmp $@
 
+pvesr.bash-completion:
+       perl -I. -T -e "use PVE::CLI::pvesr; PVE::CLI::pvesr->generate_bash_completions();" >$@.tmp
+       mv $@.tmp $@
+
 .PHONY: install
-install: pvesm.1 pvesm.bash-completion
+install: pvesm.1 pvesm.bash-completion pvesr.bash-completion
        install -d ${DESTDIR}${SBINDIR}
        install -m 0755 pvesm ${DESTDIR}${SBINDIR}
+       install -m 0755 pvesr ${DESTDIR}${SBINDIR}
+       install -d ${DESTDIR}${CRONDIR}
+       install -m 0644 pve-replica ${DESTDIR}${CRONREPLICA}
        make -C PVE install
+       install -d ${DESTDIR}/var/lib/pve-replica
        install -d ${DESTDIR}/usr/share/man/man1
        install -m 0644 pvesm.1 ${DESTDIR}/usr/share/man/man1/
-       gzip -9 ${DESTDIR}/usr/share/man/man1/pvesm.1
+       gzip -9 -n ${DESTDIR}/usr/share/man/man1/pvesm.1
        install -m 0644 -D pvesm.bash-completion ${DESTDIR}${BASHCOMPLDIR}/pvesm
+       install -m 0644 -D pvesr.bash-completion ${DESTDIR}${BASHCOMPLDIR}/pverepm
+
 
-.PHONY: deb ${DEB}
-deb ${DEB}:
+.PHONY: deb
+deb: ${DEB}
+${DEB}:
        rm -rf debian
        mkdir debian
        make DESTDIR=${CURDIR}/debian install
@@ -56,9 +67,10 @@ deb ${DEB}:
        install -D -m 0644 copyright debian/${DOCDIR}/copyright
        install -m 0644 changelog.Debian debian/${DOCDIR}/
        install -m 0644 triggers debian/DEBIAN
-       gzip -9 debian/${DOCDIR}/changelog.Debian
+       install -m 0644 conffiles debian/DEBIAN
+       gzip -9 -n debian/${DOCDIR}/changelog.Debian
        echo "git clone git://git.proxmox.com/git/pve-storage.git\\ngit checkout ${GITVERSION}" > debian/${DOCDIR}/SOURCE
-       dpkg-deb --build debian 
+       fakeroot dpkg-deb --build debian
        mv debian.deb ${DEB}
        rm -rf debian
        lintian ${DEB}
@@ -66,7 +78,7 @@ deb ${DEB}:
 .PHONY: clean
 clean:
        make cleanup-docgen
-       rm -rf debian *.deb ${PACKAGE}-*.tar.gz dist *.1 *.tmp pvesm.bash-completion
+       rm -rf debian *.deb ${PACKAGE}-*.tar.gz dist *.1 *.tmp pvesm.bash-completion pvesr.bash-completion
        find . -name '*~' -exec rm {} ';'
 
 .PHONY: distclean
@@ -75,5 +87,5 @@ distclean: clean
 
 .PHONY: upload
 upload: ${DEB}
-       tar cf - ${DEB} | ssh repoman@repo.proxmox.com upload
+       tar cf - ${DEB} | ssh repoman@repo.proxmox.com -- upload --product pve --dist stretch