5
0
mirror of git://git.proxmox.com/git/pve-storage.git synced 2024-12-23 17:34:34 +03:00
pve-storage/Makefile

78 lines
1.9 KiB
Makefile
Raw Normal View History

include /usr/share/dpkg/pkg-info.mk
2011-08-23 09:43:03 +04:00
PACKAGE=libpve-storage-perl
DESTDIR=
PREFIX=/usr
BINDIR=${PREFIX}/bin
SBINDIR=${PREFIX}/sbin
MANDIR=${PREFIX}/share/man
2011-10-20 10:20:37 +04:00
DOCDIR=${PREFIX}/share/doc/${PACKAGE}
2011-08-23 09:43:03 +04:00
MAN1DIR=${MANDIR}/man1/
2015-09-18 09:21:17 +03:00
BASHCOMPLDIR=${PREFIX}/share/bash-completion/completions/
ZSHCOMPLDIR=${PREFIX}/share/zsh/vendor-completions/
2015-09-18 09:21:17 +03:00
2011-08-23 09:43:03 +04:00
export PERLDIR=${PREFIX}/share/perl5
GITVERSION:=$(shell git rev-parse HEAD)
2013-09-05 15:02:40 +04:00
DEB=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_all.deb
2011-08-23 09:43:03 +04:00
# this require package pve-doc-generator
export NOVIEW=1
include /usr/share/pve-doc-generator/pve-doc-generator.mk
2011-08-23 09:43:03 +04:00
all:
2011-08-23 09:43:03 +04:00
.PHONY: dinstall
dinstall: deb
dpkg -i ${DEB}
2015-09-18 09:21:17 +03:00
pvesm.bash-completion:
perl -I. -T -e "use PVE::CLI::pvesm; PVE::CLI::pvesm->generate_bash_completions();" >$@.tmp
mv $@.tmp $@
2011-10-20 10:20:37 +04:00
pvesm.zsh-completion:
perl -I. -T -e "use PVE::CLI::pvesm; PVE::CLI::pvesm->generate_zsh_completions();" >$@.tmp
mv $@.tmp $@
2011-08-23 09:43:03 +04:00
.PHONY: install
install: PVE pvesm.1 pvesm.bash-completion pvesm.zsh-completion
2011-08-23 09:43:03 +04:00
install -d ${DESTDIR}${SBINDIR}
install -m 0755 pvesm ${DESTDIR}${SBINDIR}
make -C PVE install
install -d ${DESTDIR}/usr/share/man/man1
install -m 0644 pvesm.1 ${DESTDIR}/usr/share/man/man1/
gzip -9 -n ${DESTDIR}/usr/share/man/man1/pvesm.1
2015-09-18 09:21:17 +03:00
install -m 0644 -D pvesm.bash-completion ${DESTDIR}${BASHCOMPLDIR}/pvesm
install -m 0644 -D pvesm.zsh-completion ${DESTDIR}${ZSHCOMPLDIR}/_pvesm
2011-08-23 09:43:03 +04:00
2017-02-06 13:50:01 +03:00
.PHONY: deb
deb: ${DEB}
${DEB}:
rm -rf build
rsync -a * build
echo "git clone git://git.proxmox.com/git/pve-storage.git\\ngit checkout ${GITVERSION}" >build/debian/SOURCE
cd build; dpkg-buildpackage -b -us -uc
2011-08-23 09:43:03 +04:00
lintian ${DEB}
.PHONY: test
test:
perl -I. -T -e "use PVE::CLI::pvesm; PVE::CLI::pvesm->verify_api();"
make -C test
2011-08-23 09:43:03 +04:00
.PHONY: clean
clean:
make cleanup-docgen
rm -rf build *.deb *.buildinfo *.changes
2011-08-23 09:43:03 +04:00
find . -name '*~' -exec rm {} ';'
.PHONY: distclean
distclean: clean
.PHONY: upload
upload: ${DEB}
tar cf - ${DEB} | ssh -X repoman@repo.proxmox.com -- upload --product pve --dist buster
2011-08-23 09:43:03 +04:00