3 # Uncomment this to turn on verbose mode.
6 # These are used for cross-compiling and for saving the configure script
7 # from having to guess our platform (since we know it already)
8 DEB_HOST_GNU_TYPE ?
= $(shell dpkg-architecture
-qDEB_HOST_GNU_TYPE
)
9 DEB_BUILD_GNU_TYPE ?
= $(shell dpkg-architecture
-qDEB_BUILD_GNU_TYPE
)
10 OS_DEB_VERSION ?
= $(shell cat
/etc
/debian_version
)
11 VZCTL_DEBVERSION ?
= $(shell dpkg-parsechangelog | grep ^Version | sed
"s/Version: //")
12 VZCTL_VERSION ?
= $(shell echo
$(VZCTL_DEBVERSION
) | cut
-d
'-' -f
1)
14 ifneq "$(wildcard /usr/share/quilt/quilt.make)" ""
15 include /usr
/share
/quilt
/quilt.make
20 ifneq (,$(findstring noopt
,$(DEB_BUILD_OPTIONS
)))
26 config.status
: configure
28 sed
-i
"s/'$(VZCTL_VERSION)'/'$(VZCTL_DEBVERSION)'/g" configure
31 --host
=$(DEB_HOST_GNU_TYPE
) \
32 --build
=$(DEB_BUILD_GNU_TYPE
) \
36 --libexecdir
=/usr
/lib \
37 --localstatedir
=/var \
42 build
: patch build-stamp
43 build-stamp
: config.status
45 $(MAKE
) vzdir
=/var
/lib
/vz
60 $(MAKE
) DESTDIR
=$(CURDIR
)/debian
/vzctl \
67 -e
's/\/vz\//\/var\/lib\/vz\//' \
68 $(CURDIR
)/debian
/vzctl
/etc
/vz
/vz.conf
70 # set default dist-script to debian
71 install -m
644 $(CURDIR
)/etc
/dists
/debian.conf
$(CURDIR
)/debian
/vzctl
/etc
/vz
/dists
/default
73 # rename the bash_completion.d/vzctl.sh for debian to vzctl
74 mv
$(CURDIR
)/debian
/vzctl
/etc
/bash_completion.d
/vzctl.sh
$(CURDIR
)/debian
/vzctl
/etc
/bash_completion.d
/vzctl
77 # Remove unused file from libtool
78 rm -rf
$(CURDIR
)/debian
/vzctl
/usr
/lib
/*.la
79 rm -rf
$(CURDIR
)/debian
/vzctl
/usr
/lib
/*.a
81 # unset Debian Version on vzctl
82 sed
-i
"s/'$(VZCTL_DEBVERSION)'/'$(VZCTL_VERSION)'/g" configure
85 install -m
644 $(CURDIR
)/debian
/sysctl
$(CURDIR
)/debian
/vzctl
/etc
/sysctl.d
/vzctl.conf
88 install -m
644 $(CURDIR
)/debian
/vzctl.
override $(CURDIR
)/debian
/vzctl
/usr
/share
/lintian
/overrides
/vzctl
90 # remove files in /etc/pve/openvz
91 rm -rf
$(CURDIR
)/debian
/vzctl
/etc
/pve
/openvz
92 rmdir
$(CURDIR
)/debian
/vzctl
/etc
/pve
94 # remove files in /etc/vz/conf (symlink to /etc/pve/openvz)
95 rm -rf
$(CURDIR
)/debian
/vzctl
/etc
/vz
/conf
96 # we create the symlink to /etc/pve/openvz inside the preinst script
98 # install perl vznetaddbr version
99 install -m
644 $(CURDIR
)/debian
/vznetaddbr
$(CURDIR
)/debian
/vzctl
/usr
/sbin
/vznetaddbr
103 # Build architecture-independent files here.
104 binary-indep
: build
install
106 # Build architecture-dependent files here.
107 binary-arch
: build
install
110 dh_installchangelogs ChangeLog
125 binary
: binary-indep binary-arch
126 .PHONY
: build
clean binary-indep binary-arch binary
install