0 | 0 |
#!/usr/bin/make -f
|
1 | 1 |
|
2 | |
DEB_BUILD_PARALLEL = yes
|
3 | 2 |
export VIR_TEST_DEBUG=1
|
4 | |
|
5 | |
include /usr/share/cdbs/1/rules/debhelper.mk
|
6 | |
include /usr/share/cdbs/1/class/autotools.mk
|
7 | |
include /usr/share/cdbs/1/class/python-distutils.mk
|
8 | 3 |
|
9 | 4 |
ifneq (,$(findstring $(DEB_HOST_ARCH_OS), linux))
|
10 | 5 |
ifneq (,$(findstring $(DEB_HOST_ARCH), i386 amd64))
|
|
66 | 61 |
WITH_VBOX = --without-vbox
|
67 | 62 |
endif
|
68 | 63 |
|
69 | |
DEB_BUILDDIR := $(CURDIR)/debian/build
|
70 | |
DEB_CONFIGURE_EXTRA_FLAGS := \
|
|
64 |
DEB_CONFIGURE_EXTRA_ARGS := \
|
71 | 65 |
--disable-rpath \
|
72 | 66 |
$(WITH_QEMU) \
|
73 | 67 |
--with-qemu-user=libvirt-qemu \
|
|
99 | 93 |
$(WITH_AUDIT) \
|
100 | 94 |
--without-firewalld
|
101 | 95 |
|
102 | |
DEB_COMPRESS_EXCLUDE = .o event-test hellolibvirt info1 suspend
|
103 | |
DEB_PYTHON_SETUP_CMD = /dev/null
|
104 | |
DEB_DH_MAKESHLIBS_ARGS_libvirt0 += -V 'libvirt0 (>= 0.5.0)'
|
105 | |
DEB_DH_INSTALLINIT_ARGS = --no-restart-on-upgrade -- defaults 28 72
|
106 | |
DEB_PYTHON_MODULE_PACKAGE = python-libvirt
|
107 | |
|
|
96 |
DEB_BUILDDIR := $(CURDIR)/debian/build
|
108 | 97 |
LOGROTATE = $(basename $(basename $(notdir $(wildcard daemon/libvirtd*.logrotate.in))))
|
109 | 98 |
EXAMPLES_DIR = $(CURDIR)/debian/libvirt-doc/usr/share/doc/libvirt-doc/examples/
|
110 | 99 |
|
111 | |
include debian/python.mk
|
|
100 |
%:
|
|
101 |
dh $@ --builddirectory=$(DEB_BUILDDIR)
|
112 | 102 |
|
113 | |
binary-install/libvirt-bin::
|
|
103 |
override_dh_auto_configure:
|
|
104 |
dh_auto_configure -- $(DEB_CONFIGURE_EXTRA_ARGS)
|
|
105 |
DEB_BUILDDIR=$(DEB_BUILDDIR) make -f debian/python.mk configure
|
|
106 |
|
|
107 |
override_dh_auto_install:
|
|
108 |
dh_auto_install
|
|
109 |
DEB_BUILDDIR=$(DEB_BUILDDIR) make -f debian/python.mk install
|
|
110 |
|
|
111 |
override_dh_install:
|
|
112 |
dh_install
|
|
113 |
# Copy upstream files to debian/ so dh_* can find them
|
114 | 114 |
cp debian/tmp/usr/lib/libvirt/libvirt-guests.sh \
|
115 | 115 |
debian/libvirt-bin.libvirt-guests.init
|
116 | 116 |
cp tools/libvirt-guests.sysconf \
|
117 | 117 |
debian/libvirt-bin.libvirt-guests.default
|
118 | 118 |
-mv debian/libvirt-bin/lib/systemd/system/libvirtd.service \
|
119 | 119 |
debian/libvirt-bin/lib/systemd/system/libvirt-bin.service
|
120 | |
dh_systemd_enable
|
121 | |
dh_installinit --name=libvirt-guests --no-restart-on-upgrade -- defaults 29 71
|
122 | |
dh_systemd_start --restart-after-upgrade
|
123 | |
rm debian/libvirt-bin/usr/lib/libvirt/connection-driver/*.la
|
124 | 120 |
|
125 | 121 |
for l in $(LOGROTATE); do \
|
126 | 122 |
cp $(CURDIR)/debian/build/daemon/$$l.logrotate \
|
|
128 | 124 |
dh_installlogrotate --name=$$l; \
|
129 | 125 |
done
|
130 | 126 |
|
131 | |
build/libvirt-bin::
|
|
127 |
# Don't ship any la files
|
|
128 |
rm debian/libvirt-bin/usr/lib/libvirt/connection-driver/*.la
|
|
129 |
|
|
130 |
override_dh_installinit:
|
|
131 |
dh_systemd_enable
|
|
132 |
dh_installinit --name=libvirt-bin --no-restart-on-upgrade -- defaults 28 72
|
|
133 |
dh_installinit --name=libvirt-guests --no-restart-on-upgrade -- defaults 29 71
|
|
134 |
dh_systemd_start --restart-after-upgrade
|
|
135 |
|
|
136 |
override_dh_installdocs:
|
|
137 |
dh_installdocs
|
|
138 |
# Remove binaries and object files examples
|
|
139 |
find $(EXAMPLES_DIR) -name "*.o" -type f -delete -o -name .libs -type d -exec rm -rf {} \;
|
|
140 |
rm -f $(EXAMPLES_DIR)domain-events/events-c/event-test
|
|
141 |
rm -f $(EXAMPLES_DIR)dominfo/info1
|
|
142 |
rm -f $(EXAMPLES_DIR)domsuspend/suspend
|
|
143 |
rm -f $(EXAMPLES_DIR)hellolibvirt/hellolibvirt
|
|
144 |
|
|
145 |
override_dh_strip:
|
|
146 |
dh_strip --dbg-package=libvirt0-dbg
|
|
147 |
|
|
148 |
override_dh_auto_build:
|
|
149 |
dh_auto_build -a -i
|
|
150 |
DEB_BUILDDIR=$(DEB_BUILDDIR) make -f debian/python.mk build
|
132 | 151 |
# Add empty dirs so dh_install doesn't fail on kFreebsd until we have
|
133 | 152 |
# Polkit/Systemd support
|
134 | 153 |
mkdir -p debian/tmp/usr/share/polkit-1 \
|
135 | 154 |
debian/tmp/lib/systemd/system \
|
136 | 155 |
debian/tmp/usr/share/systemtap
|
137 | 156 |
|
138 | |
|
139 | |
binary-install/libvirt-doc::
|
140 | |
find $(EXAMPLES_DIR) -name "*.o" -type f -delete -o -name .libs -type d -exec rm -rf {} \;
|
141 | |
rm -f $(EXAMPLES_DIR)domain-events/events-c/event-test
|
142 | |
rm -f $(EXAMPLES_DIR)dominfo/info1
|
143 | |
rm -f $(EXAMPLES_DIR)domsuspend/suspend
|
144 | |
rm -f $(EXAMPLES_DIR)hellolibvirt/hellolibvirt
|
145 | |
|
146 | |
clean::
|
|
157 |
override_dh_auto_clean:
|
|
158 |
[ ! -f Makefile ] || dh_auto_clean
|
147 | 159 |
rm -f $(CURDIR)/debian/libvirt-bin.libvirt-guests.init
|
148 | 160 |
rm -f $(CURDIR)/debian/libvirt-bin.libvirt-guests.default
|
149 | 161 |
rm -f $(CURDIR)/debian/libvirt-bin.*.logrotate
|