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 BASHCOMPLDIR
=${PREFIX}/share
/bash-completion
/completions
/
20 export PERLDIR
=${PREFIX}/share
/perl5
21 PERLINCDIR
=${PERLDIR}/asm-x86_64
23 ARCH
:=$(shell dpkg-architecture
-qDEB_BUILD_ARCH
)
24 GITVERSION
:=$(shell cat .git
/refs
/heads
/master
)
26 DEB
=${PACKAGE}_
${VERSION}-${PKGREL}_
${ARCH}.deb
28 # this requires package pve-doc-generator
30 include /usr
/share
/pve-doc-generator
/pve-doc-generator.mk
39 sed
-e s
/@@VERSION@@
/${VERSION}/ -e s
/@@PKGRELEASE@@
/${PKGREL}/ -e s
/@@ARCH@@
/${ARCH}/<$< >$@
41 vzsyscalls.ph
: vzsyscalls.h
42 h2ph
-d . vzsyscalls.h
44 vmtar
: vmtar.c utils.c
45 gcc
${CFLAGS} -o vmtar vmtar.c
47 sparsecp
: sparsecp.c utils.c
48 gcc
${CFLAGS} -o sparsecp sparsecp.c
51 perl
-I.
-T
-e
"use PVE::CLI::qm; PVE::CLI::qm->generate_bash_completions();" >$@.tmp
54 qmrestore.bash-completion
:
55 perl
-I.
-T
-e
"use PVE::CLI::qmrestore; PVE::CLI::qmrestore->generate_bash_completions();" >$@.tmp
58 PKGSOURCES
=qm qm
.1 qmrestore qmrestore
.1 qmextract sparsecp vmtar control qm.conf
.5 qm.bash-completion qmrestore.bash-completion
61 install: ${PKGSOURCES}
62 install -d
${DESTDIR}/${SBINDIR}
63 install -d
${DESTDIR}${LIBDIR}
64 install -d
${DESTDIR}${VARLIBDIR}
65 install -d
${DESTDIR}/usr
/share
/man
/man1
66 install -d
${DESTDIR}/usr
/share
/man
/man5
67 install -d
${DESTDIR}/usr
/share
/${PACKAGE}
68 install -m
0644 pve-usb.cfg
${DESTDIR}/usr
/share
/${PACKAGE}
69 install -m
0644 pve-q35.cfg
${DESTDIR}/usr
/share
/${PACKAGE}
70 install -m
0644 -D qm.bash-completion
${DESTDIR}/${BASHCOMPLDIR}/qm
71 install -m
0644 -D qmrestore.bash-completion
${DESTDIR}/${BASHCOMPLDIR}/qmrestore
73 install -m
0755 qm
${DESTDIR}${SBINDIR}
74 install -m
0755 qmrestore
${DESTDIR}${SBINDIR}
75 install -m
0755 pve-bridge
${DESTDIR}${VARLIBDIR}/pve-bridge
76 install -m
0755 pve-bridge-hotplug
${DESTDIR}${VARLIBDIR}/pve-bridge-hotplug
77 install -m
0755 pve-bridgedown
${DESTDIR}${VARLIBDIR}/pve-bridgedown
78 install -s
-m
0755 vmtar
${DESTDIR}${LIBDIR}
79 install -s
-m
0755 sparsecp
${DESTDIR}${LIBDIR}
80 install -D
-m
0644 modules-load.conf
${DESTDIR}/etc
/modules-load.d
/qemu-server.conf
81 install -m
0755 qmextract
${DESTDIR}${LIBDIR}
82 install -m
0644 qm
.1 ${DESTDIR}/usr
/share
/man
/man1
/
83 gzip
-9 ${DESTDIR}/usr
/share
/man
/man1
/qm
.1
84 install -m
0644 qmrestore
.1 ${DESTDIR}/usr
/share
/man
/man1
/
85 gzip
-9 ${DESTDIR}/usr
/share
/man
/man1
/qmrestore
.1
86 install -m
0644 qm.conf
.5 ${DESTDIR}/usr
/share
/man
/man5
/
87 gzip
-9 ${DESTDIR}/usr
/share
/man
/man5
/qm.conf
.5
90 deb
${DEB}: ${PKGSOURCES}
93 make DESTDIR
=${CURDIR}/build
install
94 perl
-I. .
/qm verifyapi
95 install -d
-m
0755 build
/DEBIAN
96 install -m
0644 control build
/DEBIAN
97 install -m
0644 triggers build
/DEBIAN
98 echo
"/etc/modules-load.d/qemu-server.conf" >>build
/DEBIAN
/conffiles
99 install -D
-m
0644 copyright build
/${DOCDIR}/${PACKAGE}/copyright
100 install -m
0644 changelog.Debian build
/${DOCDIR}/${PACKAGE}/
101 gzip
-9 build
/${DOCDIR}/${PACKAGE}/changelog.Debian
102 echo
"git clone git://git.proxmox.com/git/qemu-server.git\\ngit checkout ${GITVERSION}" > build
/${DOCDIR}/${PACKAGE}/SOURCE
103 dpkg-deb
--build build
109 umount
/pve
/${RELEASE}; mount
/pve
/${RELEASE} -o rw
110 mkdir
-p
/pve
/${RELEASE}/extra
111 rm -rf
/pve
/${RELEASE}/extra
/${PACKAGE}_
*.deb
112 rm -rf
/pve
/${RELEASE}/extra
/Packages
*
113 cp
${DEB} /pve
/${RELEASE}/extra
114 cd
/pve
/${RELEASE}/extra
; dpkg-scanpackages .
/dev
/null
> Packages
; gzip
-9c Packages
> Packages.gz
115 umount
/pve
/${RELEASE}; mount
/pve
/${RELEASE} -o ro
120 rm -rf build
*.deb control vzsyscalls.ph _h2ph_pre.ph
${PACKAGE}-*.
tar.gz
dist *.1 *.5 *.pod vmtar sparsecp
*.tmp
*.bash-completion
121 find .
-name
'*~' -exec
rm {} ';'