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
75 install -m
0755 qm
${DESTDIR}${SBINDIR}
76 install -m
0755 qmrestore
${DESTDIR}${SBINDIR}
77 install -m
0755 pve-bridge
${DESTDIR}${VARLIBDIR}/pve-bridge
78 install -m
0755 pve-bridge-hotplug
${DESTDIR}${VARLIBDIR}/pve-bridge-hotplug
79 install -m
0755 pve-bridgedown
${DESTDIR}${VARLIBDIR}/pve-bridgedown
80 install -s
-m
0755 vmtar
${DESTDIR}${LIBDIR}
81 install -s
-m
0755 sparsecp
${DESTDIR}${LIBDIR}
82 install -D
-m
0644 modules-load.conf
${DESTDIR}/etc
/modules-load.d
/qemu-server.conf
83 install -m
0755 qmextract
${DESTDIR}${LIBDIR}
84 install -m
0644 qm
.1 ${DESTDIR}/${MAN1DIR}
85 gzip
-9 ${DESTDIR}/${MAN1DIR}/qm
.1
86 install -m
0644 qmrestore
.1 ${DESTDIR}/${MAN1DIR}
87 gzip
-9 ${DESTDIR}/${MAN1DIR}/qmrestore
.1
88 install -m
0644 qm.conf
.5 ${DESTDIR}/${MAN5DIR}
89 gzip
-9 ${DESTDIR}/${MAN5DIR}/qm.conf
.5
90 cd
${DESTDIR}/${MAN5DIR}; ln
-s qm.conf
.5.gz vm.conf
.5.gz
93 deb
${DEB}: ${PKGSOURCES}
96 make DESTDIR
=${CURDIR}/build
install
97 perl
-I. .
/qm verifyapi
98 install -d
-m
0755 build
/DEBIAN
99 install -m
0644 control build
/DEBIAN
100 install -m
0644 triggers build
/DEBIAN
101 echo
"/etc/modules-load.d/qemu-server.conf" >>build
/DEBIAN
/conffiles
102 install -D
-m
0644 copyright build
/${DOCDIR}/${PACKAGE}/copyright
103 install -m
0644 changelog.Debian build
/${DOCDIR}/${PACKAGE}/
104 gzip
-9 build
/${DOCDIR}/${PACKAGE}/changelog.Debian
105 echo
"git clone git://git.proxmox.com/git/qemu-server.git\\ngit checkout ${GITVERSION}" > build
/${DOCDIR}/${PACKAGE}/SOURCE
106 dpkg-deb
--build build
112 umount
/pve
/${RELEASE}; mount
/pve
/${RELEASE} -o rw
113 mkdir
-p
/pve
/${RELEASE}/extra
114 rm -rf
/pve
/${RELEASE}/extra
/${PACKAGE}_
*.deb
115 rm -rf
/pve
/${RELEASE}/extra
/Packages
*
116 cp
${DEB} /pve
/${RELEASE}/extra
117 cd
/pve
/${RELEASE}/extra
; dpkg-scanpackages .
/dev
/null
> Packages
; gzip
-9c Packages
> Packages.gz
118 umount
/pve
/${RELEASE}; mount
/pve
/${RELEASE} -o ro
123 rm -rf build
*.deb control vzsyscalls.ph _h2ph_pre.ph
${PACKAGE}-*.
tar.gz
dist *.1 *.5 *.pod vmtar sparsecp
*.tmp
*.bash-completion
124 find .
-name
'*~' -exec
rm {} ';'