]> git.proxmox.com Git - pve-storage.git/blame_incremental - Makefile
extract backup config: less precise matching for broken pipe detection
[pve-storage.git] / Makefile
... / ...
CommitLineData
1include /usr/share/dpkg/pkg-info.mk
2
3PACKAGE=libpve-storage-perl
4
5DESTDIR=
6PREFIX=/usr
7BINDIR=${PREFIX}/bin
8SBINDIR=${PREFIX}/sbin
9MANDIR=${PREFIX}/share/man
10DOCDIR=${PREFIX}/share/doc/${PACKAGE}
11MAN1DIR=${MANDIR}/man1/
12BASHCOMPLDIR=${PREFIX}/share/bash-completion/completions/
13ZSHCOMPLDIR=${PREFIX}/share/zsh/vendor-completions/
14
15export PERLDIR=${PREFIX}/share/perl5
16
17GITVERSION:=$(shell git rev-parse HEAD)
18
19DEB=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_all.deb
20
21# this require package pve-doc-generator
22export NOVIEW=1
23include /usr/share/pve-doc-generator/pve-doc-generator.mk
24
25all:
26
27.PHONY: dinstall
28dinstall: deb
29 dpkg -i ${DEB}
30
31pvesm.bash-completion:
32 perl -I. -T -e "use PVE::CLI::pvesm; PVE::CLI::pvesm->generate_bash_completions();" >$@.tmp
33 mv $@.tmp $@
34
35pvesm.zsh-completion:
36 perl -I. -T -e "use PVE::CLI::pvesm; PVE::CLI::pvesm->generate_zsh_completions();" >$@.tmp
37 mv $@.tmp $@
38
39.PHONY: install
40install: PVE pvesm.1 pvesm.bash-completion pvesm.zsh-completion
41 install -d ${DESTDIR}${SBINDIR}
42 install -m 0755 pvesm ${DESTDIR}${SBINDIR}
43 make -C PVE install
44 install -d ${DESTDIR}/usr/share/man/man1
45 install -m 0644 pvesm.1 ${DESTDIR}/usr/share/man/man1/
46 gzip -9 -n ${DESTDIR}/usr/share/man/man1/pvesm.1
47 install -m 0644 -D pvesm.bash-completion ${DESTDIR}${BASHCOMPLDIR}/pvesm
48 install -m 0644 -D pvesm.zsh-completion ${DESTDIR}${ZSHCOMPLDIR}/_pvesm
49
50.PHONY: deb
51deb: ${DEB}
52${DEB}:
53 rm -rf build
54 rsync -a * build
55 echo "git clone git://git.proxmox.com/git/pve-storage.git\\ngit checkout ${GITVERSION}" >build/debian/SOURCE
56 cd build; dpkg-buildpackage -b -us -uc
57 lintian ${DEB}
58
59.PHONY: test
60test:
61 perl -I. -T -e "use PVE::CLI::pvesm; PVE::CLI::pvesm->verify_api();"
62 make -C test
63
64.PHONY: clean
65clean:
66 make cleanup-docgen
67 rm -rf build *.deb *.buildinfo *.changes
68 find . -name '*~' -exec rm {} ';'
69
70.PHONY: distclean
71distclean: clean
72
73
74.PHONY: upload
75upload: ${DEB}
76 tar cf - ${DEB} | ssh -X repoman@repo.proxmox.com -- upload --product pve --dist buster
77