7 CFLAGS
= -O2
-Werror
-Wall
-Wtype-limits
-Wl
,-z
,relro
12 SBINDIR
=${PREFIX}/sbin
14 LIBDIR
=${PREFIX}/lib
/${PACKAGE}
15 VARLIBDIR
=/var
/lib
/${PACKAGE}
16 MANDIR
=${PREFIX}/share
/man
17 DOCDIR
=${PREFIX}/share
/doc
18 MAN1DIR
=${MANDIR}/man1
/
19 MAN5DIR
=${MANDIR}/man5
/
20 BASHCOMPLDIR
=${PREFIX}/share
/bash-completion
/completions
/
21 export PERLDIR
=${PREFIX}/share
/perl5
22 PERLINCDIR
=${PERLDIR}/asm-x86_64
24 ARCH
:=$(shell dpkg-architecture
-qDEB_BUILD_ARCH
)
25 GITVERSION
:=$(shell cat .git
/refs
/heads
/master
)
27 DEB
=${PACKAGE}_
${VERSION}-${PKGREL}_
${ARCH}.deb
29 # this requires package pve-doc-generator
31 include /usr
/share
/pve-doc-generator
/pve-doc-generator.mk
40 sed
-e s
/@@VERSION@@
/${VERSION}/ -e s
/@@PKGRELEASE@@
/${PKGREL}/ -e s
/@@ARCH@@
/${ARCH}/<$< >$@
42 vzsyscalls.ph
: vzsyscalls.h
43 h2ph
-d . vzsyscalls.h
45 vmtar
: vmtar.c utils.c
46 gcc
${CFLAGS} -o vmtar vmtar.c
48 sparsecp
: sparsecp.c utils.c
49 gcc
${CFLAGS} -o sparsecp sparsecp.c
52 perl
-I.
-T
-e
"use PVE::CLI::qm; PVE::CLI::qm->generate_bash_completions();" >$@.tmp
55 qmrestore.bash-completion
:
56 perl
-I.
-T
-e
"use PVE::CLI::qmrestore; PVE::CLI::qmrestore->generate_bash_completions();" >$@.tmp
59 PKGSOURCES
=qm qm
.1 qmrestore qmrestore
.1 qmextract sparsecp vmtar control qm.conf
.5 qm.bash-completion qmrestore.bash-completion
62 install: ${PKGSOURCES}
63 install -d
${DESTDIR}/${SBINDIR}
64 install -d
${DESTDIR}${LIBDIR}
65 install -d
${DESTDIR}${VARLIBDIR}
66 install -d
${DESTDIR}/${MAN1DIR}
67 install -d
${DESTDIR}/${MAN5DIR}
68 install -d
${DESTDIR}/usr
/share
/man
/man5
69 install -d
${DESTDIR}/usr
/share
/${PACKAGE}
70 install -m
0644 pve-usb.cfg
${DESTDIR}/usr
/share
/${PACKAGE}
71 install -m
0644 pve-q35.cfg
${DESTDIR}/usr
/share
/${PACKAGE}
72 install -m
0644 -D qm.bash-completion
${DESTDIR}/${BASHCOMPLDIR}/qm
73 install -m
0644 -D qmrestore.bash-completion
${DESTDIR}/${BASHCOMPLDIR}/qmrestore
74 install -m
0644 -D bootsplash.jpg
${DESTDIR}/usr
/share
/${PACKAGE}
76 install -m
0755 qm
${DESTDIR}${SBINDIR}
77 install -m
0755 qmrestore
${DESTDIR}${SBINDIR}
78 install -m
0755 pve-bridge
${DESTDIR}${VARLIBDIR}/pve-bridge
79 install -m
0755 pve-bridge-hotplug
${DESTDIR}${VARLIBDIR}/pve-bridge-hotplug
80 install -m
0755 pve-bridgedown
${DESTDIR}${VARLIBDIR}/pve-bridgedown
81 install -s
-m
0755 vmtar
${DESTDIR}${LIBDIR}
82 install -s
-m
0755 sparsecp
${DESTDIR}${LIBDIR}
83 install -D
-m
0644 modules-load.conf
${DESTDIR}/etc
/modules-load.d
/qemu-server.conf
84 install -m
0755 qmextract
${DESTDIR}${LIBDIR}
85 install -m
0644 qm
.1 ${DESTDIR}/${MAN1DIR}
86 gzip
-9 ${DESTDIR}/${MAN1DIR}/qm
.1
87 install -m
0644 qmrestore
.1 ${DESTDIR}/${MAN1DIR}
88 gzip
-9 ${DESTDIR}/${MAN1DIR}/qmrestore
.1
89 install -m
0644 qm.conf
.5 ${DESTDIR}/${MAN5DIR}
90 gzip
-9 ${DESTDIR}/${MAN5DIR}/qm.conf
.5
91 cd
${DESTDIR}/${MAN5DIR}; ln
-s qm.conf
.5.gz vm.conf
.5.gz
94 deb
${DEB}: ${PKGSOURCES}
98 make DESTDIR
=${CURDIR}/build
install
99 perl
-I. .
/qm verifyapi
100 install -d
-m
0755 build
/DEBIAN
101 install -m
0644 control build
/DEBIAN
102 install -m
0644 triggers build
/DEBIAN
103 echo
"/etc/modules-load.d/qemu-server.conf" >>build
/DEBIAN
/conffiles
104 install -D
-m
0644 copyright build
/${DOCDIR}/${PACKAGE}/copyright
105 install -m
0644 changelog.Debian build
/${DOCDIR}/${PACKAGE}/
106 gzip
-9 build
/${DOCDIR}/${PACKAGE}/changelog.Debian
107 echo
"git clone git://git.proxmox.com/git/qemu-server.git\\ngit checkout ${GITVERSION}" > build
/${DOCDIR}/${PACKAGE}/SOURCE
108 dpkg-deb
--build build
114 tar cf
- ${DEB} | ssh repoman@repo.proxmox.com upload
119 rm -rf build
*.deb control vzsyscalls.ph _h2ph_pre.ph
${PACKAGE}-*.
tar.gz
dist *.1 *.5 *.pod vmtar sparsecp
*.tmp
*.bash-completion
120 find .
-name
'*~' -exec
rm {} ';'