[Spice-devel] [PATCH spice-protocol] build-sys: Provide spec file during build

Frediano Ziglio fziglio at redhat.com
Thu Jan 31 10:34:27 UTC 2019


Having the RPM spec file produced by the build is helpful in
different situation. Different tools like mock or code
scanners accept source RPMs as input.
Providing this file allows easily build of the source RPM (and
binaries) using a simple command like

  $ rpmbuild -ta spice-protocol-XXXX.tar.bz2

The spec proposed is a port of current Red Hat spec combining with
MingW one which allows to build MingW packages easily with a

  $ rpmbuild --with mingw -ta spice-protocol-XXXX.tar.bz2

Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
---
 Makefile.am            |   2 +-
 configure.ac           |   1 +
 spice-protocol.spec.in | 206 +++++++++++++++++++++++++++++++++++++++++
 3 files changed, 208 insertions(+), 1 deletion(-)
 create mode 100644 spice-protocol.spec.in

diff --git a/Makefile.am b/Makefile.am
index c464fa7..2cc1ea2 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -22,6 +22,6 @@ MAINTAINERCLEANFILES =						\
 	`find "$(srcdir)" -type f -name Makefile.in -print`	\
 	$(NULL)
 
-EXTRA_DIST = meson.build
+EXTRA_DIST = meson.build spice-protocol.spec
 
 -include $(top_srcdir)/git.mk
diff --git a/configure.ac b/configure.ac
index eb1b314..e64ea6c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -18,4 +18,5 @@ AC_OUTPUT([
 Makefile
 spice-protocol.pc
 spice/Makefile
+spice-protocol.spec
 ])
diff --git a/spice-protocol.spec.in b/spice-protocol.spec.in
new file mode 100644
index 0000000..5094fe8
--- /dev/null
+++ b/spice-protocol.spec.in
@@ -0,0 +1,206 @@
+%bcond_with mingw
+%if %{with mingw}
+Name:           mingw-spice-protocol
+%else
+Name:           spice-protocol
+%endif
+Version:        @VERSION@
+Release:        1%{?dist}
+Summary:        Spice protocol header files
+Group:          Development/Libraries
+# Main headers are BSD, controller / foreign menu are LGPL
+License:        BSD and LGPLv2+
+URL:            http://www.spice-space.org/
+Source0:        http://www.spice-space.org/download/releases/spice-protocol-%{version}.tar.bz2
+BuildArch:      noarch
+%if %{with mingw}
+BuildRequires:  mingw32-filesystem >= 95
+BuildRequires:  mingw64-filesystem >= 95
+%endif
+
+
+%description
+Header files describing the spice protocol
+and the para-virtual graphics card QXL.
+
+
+%if %{with mingw}
+%package -n mingw32-spice-protocol
+Summary:        Spice protocol header files
+Requires:       pkgconfig
+
+%description -n mingw32-spice-protocol
+Header files describing the spice protocol
+and the para-virtual graphics card QXL.
+
+%package -n mingw64-spice-protocol
+Summary:        Spice protocol header files
+Requires:       pkgconfig
+
+%description -n mingw64-spice-protocol
+Header files describing the spice protocol
+and the para-virtual graphics card QXL.
+%endif
+
+
+%prep
+%setup -q -n spice-protocol-%{version}
+
+%build
+%if %{with mingw}
+%mingw_configure
+%mingw_make %{?_smp_mflags} V=1
+%else
+%configure
+make %{?_smp_mflags}
+%endif
+
+%install
+%if %{with mingw}
+%mingw_make install DESTDIR=%{buildroot}
+%else
+make DESTDIR=%{buildroot} install
+%endif
+
+
+%if %{with mingw}
+
+%files -n mingw32-spice-protocol
+%doc COPYING NEWS
+%{mingw32_includedir}/spice-1
+%{mingw32_datadir}/pkgconfig/spice-protocol.pc
+
+%files -n mingw64-spice-protocol
+%doc COPYING NEWS
+%{mingw64_includedir}/spice-1
+%{mingw64_datadir}/pkgconfig/spice-protocol.pc
+
+%else
+
+%files
+%doc COPYING NEWS
+%{_includedir}/spice-1
+%{_datadir}/pkgconfig/spice-protocol.pc
+
+%endif
+
+
+%changelog
+* Wed Jul 12 2017 Marc-André Lureau <marcandre.lureau at redhat.com> - 0.12.13-1
+- Update to 0.12.13 release
+
+* Sat Feb 11 2017 Fedora Release Engineering <releng at fedoraproject.org> - 0.12.12-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
+
+* Fri Aug 05 2016 Christophe Fergeau <cfergeau at redhat.com> - 0.12.12-1
+- Update to 0.12.12 release
+
+* Fri Mar 11 2016 Marc-André Lureau <marcandre.lureau at redhat.com> - 0.12.11-1
+- Update to 0.12.11 release
+
+* Fri Feb 05 2016 Fedora Release Engineering <releng at fedoraproject.org> - 0.12.10-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
+
+* Thu Oct 01 2015 Christophe Fergeau <cfergeau at redhat.com> 0.12.10-1
+- Update to 0.12.10 - Add python scripts and .proto files used
+  to generate spice-gtk/spice-server marshalling C code
+
+* Wed Jul 29 2015 Christophe Fergeau <cfergeau at redhat.com> 0.12.9-1
+- Update to 0.12.9 - Fixes QEMU build failures when using 0.12.8 with
+  spice-server 0.12.5
+
+* Tue Jun 30 2015 Christophe Fergeau <cfergeau at redhat.com> 0.12.8-1
+- Update to 0.12.8
+
+* Fri Jun 19 2015 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.12.7-3
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
+
+* Sun Jun 08 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.12.7-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
+
+* Mon May 19 2014 Christophe Fergeau <cfergeau at redhat.com> 0.12.7-1
+- Update to 0.12.7
+
+* Sun Aug 04 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.12.6-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
+
+* Wed Jul  3 2013 Hans de Goede <hdegoede at redhat.com> - 0.12.6-1
+- Update to 0.12.6
+
+* Thu Mar  7 2013 Hans de Goede <hdegoede at redhat.com> - 0.12.5-1
+- Update to 0.12.5
+
+* Fri Feb  1 2013 Marc-André Lureau <marcandre.lureau at redhat.com> - 0.12.4-1
+- Update to 0.12.4
+
+* Thu Dec 20 2012 Hans de Goede <hdegoede at redhat.com> - 0.12.3-1
+- Update to 0.12.3
+
+* Fri Sep 28 2012 Hans de Goede <hdegoede at redhat.com> - 0.12.2-1
+- Update to 0.12.2
+
+* Thu Sep 6 2012 Soren Sandmann <ssp at redhat.com> - 0.12.1-1
+- Add patch1 and patch2 to support capability bits
+
+* Thu Sep 6 2012 Soren Sandmann <ssp at redhat.com> - 0.12.1-1
+- Update to 0.12.1
+
+* Sat Jul 21 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.10.1-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
+
+* Mon Jan 16 2012 Hans de Goede <hdegoede at redhat.com> - 0.10.1-1
+- Update to 0.10.1
+
+* Sat Jan 14 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.10.0-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
+
+* Sun Nov 13 2011 Alon Levy <alevy at redhat.com> - 0.10.0-1
+- Update to 0.10.0
+
+* Sun Oct 23 2011 Alon Levy <alevy at redhat.com> - 0.9.1-1
+- Update to 0.9.1
+
+* Thu Aug 25 2011 Hans de Goede <hdegoede at redhat.com> - 0.9.0-1
+- Update to 0.9.0
+
+* Mon Jul 25 2011 Marc-André Lureau <marcandre.lureau at redhat.com> - 0.8.1-2
+- Added spice-protocol-0.8.1-define-INLINE.patch
+
+* Tue Jul 19 2011 Marc-André Lureau <marcandre.lureau at redhat.com> - 0.8.1-1
+- Update to 0.8.1
+
+* Tue Mar  1 2011 Hans de Goede <hdegoede at redhat.com> - 0.8.0-1
+- Update to 0.8.0
+
+* Fri Feb 11 2011 Hans de Goede <hdegoede at redhat.com> - 0.7.1-1
+- Update to 0.7.1
+
+* Wed Feb 09 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.7.0-3
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
+
+* Wed Jan 12 2011 Hans de Goede <hdegoede at redhat.com> - 0.7.0-2
+- Update License tag (controller and foreign menu headers are LGPL)
+
+* Fri Dec 17 2010 Hans de Goede <hdegoede at redhat.com> - 0.7.0-1
+- Update to 0.7.0
+
+* Mon Oct 18 2010 Hans de Goede <hdegoede at redhat.com> - 0.6.3-1
+- Update to 0.6.3
+
+* Thu Sep 30 2010 Gerd Hoffmann <kraxel at redhat.com> - 0.6.1-1
+- Update to 0.6.1.
+
+* Tue Aug 31 2010 Alexander Larsson <alexl at redhat.com> - 0.6.0-1
+- Update to 0.6.0 (stable release)
+
+* Tue Jul 20 2010 Alexander Larsson <alexl at redhat.com> - 0.5.3-1
+- Update to 0.5.3
+
+* Mon Jul 12 2010 Gerd Hoffmann <kraxel at redhat.com> - 0.5.2-2
+- Fix license: It is BSD, not GPL.
+- Cleanup specfile, drop bits not needed any more with
+  recent rpm versions (F13+).
+
+* Fri Jul 9 2010 Gerd Hoffmann <kraxel at redhat.com> - 0.5.2-1
+- initial package.
+
-- 
2.20.1



More information about the Spice-devel mailing list