]> git.proxmox.com Git - pve-storage.git/blob - Makefile
bump version to 8.2.1
[pve-storage.git] / Makefile
1 include /usr/share/dpkg/pkg-info.mk
2
3 PACKAGE=libpve-storage-perl
4
5 DESTDIR=
6 PREFIX=/usr
7 BINDIR=${PREFIX}/bin
8 SBINDIR=${PREFIX}/sbin
9 MANDIR=${PREFIX}/share/man
10 DOCDIR=${PREFIX}/share/doc/${PACKAGE}
11 MAN1DIR=${MANDIR}/man1/
12 BASHCOMPLDIR=${PREFIX}/share/bash-completion/completions/
13 ZSHCOMPLDIR=${PREFIX}/share/zsh/vendor-completions/
14
15 export PERLDIR=${PREFIX}/share/perl5
16
17 GITVERSION:=$(shell git rev-parse HEAD)
18
19 DEB=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_all.deb
20
21 # this require package pve-doc-generator
22 export NOVIEW=1
23 include /usr/share/pve-doc-generator/pve-doc-generator.mk
24
25 all:
26
27 .PHONY: dinstall
28 dinstall: deb
29 dpkg -i ${DEB}
30
31 pvesm.bash-completion:
32 perl -I. -T -e "use PVE::CLI::pvesm; PVE::CLI::pvesm->generate_bash_completions();" >$@.tmp
33 mv $@.tmp $@
34
35 pvesm.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
40 install: 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
51 deb: ${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
60 test:
61 perl -I. -T -e "use PVE::CLI::pvesm; PVE::CLI::pvesm->verify_api();"
62 make -C test
63
64 .PHONY: clean
65 clean:
66 make cleanup-docgen
67 rm -rf build *.deb *.buildinfo *.changes
68 find . -name '*~' -exec rm {} ';'
69
70 .PHONY: distclean
71 distclean: clean
72
73
74 .PHONY: upload
75 upload: ${DEB}
76 tar cf - ${DEB} | ssh repoman@repo.proxmox.com -- upload --product pve --dist buster
77