convert pvesm into a PVE::CLI class
This commit is contained in:
21
Makefile
21
Makefile
@ -12,6 +12,8 @@ MANDIR=${PREFIX}/share/man
|
||||
DOCDIR=${PREFIX}/share/doc/${PACKAGE}
|
||||
PODDIR=${DOCDIR}/pod
|
||||
MAN1DIR=${MANDIR}/man1/
|
||||
BASHCOMPLDIR=${PREFIX}/share/bash-completion/completions/
|
||||
|
||||
export PERLDIR=${PREFIX}/share/perl5
|
||||
|
||||
#ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
|
||||
@ -29,13 +31,19 @@ dinstall: deb
|
||||
|
||||
%.1.gz: %.1.pod
|
||||
rm -f $@
|
||||
cat $<|pod2man -n $* -s 1 -r ${VERSION} -c "Proxmox Documentation"|gzip -c9 >$@
|
||||
cat $<|pod2man -n $* -s 1 -r ${VERSION} -c "Proxmox Documentation"|gzip -c9 >$@.tmp
|
||||
mv $@.tmp $@
|
||||
|
||||
pvesm.1.pod: pvesm PVE/Storage.pm
|
||||
perl -I. ./pvesm printmanpod >$@
|
||||
pvesm.1.pod: PVE/CLI/pvesm.pm PVE/Storage.pm
|
||||
perl -I. -T -e "use PVE::CLI::pvesm; PVE::CLI::pvesm->generate_pod_manpage();" >$@.tmp
|
||||
mv $@.tmp $@
|
||||
|
||||
pvesm.bash-completion:
|
||||
perl -I. -T -e "use PVE::CLI::pvesm; PVE::CLI::pvesm->generate_bash_completions();" >$@.tmp
|
||||
mv $@.tmp $@
|
||||
|
||||
.PHONY: install
|
||||
install: pvesm.1.pod pvesm.1.gz
|
||||
install: pvesm.1.pod pvesm.1.gz pvesm.bash-completion
|
||||
install -d ${DESTDIR}${SBINDIR}
|
||||
install -m 0755 pvesm ${DESTDIR}${SBINDIR}
|
||||
make -C PVE install
|
||||
@ -43,13 +51,14 @@ install: pvesm.1.pod pvesm.1.gz
|
||||
install -d ${DESTDIR}${PODDIR}
|
||||
install -m 0644 pvesm.1.gz ${DESTDIR}/usr/share/man/man1/
|
||||
install -m 0644 pvesm.1.pod ${DESTDIR}/${PODDIR}
|
||||
install -m 0644 -D pvesm.bash-completion ${DESTDIR}${BASHCOMPLDIR}/pvesm
|
||||
|
||||
.PHONY: deb ${DEB}
|
||||
deb ${DEB}:
|
||||
rm -rf debian
|
||||
mkdir debian
|
||||
make DESTDIR=${CURDIR}/debian install
|
||||
perl -I. ./pvesm verifyapi
|
||||
perl -I. -T -e "use PVE::CLI::pvesm; PVE::CLI::pvesm->verify_api();"
|
||||
install -d -m 0755 debian/DEBIAN
|
||||
sed -e s/@@VERSION@@/${VERSION}/ -e s/@@PKGRELEASE@@/${PKGREL}/ -e s/@@ARCH@@/${ARCH}/ <control.in >debian/DEBIAN/control
|
||||
install -D -m 0644 copyright debian/${DOCDIR}/copyright
|
||||
@ -64,7 +73,7 @@ deb ${DEB}:
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -rf debian *.deb ${PACKAGE}-*.tar.gz dist *.1.pod *.1.gz
|
||||
rm -rf debian *.deb ${PACKAGE}-*.tar.gz dist *.1.pod *.1.gz *.tmp pvesm.bash-completion
|
||||
find . -name '*~' -exec rm {} ';'
|
||||
|
||||
.PHONY: distclean
|
||||
|
||||
Reference in New Issue
Block a user