4c21cf7
%global min_glib2_ver 2.46
4c21cf7
%global min_jsonglib_ver 1.2
4c21cf7
%global min_libsoup_ver 2.32
4c21cf7
%global min_gtkdoc_ver 1.20
4c21cf7
%global min_gi_ver 0.9.5
4c21cf7
%global min_valatools_ver 0.16
4c21cf7
5457ce3
Name:		snapd-glib
Richard Hughes 98871fb
Version:	1.16
455389a
Release:	3%{?dist}
5457ce3
Summary:	Library providing a GLib interface to snapd
5457ce3
5457ce3
Group:		System Environment/Libraries
5457ce3
License:	LGPLv2 or LGPLv3
5457ce3
URL:		https://launchpad.net/%{name}
Richard Hughes 98871fb
Source0:	https://github.com/snapcore/%{name}/releases/download/%{version}/%{name}-%{version}.tar.xz
5457ce3
4c21cf7
BuildRequires:	gtk-doc >= %{min_gtkdoc_ver}
5457ce3
BuildRequires:  autoconf
5457ce3
BuildRequires:  automake
5457ce3
BuildRequires:  gcc
9bea052
BuildRequires:  gcc-c++
4c21cf7
BuildRequires:  gobject-introspection-devel >= %{min_gi_ver}
5457ce3
BuildRequires:  intltool
4c21cf7
BuildRequires:  libtool
4c21cf7
BuildRequires:  pkgconfig(gio-2.0) >= %{min_glib2_ver}
4c21cf7
BuildRequires:  pkgconfig(gio-unix-2.0) >= %{min_glib2_ver}
4c21cf7
BuildRequires:  pkgconfig(glib-2.0) >= %{min_glib2_ver}
4c21cf7
BuildRequires:  pkgconfig(json-glib-1.0) >= %{min_jsonglib_ver}
4c21cf7
BuildRequires:  pkgconfig(libsoup-2.4) >= %{min_libsoup_ver}
5457ce3
BuildRequires:  pkgconfig(polkit-gobject-1)
9cc0066
BuildRequires:  pkgconfig(Qt5Core)
9cc0066
BuildRequires:  pkgconfig(Qt5Network)
9cc0066
BuildRequires:  pkgconfig(Qt5Qml)
4c21cf7
BuildRequires:  vala-tools >= %{min_valatools_ver}
5457ce3
9cc0066
# Ensure that weird Provides aren't generated
9cc0066
%global __provides_exclude_from ^%{_qt5_qmldir}/Snapd/.*\\.so$
9cc0066
5457ce3
%description
5457ce3
%{name} is a library that provides an interface to communicate
9cc0066
with snapd for GLib based applications.
5457ce3
5457ce3
%package devel
5457ce3
Summary:        Development files for %{name}
5457ce3
Group:          Development/Libraries
5457ce3
Requires:       %{name}%{?_isa} = %{version}-%{release}
5457ce3
5457ce3
%description devel
5457ce3
This package provides the files for developing applications
5457ce3
that use %{name} to communicate with snapd.
5457ce3
9cc0066
%package -n snapd-qt
9cc0066
Summary:	Library providing a Qt5 interface to snapd
9cc0066
Group:		System Environment/Libraries
9cc0066
Requires:	%{name}%{?_isa} = %{version}-%{release}
9cc0066
9cc0066
%description -n snapd-qt
9cc0066
snapd-qt is a library that provides an interface to communicate
9cc0066
with snapd for Qt based applications.
9cc0066
9cc0066
%package -n snapd-qt-qml
9cc0066
Summary:	Library providing a Qt5 QML interface to snapd
9cc0066
Group:		System Environment/Libraries
9cc0066
Requires:	snapd-qt%{?_isa} = %{version}-%{release}
9cc0066
9cc0066
%description -n snapd-qt-qml
9cc0066
snapd-qt-qml is a library that provides an interface to communicate
9cc0066
with snapd for Qt QML based applications.
9cc0066
9cc0066
9cc0066
%package -n snapd-qt-devel
9cc0066
Summary:	Development files for snapd-qt
9cc0066
Group:		Development/Libraries
9cc0066
Requires:	snapd-qt%{?_isa} = %{version}-%{release}
9cc0066
Requires:	%{name}-devel%{?_isa} = %{version}-%{release}
9cc0066
9cc0066
%description -n snapd-qt-devel
9cc0066
This package provides the files for developing applications
9cc0066
that use snapd-qt to communicate with snapd.
9cc0066
5457ce3
%package -n snapd-login-service
5457ce3
Summary:        Service to allow non-root access to snapd
5457ce3
Group:          System Environment/Daemons
5457ce3
Requires:       %{name}%{?_isa} = %{version}-%{release}
5457ce3
Requires:       polkit
6928beb
# snapd is not necessarily available on all architectures...
6928beb
Recommends:     snapd
5457ce3
5457ce3
%description -n snapd-login-service
5457ce3
Snapd Login Service is a daemon that allows users to request
5457ce3
authorization from snapd. It uses Polkit to check for permissions.
5457ce3
5457ce3
%prep
5457ce3
%setup -q
5457ce3
5457ce3
5457ce3
%build
9cc0066
%configure --enable-gtk-doc --libexecdir=%{_libexecdir}/snapd \
9cc0066
	    --enable-snapd-qt --enable-qml-module
5457ce3
%make_build
5457ce3
5457ce3
5457ce3
%install
5457ce3
%make_install
5457ce3
9cc0066
find %{buildroot} -name '*.la' -delete
9cc0066
9cc0066
%find_lang %{name}
5457ce3
5457ce3
%post -p /sbin/ldconfig
5457ce3
5457ce3
%postun -p /sbin/ldconfig
5457ce3
9cc0066
%post -n snapd-qt -p /sbin/ldconfig
9cc0066
9cc0066
%postun -n snapd-qt -p /sbin/ldconfig
9cc0066
5457ce3
9cc0066
%files -f %{name}.lang
5457ce3
%license COPYING.LGPL2 COPYING.LGPL3
5457ce3
%doc NEWS
5457ce3
%{_libdir}/libsnapd-glib.so.*
5457ce3
%{_libdir}/girepository-1.0/Snapd-1.typelib
5457ce3
5457ce3
%files devel
5457ce3
%doc %{_datadir}/gtk-doc/html/snapd-glib
5457ce3
%{_includedir}/snapd-glib
5457ce3
%{_libdir}/libsnapd-glib.so
5457ce3
%{_libdir}/pkgconfig/snapd-glib.pc
5457ce3
%{_datadir}/vala/vapi/snapd-glib.*
5457ce3
%{_datadir}/gir-1.0/Snapd-1.gir
5457ce3
9cc0066
%files -n snapd-qt
9cc0066
%{_libdir}/libsnapd-qt.so.*
9cc0066
9cc0066
%files -n snapd-qt-qml
9cc0066
%{_qt5_qmldir}/Snapd/
9cc0066
9cc0066
%files -n snapd-qt-devel
9cc0066
%{_includedir}/snapd-qt
9cc0066
%{_libdir}/libsnapd-qt.so
9cc0066
%{_libdir}/pkgconfig/snapd-qt.pc
9cc0066
%{_libdir}/cmake/Snapd/
9cc0066
5457ce3
%files -n snapd-login-service
5457ce3
%{_libexecdir}/snapd/snapd-login-service
5457ce3
%{_sysconfdir}/dbus-1/system.d/io.snapcraft.SnapdLoginService.conf
5457ce3
%{_datadir}/dbus-1/interfaces/io.snapcraft.SnapdLoginService.xml
5457ce3
%{_datadir}/dbus-1/system-services/io.snapcraft.SnapdLoginService.service
5457ce3
%{_datadir}/polkit-1/actions/io.snapcraft.SnapdLoginService.policy
5457ce3
5457ce3
%changelog
455389a
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.16-3
455389a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
455389a
023f43b
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.16-2
023f43b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
023f43b
Richard Hughes 98871fb
* Tue Jul 18 2017 Richard Hughes <rhughes@redhat.com> - 1.16-1
Richard Hughes 98871fb
- Update to 1.16
Richard Hughes 98871fb
- Bring introspection and vapigen m4 macros into the source
Richard Hughes 98871fb
- Fix snapd-qt build failure due to conflict of 'signals' variable with GDBus
Richard Hughes 98871fb
- Set a user agent when sending requests to snapd-glib
Richard Hughes 98871fb
9bea052
* Thu Jul 13 2017 Robert Ancell <robert.ancell@canonical.com> - 1.15-1
9bea052
- Update to 1.15
9bea052
- Add gcc-c++ build depends
9bea052
6928beb
* Wed Jun 28 2017 Neal Gompa <ngompa13@gmail.com> - 1.13-2
6928beb
- Downgrade snapd to Recommends and remove ExclusiveArch
6928beb
4c21cf7
* Tue Jun 27 2017 Neal Gompa <ngompa13@gmail.com> - 1.13-1
4c21cf7
- Update to 1.13
4c21cf7
- Version the build dependencies
4c21cf7
55297a4
* Thu May 18 2017 Neal Gompa <ngompa13@gmail.com> - 1.12-1
55297a4
- Update to 1.12
55297a4
7e39bec
* Wed Apr 05 2017 Neal Gompa <ngompa13@gmail.com> - 1.10-1
7e39bec
- Update to 1.10
7e39bec
40b2cfd
* Fri Mar 31 2017 Neal Gompa <ngompa13@gmail.com> - 1.9-2
40b2cfd
- Add ExclusiveArch entry from snapd, since it requires snapd
40b2cfd
9cc0066
* Fri Mar 31 2017 Neal Gompa <ngompa13@gmail.com> - 1.9-1
9cc0066
- Rebase to latest upstream release
9cc0066
3991658
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.2-2
3991658
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
3991658
5457ce3
* Tue Nov 1 2016  Zygmunt Krynicki <me@zygoon.pl> - 1.2-1
5457ce3
- Update to latest upstream release
9cc0066
5457ce3
* Tue Sep 27 2016 Neal Gompa <ngompa13@gmail.com> - 0.14-1
5457ce3
- Flesh out spec and add subpackages for devel and login service
9cc0066
5457ce3
* Thu Sep 08 2016 Zygmunt Krynicki <me@zygoon.pl> - 0.14-0
4c21cf7
- Update to 0.14
9cc0066
5457ce3
* Fri Aug 26 2016 Zygmunt Krynicki <me@zygoon.pl> - 0.8-1
5457ce3
- Initial version of the package