From nobody Mon Feb 9 10:47:45 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1557514319; cv=none; d=zoho.com; s=zohoarc; b=ElaSPP91Vld5RwKNG0HPzBUV3e40l0fw1BEsiruGp2fc09pUBiAR84yxVlvaVys/SKJ6QUbE6Z627OT9gb/N+FewELlFxsiHy+fh9xKTaFsN8PQuAVZf3JissvJJ9bHIQHXwkagiMqyms6YaB7SiwHLdxb7oP61oF4isL9+hGyw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1557514319; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=7Z8lKes44E5lTAhQ7cCA2wo+ym8pZVU8hyG/aE11GJU=; b=KFPVL0skYBs9sIwDH0+XfkZ/tOfP1lNkmQo2YX+KWvIzHvx/zFX5UIZuJpJQfJnxRpgBGbl3iUPKz6v4nEFfAotS1eyzRArdwU7mLjpkm4KqF/cBFHVEpn5JaZdaOwGGy5ziR4DZntWl+lvaDSZ7LgaLuZXs6G2Z1PqoWghnydY= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1557514319793602.8586898247179; Fri, 10 May 2019 11:51:59 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id CCF0081DF3; Fri, 10 May 2019 18:51:57 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A732261082; Fri, 10 May 2019 18:51:57 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 6C14E18089D4; Fri, 10 May 2019 18:51:57 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x4AIpU6Q030896 for ; Fri, 10 May 2019 14:51:30 -0400 Received: by smtp.corp.redhat.com (Postfix) id 01D4A18A75; Fri, 10 May 2019 18:51:30 +0000 (UTC) Received: from kinshicho.redhat.com (ovpn-204-46.brq.redhat.com [10.40.204.46]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5EDC05E7AC for ; Fri, 10 May 2019 18:51:29 +0000 (UTC) From: Andrea Bolognani To: libvir-list@redhat.com Date: Fri, 10 May 2019 20:51:20 +0200 Message-Id: <20190510185120.16355-5-abologna@redhat.com> In-Reply-To: <20190510185120.16355-1-abologna@redhat.com> References: <20190510185120.16355-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 4/4] examples: Install under $(docdir) X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Fri, 10 May 2019 18:51:58 +0000 (UTC) Content-Type: text/plain; charset="utf-8" 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: Andrea Bolognani --- examples/Makefile.am | 11 +++++++++++ libvirt.spec.in | 12 ------------ 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/examples/Makefile.am b/examples/Makefile.am index ee7d3e6b2c..c7688c7c3d 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -84,6 +84,17 @@ INSTALL_DATA_LOCAL +=3D install-nwfilter-local UNINSTALL_LOCAL +=3D uninstall-nwfilter-local endif WITH_NWFILTER =20 +examplesdir =3D $(docdir)/examples + install-data-local: $(INSTALL_DATA_LOCAL) + $(mkinstalldirs) $(DESTDIR)$(examplesdir) + for p in $(noinst_PROGRAMS); do \ + d=3D$$(dirname $$p); \ + $(mkinstalldirs) $(DESTDIR)$(examplesdir)/$$d; \ + $(INSTALL_DATA) $(srcdir)/$${p}.c $(DESTDIR)$(examplesdir)/$$d/; \ + done =20 uninstall-local: $(UNINSTALL_LOCAL) + for p in $(noinst_PROGRAMS); do \ + rm -f $(DESTDIR)$(examplesdir)/$${p}.c; \ + done diff --git a/libvirt.spec.in b/libvirt.spec.in index ea6a04c02a..5c27a44fc5 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -1232,8 +1232,6 @@ export SOURCE_DATE_EPOCH=3D$(stat --printf=3D'%Y' %{_= specdir}/%{name}.spec) =20 %make_install %{?_smp_mflags} SYSTEMD_UNIT_DIR=3D%{_unitdir} V=3D1 =20 -make %{?_smp_mflags} -C examples distclean V=3D1 - 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 =20 =20 %files daemon --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list