[Spice-devel] [PATCH spice-gtk 1/2] Add spec.in file and spec file generation
Snir Sheriber
ssheribe at redhat.com
Wed Aug 28 07:07:44 UTC 2019
Hi,
On 8/27/19 5:50 PM, Frediano Ziglio wrote:
> I posted a similar patch for another SPICE project, fine adding SPEC to the
> repository.
Yes just found it, for spice-protocol (autotools)
> The spec seems already "evolved" from a past history. Where did you get it
> from? I think that comment should be on the commit message.
> Also, is that spec file supposed to be used for releases (like for Fedora) ?
It's mainly based on latest fedora build spec with few minor changes,
my intention was to use it as a spec template, upstream build can
use it with a couple of changes.
On the other hand if it's preferred to be the official upstream spec i can
add the changelog and move necessary copr changes to the Makefile
script.
>
>> Signed-off-by: Snir Sheriber <ssheribe at redhat.com>
>> ---
>> Test build:
>> https://copr.fedorainfracloud.org/coprs/snir/spice-project/build/1021943/
>>
>> ---
>> meson.build | 11 +++
>> spice-gtk.spec.in | 190 ++++++++++++++++++++++++++++++++++++++++++++++
>> 2 files changed, 201 insertions(+)
>> create mode 100644 spice-gtk.spec.in
>>
>> diff --git a/meson.build b/meson.build
>> index 07dbb70..61f8a11 100644
>> --- a/meson.build
>> +++ b/meson.build
>> @@ -408,3 +408,14 @@ if spice_gtk_has_gtk
>> requires : 'spice-client-glib-2.0 gtk+-3.0 >=
>> @0@'.format(gtk_version_required),
>> variables : 'exec_prefix=${prefix}')
>> endif
>> +
>> +#
>> +# spec file
>> +#
>> +conf_data = configuration_data()
>> +conf_data.set('version', meson.project_version())
>> +conf_data.set('release', run_command('date', '+%Y%m%d%H%M.spice.latest',
>> check : true).stdout().strip())
> Not big fun of this, I suppose this means that these build are only for
> developers.
Yes, possibly can be changed only in the Makefile script.
Snir.
>
>> +
>> +configure_file(input : 'spice-gtk.spec.in',
>> + output : 'spice-gtk.spec',
>> + configuration : conf_data)
>> diff --git a/spice-gtk.spec.in b/spice-gtk.spec.in
>> new file mode 100644
>> index 0000000..b4c1051
>> --- /dev/null
>> +++ b/spice-gtk.spec.in
>> @@ -0,0 +1,190 @@
>> +#define _version_suffix
>> +
>> +Name: spice-gtk
>> +Version: @version@
>> +Release: @release@%{?dist}
>> +Summary: A GTK+ widget for SPICE clients
>> +
>> +License: LGPLv2+
>> +URL: https://www.spice-space.org/
>> +#VCS: git:git://anongit.freedesktop.org/spice/spice-gtk
>> +Source0:
>> https://www.spice-space.org/download/gtk/%{name}-%{version}%{?_version_suffix}.tar.xz
>> +
>> +BuildRequires: git-core
>> +BuildRequires: meson
>> +BuildRequires: intltool
>> +BuildRequires: usbredir-devel >= 0.7.1
>> +BuildRequires: libusb1-devel >= 1.0.16
>> +BuildRequires: pixman-devel libjpeg-turbo-devel
>> +BuildRequires: opus-devel
>> +BuildRequires: zlib-devel
>> +BuildRequires: cyrus-sasl-devel
>> +BuildRequires: libcacard-devel
>> +BuildRequires: gobject-introspection-devel
>> +BuildRequires: libacl-devel
>> +%if ! 0%{?flatpak}
>> +BuildRequires: polkit-devel
>> +%endif
>> +BuildRequires: gtk-doc
>> +BuildRequires: vala
>> +BuildRequires: usbutils
>> +BuildRequires: libsoup-devel >= 2.49.91
>> +BuildRequires: libphodav-devel
>> +BuildRequires: lz4-devel
>> +BuildRequires: gtk3-devel
>> +BuildRequires: json-glib-devel
>> +BuildRequires: spice-protocol >= 0.12.15
>> +BuildRequires: gstreamer1-devel >= 1.10
>> +BuildRequires: gstreamer1-plugins-base-devel >= 1.10
>> +BuildRequires: python3-six
>> +BuildRequires: python3-pyparsing
>> +BuildRequires: openssl-devel
>> +BuildRequires: gnupg2
>> +
>> +Obsoletes: spice-gtk-python < 0.32
>> +
>> +Requires: spice-glib%{?_isa} = %{version}-%{release}
>> +
>> +%description
>> +Client libraries for SPICE desktop servers.
>> +
>> +%package -n spice-glib
>> +Summary: A GObject for communicating with Spice servers
>> +
>> +%description -n spice-glib
>> +spice-client-glib-2.0 is a SPICE client library for GLib2.
>> +
>> +%package -n spice-glib-devel
>> +Summary: Development files to build Glib2 applications with spice-glib-2.0
>> +Requires: spice-glib%{?_isa} = %{version}-%{release}
>> +Requires: pkgconfig
>> +Requires: glib2-devel
>> +
>> +%description -n spice-glib-devel
>> +spice-client-glib-2.0 is a SPICE client library for GLib2.
>> +
>> +Libraries, includes, etc. to compile with the spice-glib-2.0 libraries
>> +
>> +%package -n spice-gtk3
>> +Summary: A GTK3 widget for SPICE clients
>> +Requires: spice-glib%{?_isa} = %{version}-%{release}
>> +
>> +%description -n spice-gtk3
>> +spice-client-glib-3.0 is a SPICE client library for Gtk3.
>> +
>> +%package -n spice-gtk3-devel
>> +Summary: Development files to build GTK3 applications with spice-gtk-3.0
>> +Requires: spice-gtk3%{?_isa} = %{version}-%{release}
>> +Requires: spice-glib-devel%{?_isa} = %{version}-%{release}
>> +Requires: pkgconfig
>> +Requires: gtk3-devel
>> +Obsoletes: spice-gtk-devel < 0.32
>> +
>> +%description -n spice-gtk3-devel
>> +spice-client-gtk-3.0 provides a SPICE viewer widget for GTK3.
>> +
>> +Libraries, includes, etc. to compile with the spice-gtk3 libraries
>> +
>> +%package -n spice-gtk3-vala
>> +Summary: Vala bindings for the spice-gtk-3.0 library
>> +Requires: spice-gtk3%{?_isa} = %{version}-%{release}
>> +Requires: spice-gtk3-devel%{?_isa} = %{version}-%{release}
>> +
>> +%description -n spice-gtk3-vala
>> +A module allowing use of the spice-gtk-3.0 widget from vala
>> +
>> +%package tools
>> +Summary: Spice-gtk tools
>> +Requires: spice-gtk3%{?_isa} = %{version}-%{release}
>> +
>> +%description tools
>> +Simple clients for interacting with SPICE servers.
>> +spicy is a client to a SPICE desktop server.
>> +spicy-screenshot is a tool to capture screen-shots of a SPICE desktop.
>> +
>> +
>> +%prep
>> +%autosetup -S git_am
>> +
>> +
>> +%build
>> +
>> +# meson macro has --auto-features=enabled
>> +# gstreamer should be enough, may be deprecated in the future
>> +%global mjpegflag -Dbuiltin-mjpeg=false
>> +# spice-common doesn't use auto feature yet
>> +%global celt051flag -Dcelt051=disabled
>> +# pulse is deprecated upstream
>> +%global pulseflag -Dpulse=disabled
>> +
>> +%meson \
>> + %{mjpegflag} \
>> + %{celt051flag} \
>> + %{pulseflag} \
>> +%if 0%{?flatpak}
>> + -Dpolkit=disabled
>> +%else
>> + -Dusb-acl-helper-dir=%{_libexecdir}/spice-gtk-%{_arch}/
>> +%endif
>> +
>> +%meson_build
>> +
>> +
>> +%check
>> +%meson_test
>> +
>> +
>> +%install
>> +%meson_install
>> +
>> +
>> +%find_lang %{name}
>> +
>> +%ldconfig_scriptlets
>> +%ldconfig_scriptlets -n spice-glib
>> +%ldconfig_scriptlets -n spice-gtk3
>> +
>> +
>> +%files
>> +%doc AUTHORS
>> +%doc COPYING
>> +%doc README.md
>> +%doc CHANGELOG.md
>> +%{_mandir}/man1/spice-client.1*
>> +
>> +%files -n spice-glib -f %{name}.lang
>> +%{_libdir}/libspice-client-glib-2.0.so.*
>> +%{_libdir}/girepository-1.0/SpiceClientGLib-2.0.typelib
>> +%if ! 0%{?flatpak}
>> +%dir %{_libexecdir}/spice-gtk-%{_arch}/
>> +%attr(4755, root, root)
>> %{_libexecdir}/spice-gtk-%{_arch}/spice-client-glib-usb-acl-helper
>> +%{_datadir}/polkit-1/actions/org.spice-space.lowlevelusbaccess.policy
>> +%endif
>> +
>> +%files -n spice-glib-devel
>> +%{_libdir}/libspice-client-glib-2.0.so
>> +%{_includedir}/spice-client-glib-2.0
>> +%{_libdir}/pkgconfig/spice-client-glib-2.0.pc
>> +%{_datadir}/gir-1.0/SpiceClientGLib-2.0.gir
>> +%doc %{_datadir}/gtk-doc/html/*
>> +
>> +%files -n spice-gtk3
>> +%{_libdir}/libspice-client-gtk-3.0.so.*
>> +%{_libdir}/girepository-1.0/SpiceClientGtk-3.0.typelib
>> +
>> +%files -n spice-gtk3-devel
>> +%{_libdir}/libspice-client-gtk-3.0.so
>> +%{_includedir}/spice-client-gtk-3.0
>> +%{_libdir}/pkgconfig/spice-client-gtk-3.0.pc
>> +%{_datadir}/gir-1.0/SpiceClientGtk-3.0.gir
>> +
>> +%files -n spice-gtk3-vala
>> +%{_datadir}/vala/vapi/spice-client-glib-2.0.deps
>> +%{_datadir}/vala/vapi/spice-client-glib-2.0.vapi
>> +%{_datadir}/vala/vapi/spice-client-gtk-3.0.deps
>> +%{_datadir}/vala/vapi/spice-client-gtk-3.0.vapi
>> +
>> +%files tools
>> +%{_bindir}/spicy
>> +%{_bindir}/spicy-screenshot
>> +%{_bindir}/spicy-stats
> Frediano
More information about the Spice-devel
mailing list