generate manpage with pve-doc-generator, bump version to 4.0-49

This commit is contained in:
Dietmar Maurer
2016-04-06 11:26:44 +02:00
parent 74b724a699
commit dbf890f082
3 changed files with 16 additions and 116 deletions

View File

@ -2,7 +2,7 @@ RELEASE=4.1
VERSION=4.0
PACKAGE=libpve-storage-perl
PKGREL=48
PKGREL=49
DESTDIR=
PREFIX=/usr
@ -10,7 +10,6 @@ BINDIR=${PREFIX}/bin
SBINDIR=${PREFIX}/sbin
MANDIR=${PREFIX}/share/man
DOCDIR=${PREFIX}/share/doc/${PACKAGE}
PODDIR=${DOCDIR}/pod
MAN1DIR=${MANDIR}/man1/
BASHCOMPLDIR=${PREFIX}/share/bash-completion/completions/
@ -22,6 +21,9 @@ GITVERSION:=$(shell cat .git/refs/heads/master)
DEB=${PACKAGE}_${VERSION}-${PKGREL}_${ARCH}.deb
# this require package pve-doc-generator
export NOVIEW=1
include /usr/share/pve-doc-generator/pve-doc-generator.mk
all: ${DEB}
@ -29,28 +31,18 @@ all: ${DEB}
dinstall: deb
dpkg -i ${DEB}
%.1.gz: %.1.pod
rm -f $@
cat $<|pod2man -n $* -s 1 -r ${VERSION} -c "Proxmox Documentation"|gzip -c9 >$@.tmp
mv $@.tmp $@
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 pvesm.bash-completion
install: pvesm.1 pvesm.bash-completion
install -d ${DESTDIR}${SBINDIR}
install -m 0755 pvesm ${DESTDIR}${SBINDIR}
make -C PVE install
install -d ${DESTDIR}/usr/share/man/man1
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 pvesm.1 ${DESTDIR}/usr/share/man/man1/
gzip -9 ${DESTDIR}/usr/share/man/man1/pvesm.1
install -m 0644 -D pvesm.bash-completion ${DESTDIR}${BASHCOMPLDIR}/pvesm
.PHONY: deb ${DEB}
@ -72,8 +64,9 @@ deb ${DEB}:
lintian ${DEB}
.PHONY: clean
clean:
rm -rf debian *.deb ${PACKAGE}-*.tar.gz dist *.1.pod *.1.gz *.tmp pvesm.bash-completion
clean:
make cleanup-docgen
rm -rf debian *.deb ${PACKAGE}-*.tar.gz dist *.1 *.tmp pvesm.bash-completion
find . -name '*~' -exec rm {} ';'
.PHONY: distclean