Codebase list libvirt / 54deab3
Switch to dh Guido Günther 10 years ago
4 changed file(s) with 46 addition(s) and 34 deletion(s). Raw diff Collapse all Expand all
22 Priority: optional
33 Maintainer: Debian Libvirt Maintainers <pkg-libvirt-maintainers@lists.alioth.debian.org>
44 Uploaders: Guido Günther <agx@sigxcpu.org>, Laurent Léonard <laurent@open-minds.org>
5 Build-Depends: cdbs (>= 0.4.90~),
5 Build-Depends:
66 debhelper (>= 7),
77 dh-systemd (>= 1.3),
88 libxml2-dev,
2323 done; \
2424 ln -sf $(PY_DIR)$(PYDEFAULTVER) $(PY_DIR)
2525
26 configure/python-libvirt::
26 configure::
2727 set -e; for v in $(PYVERSIONS); do \
2828 cp -la $(PY_DIR) $(PY_DIR)$$v; \
2929 done
3030 $(RM) -r $(PY_DIR)
3131 ln -sf $(PY_DIR)$(PYDEFAULTVER) $(PY_DIR)
3232
33 build/python-libvirt::
33 build::
3434 $(call otherpy, all)
3535
36 install/python-libvirt::
36 install::
3737 $(call otherpy, install DESTDIR=$(CURDIR)/debian/tmp)
00 #!/usr/bin/make -f
11
2 DEB_BUILD_PARALLEL = yes
32 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
83
94 ifneq (,$(findstring $(DEB_HOST_ARCH_OS), linux))
105 ifneq (,$(findstring $(DEB_HOST_ARCH), i386 amd64))
6661 WITH_VBOX = --without-vbox
6762 endif
6863
69 DEB_BUILDDIR := $(CURDIR)/debian/build
70 DEB_CONFIGURE_EXTRA_FLAGS := \
64 DEB_CONFIGURE_EXTRA_ARGS := \
7165 --disable-rpath \
7266 $(WITH_QEMU) \
7367 --with-qemu-user=libvirt-qemu \
9993 $(WITH_AUDIT) \
10094 --without-firewalld
10195
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
10897 LOGROTATE = $(basename $(basename $(notdir $(wildcard daemon/libvirtd*.logrotate.in))))
10998 EXAMPLES_DIR = $(CURDIR)/debian/libvirt-doc/usr/share/doc/libvirt-doc/examples/
11099
111 include debian/python.mk
100 %:
101 dh $@ --builddirectory=$(DEB_BUILDDIR)
112102
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
114114 cp debian/tmp/usr/lib/libvirt/libvirt-guests.sh \
115115 debian/libvirt-bin.libvirt-guests.init
116116 cp tools/libvirt-guests.sysconf \
117117 debian/libvirt-bin.libvirt-guests.default
118118 -mv debian/libvirt-bin/lib/systemd/system/libvirtd.service \
119119 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
124120
125121 for l in $(LOGROTATE); do \
126122 cp $(CURDIR)/debian/build/daemon/$$l.logrotate \
128124 dh_installlogrotate --name=$$l; \
129125 done
130126
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
132151 # Add empty dirs so dh_install doesn't fail on kFreebsd until we have
133152 # Polkit/Systemd support
134153 mkdir -p debian/tmp/usr/share/polkit-1 \
135154 debian/tmp/lib/systemd/system \
136155 debian/tmp/usr/share/systemtap
137156
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
147159 rm -f $(CURDIR)/debian/libvirt-bin.libvirt-guests.init
148160 rm -f $(CURDIR)/debian/libvirt-bin.libvirt-guests.default
149161 rm -f $(CURDIR)/debian/libvirt-bin.*.logrotate