]> git.proxmox.com Git - qemu-server.git/blobdiff - Makefile
use safe_string_ne for trunks
[qemu-server.git] / Makefile
index 7041125bce5cde9b8d93cfb6c00eda611a60c516..2713e6822302ffbcccbc4b679e462fc501b88fb7 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,8 @@
-RELEASE=4.0
+RELEASE=4.1
 
 VERSION=4.0
 PACKAGE=qemu-server
-PKGREL=4
+PKGREL=47
 
 CFLAGS= -O2 -Werror -Wall -Wtype-limits -Wl,-z,relro 
 
@@ -17,6 +17,7 @@ MANDIR=${PREFIX}/share/man
 DOCDIR=${PREFIX}/share/doc
 PODDIR=${PREFIX}/share/doc/${PACKAGE}/pod
 MAN1DIR=${MANDIR}/man1/
+BASHCOMPLDIR=${PREFIX}/share/bash-completion/completions/
 export PERLDIR=${PREFIX}/share/perl5
 PERLINCDIR=${PERLDIR}/asm-x86_64
 
@@ -54,21 +55,30 @@ sparsecp: sparsecp.c utils.c
 %.1.pod: %
        podselect $*>$@
 
-qm.1.pod: qm PVE/QemuServer.pm
-       perl -I. ./qm printmanpod >$@
+qm.1.pod: PVE/CLI/qm.pm PVE/QemuServer.pm
+       perl -I. -T -e "use PVE::CLI::qm; PVE::CLI::qm->generate_pod_manpage();" >$@.tmp
+       mv $@.tmp $@
 
-qmrestore.1.pod: qmrestore
-       perl -I. ./qmrestore printmanpod >$@
+qm.bash-completion:
+       perl -I. -T -e "use PVE::CLI::qm; PVE::CLI::qm->generate_bash_completions();" >$@.tmp
+       mv $@.tmp $@
+
+qmrestore.1.pod: PVE/CLI/qmrestore.pm
+       perl -I. -T -e "use PVE::CLI::qmrestore; PVE::CLI::qmrestore->generate_pod_manpage();" >$@.tmp
+       mv $@.tmp $@
+
+qmrestore.bash-completion:
+       perl -I. -T -e "use PVE::CLI::qmrestore; PVE::CLI::qmrestore->generate_bash_completions();" >$@.tmp
+       mv $@.tmp $@
 
 vm.conf.5.pod: gen-vmconf-pod.pl PVE/QemuServer.pm 
        perl -I. ./gen-vmconf-pod.pl >$@
 
-PKGSOURCES=qm qm.1.gz qm.1.pod qmrestore qmrestore.1.pod qmrestore.1.gz qmextract sparsecp vmtar control vm.conf.5.pod vm.conf.5.gz
+PKGSOURCES=qm qm.1.gz qm.1.pod qmrestore qmrestore.1.pod qmrestore.1.gz qmextract sparsecp vmtar control vm.conf.5.pod vm.conf.5.gz qm.bash-completion qmrestore.bash-completion
 
 .PHONY: install
 install: ${PKGSOURCES}
        install -d ${DESTDIR}/${SBINDIR}
-       install -d ${DESTDIR}/etc/${PACKAGE}
        install -d ${DESTDIR}${LIBDIR}
        install -d ${DESTDIR}${VARLIBDIR}
        install -d ${DESTDIR}${PODDIR}
@@ -77,10 +87,13 @@ install: ${PKGSOURCES}
        install -d ${DESTDIR}/usr/share/${PACKAGE}
        install -m 0644 pve-usb.cfg ${DESTDIR}/usr/share/${PACKAGE}
        install -m 0644 pve-q35.cfg ${DESTDIR}/usr/share/${PACKAGE}
+       install -m 0644 -D qm.bash-completion ${DESTDIR}/${BASHCOMPLDIR}/qm
+       install -m 0644 -D qmrestore.bash-completion ${DESTDIR}/${BASHCOMPLDIR}/qmrestore
        make -C PVE install
        install -m 0755 qm ${DESTDIR}${SBINDIR}
        install -m 0755 qmrestore ${DESTDIR}${SBINDIR}
        install -m 0755 pve-bridge ${DESTDIR}${VARLIBDIR}/pve-bridge
+       install -m 0755 pve-bridge-hotplug ${DESTDIR}${VARLIBDIR}/pve-bridge-hotplug
        install -m 0755 pve-bridgedown ${DESTDIR}${VARLIBDIR}/pve-bridgedown
        install -s -m 0755 vmtar ${DESTDIR}${LIBDIR}
        install -s -m 0755 sparsecp ${DESTDIR}${LIBDIR}
@@ -101,6 +114,7 @@ deb ${DEB}: ${PKGSOURCES}
        perl -I. ./qm verifyapi
        install -d -m 0755 build/DEBIAN
        install -m 0644 control build/DEBIAN
+       install -m 0644 triggers build/DEBIAN
        echo "/etc/modules-load.d/qemu-server.conf" >>build/DEBIAN/conffiles
        install -D -m 0644 copyright build/${DOCDIR}/${PACKAGE}/copyright
        install -m 0644 changelog.Debian build/${DOCDIR}/${PACKAGE}/
@@ -122,7 +136,7 @@ upload:
 
 .PHONY: clean
 clean:         
-       rm -rf build *.deb control vzsyscalls.ph _h2ph_pre.ph ${PACKAGE}-*.tar.gz dist *.1.gz *.pod vmtar sparsecp
+       rm -rf build *.deb control vzsyscalls.ph _h2ph_pre.ph ${PACKAGE}-*.tar.gz dist *.1.gz *.pod vmtar sparsecp *.tmp *.bash-completion
        find . -name '*~' -exec rm {} ';'