File xrdesktop.spec of Package xrdesktop

#
# spec file for package xrdesktop 
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

%define _libver 0.15
%define _longver %{_libver}.1
%define _underver 0_15
%define _sover  0

Name:           xrdesktop
Version:        0.15.2
Release:        0
Summary:        A library for XR interaction with classical desktop compositors
License:        MIT
Url:            https://gitlab.freedesktop.org/xrdesktop/xrdesktop
Source:         %{name}-%{version}.tar.bz2
BuildRequires:  meson
BuildRequires:  libstdc++-devel
BuildRequires:  glslang-devel
BuildRequires:  python3
BuildRequires:  python3-devel
BuildRequires:  python3-gobject-devel
BuildRequires:  pkgconfig(gulkan-0.15)
BuildRequires:  pkgconfig(gdk-pixbuf-2.0)
BuildRequires:  pkgconfig(gxr-0.15)

%description
A library for XR interaction with classical desktop compositors.

%package -n lib%{name}%{_underver}-%{_sover}
Summary:        A library for XR interaction with classical desktop compositors

%description -n lib%{name}%{_underver}-%{_sover}
A library for XR interaction with classical desktop compositors.

%package devel
Summary:        A library for XR interaction with classical desktop compositors
Requires:       lib%{name}%{_underver}-%{_sover} = %{version}

%description devel
A library for XR interaction with classical desktop compositors.

%prep
%setup -q

%build
%meson
%meson_build

%install
%meson_install

sed -i "s:/usr/bin/env python3:/usr/bin/python3:g" %{buildroot}%{_bindir}/xrd-settings

%post -n lib%{name}%{_underver}-%{_sover} -p /sbin/ldconfig
%postun -n lib%{name}%{_underver}-%{_sover} -p /sbin/ldconfig

%post devel -p /sbin/ldconfig
%postun devel -p /sbin/ldconfig

%files
%dir %{python_sitelib}/%{name}
%{python_sitelib}/%{name}/config.py

%{_bindir}/xrd-settings

%dir %{_datadir}/%{name}
%{_datadir}/%{name}/org.xrdesktop.settings.gresource
%{_datadir}/applications/org.xrdesktop.settings.desktop
%{_datadir}/icons/hicolor/scalable/apps/org.xrdesktop.settings.svg
%{_datadir}/glib-2.0/schemas/org.xrdesktop.gschema.xml

%files -n lib%{name}%{_underver}-%{_sover}
%{_libdir}/lib%{name}-%{_libver}.so.%{_sover}
%{_libdir}/lib%{name}-%{_libver}.so.%{_longver}

%files devel
%dir %{_includedir}/%{name}-%{_libver}
%{_includedir}/%{name}-%{_libver}/*.h
%{_libdir}/lib%{name}-%{_libver}.so
%{_libdir}/pkgconfig/%{name}-%{_libver}.pc

%changelog
openSUSE Build Service is sponsored by