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
30 --host
=$(DEB_HOST_GNU_TYPE
) \
31 --build
=$(DEB_BUILD_GNU_TYPE
) \
34 --localstatedir
=/var \
39 build
: patch build-stamp
40 build-stamp
: config.status
42 $(MAKE
) vzdir
=/var
/lib
/vz
57 $(MAKE
) DESTDIR
=$(CURDIR
)/debian
/vzctl \
64 -e
's/\/vz\//\/var\/lib\/vz\//' \
65 $(CURDIR
)/debian
/vzctl
/etc
/vz
/vz.conf
67 # set default dist-script to debian
68 install -m
644 $(CURDIR
)/etc
/dists
/debian.conf
$(CURDIR
)/debian
/vzctl
/etc
/vz
/dists
/default
70 # rename the bash_completion.d/vzctl.sh for debian to vzctl
71 mv
$(CURDIR
)/debian
/vzctl
/etc
/bash_completion.d
/vzctl.sh
$(CURDIR
)/debian
/vzctl
/etc
/bash_completion.d
/vzctl
74 # Remove unused file from libtool
75 rm -rf
$(CURDIR
)/debian
/vzctl
/usr
/lib
/*.la
76 rm -rf
$(CURDIR
)/debian
/vzctl
/usr
/lib
/*.a
78 # unset Debian Version on vzctl
79 sed
-i
"s/'$(VZCTL_DEBVERSION)'/'$(VZCTL_VERSION)'/g" configure
82 install -m
644 $(CURDIR
)/debian
/sysctl
$(CURDIR
)/debian
/vzctl
/etc
/sysctl.d
/vzctl.conf
85 install -m
644 $(CURDIR
)/debian
/vzctl.
override $(CURDIR
)/debian
/vzctl
/usr
/share
/lintian
/overrides
/vzctl
87 # remove files in /etc/pve/openvz
88 rm -rf
$(CURDIR
)/debian
/vzctl
/etc
/pve
/openvz
89 rmdir
$(CURDIR
)/debian
/vzctl
/etc
/pve
92 # Build architecture-independent files here.
93 binary-indep
: build
install
95 # Build architecture-dependent files here.
96 binary-arch
: build
install
99 dh_installchangelogs ChangeLog
114 binary
: binary-indep binary-arch
115 .PHONY
: build
clean binary-indep binary-arch binary
install