]> git.proxmox.com Git - pve-storage.git/blame_incremental - Makefile
export: add missing format query call parameter
[pve-storage.git] / Makefile
... / ...
CommitLineData
1VERSION=5.0
2PACKAGE=libpve-storage-perl
3PKGREL=5
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/
13
14export PERLDIR=${PREFIX}/share/perl5
15
16export SOURCE_DATE_EPOCH ?= $(shell dpkg-parsechangelog -STimestamp)
17
18ARCH=all
19GITVERSION:=$(shell cat .git/refs/heads/master)
20
21DEB=${PACKAGE}_${VERSION}-${PKGREL}_${ARCH}.deb
22
23# this require package pve-doc-generator
24export NOVIEW=1
25include /usr/share/pve-doc-generator/pve-doc-generator.mk
26
27all:
28
29.PHONY: dinstall
30dinstall: deb
31 dpkg -i ${DEB}
32
33pvesm.bash-completion:
34 perl -I. -T -e "use PVE::CLI::pvesm; PVE::CLI::pvesm->generate_bash_completions();" >$@.tmp
35 mv $@.tmp $@
36
37.PHONY: install
38install: PVE pvesm.1 pvesm.bash-completion
39 install -d ${DESTDIR}${SBINDIR}
40 install -m 0755 pvesm ${DESTDIR}${SBINDIR}
41 make -C PVE install
42 install -d ${DESTDIR}/usr/share/man/man1
43 install -m 0644 pvesm.1 ${DESTDIR}/usr/share/man/man1/
44 gzip -9 -n ${DESTDIR}/usr/share/man/man1/pvesm.1
45 install -m 0644 -D pvesm.bash-completion ${DESTDIR}${BASHCOMPLDIR}/pvesm
46
47.PHONY: deb
48deb: ${DEB}
49${DEB}:
50 rm -rf build
51 rsync -a * build
52 echo "git clone git://git.proxmox.com/git/pve-storage.git\\ngit checkout ${GITVERSION}" >build/debian/SOURCE
53 cd build; dpkg-buildpackage -b -us -uc
54 lintian ${DEB}
55
56.PHONY: test
57test:
58 perl -I. -T -e "use PVE::CLI::pvesm; PVE::CLI::pvesm->verify_api();"
59 make -C test
60
61.PHONY: clean
62clean:
63 make cleanup-docgen
64 rm -rf build *.deb *.buildinfo *.changes
65 find . -name '*~' -exec rm {} ';'
66
67.PHONY: distclean
68distclean: clean
69
70
71.PHONY: upload
72upload: ${DEB}
73 tar cf - ${DEB} | ssh repoman@repo.proxmox.com -- upload --product pve --dist stretch
74