3 # Uncomment this to turn on verbose mode.
6 export DEB_BUILD_HARDENING
=1
8 # These are used for cross-compiling and for saving the configure script
9 # from having to guess our platform (since we know it already)
10 DEB_HOST_GNU_TYPE ?
= $(shell dpkg-architecture
-qDEB_HOST_GNU_TYPE
)
11 DEB_BUILD_GNU_TYPE ?
= $(shell dpkg-architecture
-qDEB_BUILD_GNU_TYPE
)
12 OS_DEB_VERSION ?
= $(shell cat
/etc
/debian_version
)
13 VZCTL_DEBVERSION ?
= $(shell dpkg-parsechangelog | grep ^Version | sed
"s/Version: //")
14 VZCTL_VERSION ?
= $(shell echo
$(VZCTL_DEBVERSION
) | cut
-d
'-' -f
1)
16 ifneq "$(wildcard /usr/share/quilt/quilt.make)" ""
17 include /usr
/share
/quilt
/quilt.make
22 ifneq (,$(findstring noopt
,$(DEB_BUILD_OPTIONS
)))
28 config.status
: configure
30 sed
-i
"s/'$(VZCTL_VERSION)'/'$(VZCTL_DEBVERSION)'/g" configure
33 --host
=$(DEB_HOST_GNU_TYPE
) \
34 --build
=$(DEB_BUILD_GNU_TYPE
) \
38 --libexecdir
=/usr
/lib \
39 --localstatedir
=/var \
44 build
: patch build-stamp
45 build-stamp
: config.status
47 $(MAKE
) vzdir
=/var
/lib
/vz
62 $(MAKE
) DESTDIR
=$(CURDIR
)/debian
/vzctl \
69 -e
's/\/vz\//\/var\/lib\/vz\//' \
70 $(CURDIR
)/debian
/vzctl
/etc
/vz
/vz.conf
72 # set default dist-script to debian
73 install -m
644 $(CURDIR
)/etc
/dists
/debian.conf
$(CURDIR
)/debian
/vzctl
/etc
/vz
/dists
/default
75 # rename the bash_completion.d/vzctl.sh for debian to vzctl
76 mv
$(CURDIR
)/debian
/vzctl
/etc
/bash_completion.d
/vzctl.sh
$(CURDIR
)/debian
/vzctl
/etc
/bash_completion.d
/vzctl
79 # Remove unused file from libtool
80 rm -rf
$(CURDIR
)/debian
/vzctl
/usr
/lib
/*.la
81 rm -rf
$(CURDIR
)/debian
/vzctl
/usr
/lib
/*.a
83 # unset Debian Version on vzctl
84 sed
-i
"s/'$(VZCTL_DEBVERSION)'/'$(VZCTL_VERSION)'/g" configure
87 install -m
644 $(CURDIR
)/debian
/sysctl
$(CURDIR
)/debian
/vzctl
/etc
/sysctl.d
/vzctl.conf
90 install -m
644 $(CURDIR
)/debian
/vzctl.
override $(CURDIR
)/debian
/vzctl
/usr
/share
/lintian
/overrides
/vzctl
92 # remove files in /etc/pve/openvz
93 rm -rf
$(CURDIR
)/debian
/vzctl
/etc
/pve
/openvz
94 rmdir
$(CURDIR
)/debian
/vzctl
/etc
/pve
96 # remove files in /etc/vz/conf (symlink to /etc/pve/openvz)
97 rm -rf
$(CURDIR
)/debian
/vzctl
/etc
/vz
/conf
98 # we create the symlink to /etc/pve/openvz inside the preinst script
100 # install perl vznetaddbr version
101 install -m
755 $(CURDIR
)/debian
/vznetaddbr
$(CURDIR
)/debian
/vzctl
/usr
/sbin
/vznetaddbr
103 # install proxmox bridge cleanup script
104 install -m
755 $(CURDIR
)/debian
/proxmox.umount
$(CURDIR
)/debian
/vzctl
/usr
/lib
/vzctl
/scripts
/proxmox.umount
108 # Build architecture-independent files here.
109 binary-indep
: build
install
111 # Build architecture-dependent files here.
112 binary-arch
: build
install
115 dh_installchangelogs ChangeLog
130 binary
: binary-indep binary-arch
131 .PHONY
: build
clean binary-indep binary-arch binary
install