提交 4faaaa8b 编写于 作者: A Andrea Bolognani

examples: Install under $(docdir)

Our build system doesn't currently install the various
example programs provided along libvirt; however, both the
upstream .spec file and the Debian packaging go out of
their way to make sure these useful demos are included in
the respective documentation packages.

Moreover, doing so without help from the upstream build
system is easy to get wrong: the libvirt-docs RPM package,
for example, ends up missing one of the examples and
including a bunch of empty .deps/ directories.

Install the examples in $(docdir) as part of our regular
procedure, so that users and downstreams don't have to do
anything special about them.
Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
Acked-by: NMichal Privoznik <mprivozn@redhat.com>
上级 6716c997
......@@ -84,6 +84,17 @@ INSTALL_DATA_LOCAL += install-nwfilter-local
UNINSTALL_LOCAL += uninstall-nwfilter-local
endif WITH_NWFILTER
examplesdir = $(docdir)/examples
install-data-local: $(INSTALL_DATA_LOCAL)
$(mkinstalldirs) $(DESTDIR)$(examplesdir)
for p in $(noinst_PROGRAMS); do \
d=$$(dirname $$p); \
$(mkinstalldirs) $(DESTDIR)$(examplesdir)/$$d; \
$(INSTALL_DATA) $(srcdir)/$${p}.c $(DESTDIR)$(examplesdir)/$$d/; \
done
uninstall-local: $(UNINSTALL_LOCAL)
for p in $(noinst_PROGRAMS); do \
rm -f $(DESTDIR)$(examplesdir)/$${p}.c; \
done
......@@ -1232,8 +1232,6 @@ export SOURCE_DATE_EPOCH=$(stat --printf='%Y' %{_specdir}/%{name}.spec)
%make_install %{?_smp_mflags} SYSTEMD_UNIT_DIR=%{_unitdir} V=1
make %{?_smp_mflags} -C examples distclean V=1
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
rm -f $RPM_BUILD_ROOT%{_libdir}/*.a
rm -f $RPM_BUILD_ROOT%{_libdir}/libvirt/lock-driver/*.la
......@@ -1510,16 +1508,6 @@ exit 0
%doc %{_datadir}/gtk-doc/html/libvirt/*.html
%doc %{_datadir}/gtk-doc/html/libvirt/*.png
%doc %{_datadir}/gtk-doc/html/libvirt/*.css
%doc examples/hellolibvirt
%doc examples/object-events
%doc examples/dominfo
%doc examples/domsuspend
%doc examples/dommigrate
%doc examples/openauth
%doc examples/xml
%doc examples/rename
%doc examples/systemtap
%doc examples/admin
%files daemon
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册