File budgie-desktop.spec of Package budgie

#
# spec file for package budgie-desktop
#
# Copyright (c) 2013-2016 Ikey Doherty <ikey@solus-project.com>
#
# 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/
#


Name:           budgie-desktop
Version:        10.2.6
Release:        0
License:        GPL-2.0+ and LGPL-2.1
Summary:        GTK3 Desktop Environment
Url:            https://github.com/solus-project/budgie-desktop
Group:          System/GUI/Other
Source:         %{name}-%{version}.tar.xz
BuildRequires:	pkg-config
BuildRequires:  vala >= 0.28
BuildRequires:  pkgconfig(gtk+-3.0)
BuildRequires:  pkgconfig(libmutter)
BuildRequires:  pkgconfig(libwnck-3.0)
BuildRequires:  pkgconfig(upower-glib)
BuildRequires:  pkgconfig(libgnome-menu-3.0)
BuildRequires:  pkgconfig(x11)
BuildRequires:  pkgconfig(libpulse)
BuildRequires:  pkgconfig(libpulse-mainloop-glib)
BuildRequires:  pkgconfig(libpeas-1.0)
BuildRequires:  pkgconfig(libpeas-gtk-1.0)
BuildRequires:  pkgconfig(uuid)
BuildRequires:  pkgconfig(gsettings-desktop-schemas)
BuildRequires:  pkgconfig(gnome-desktop-3.0)
BuildRequires:  pkgconfig(polkit-gobject-1)
BuildRequires:  pkgconfig(polkit-agent-1)
BuildRequires:  pkgconfig(gnome-bluetooth-1.0)
BuildRequires:  intltool
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  libtool
# Otherwise OBS complains about ownership of /usr/share/gnome-session etc
BuildRequires:  gnome-session
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Requires:       gnome-settings-daemon
Requires:       gnome-session

%description
Budgie Desktop is the flagship desktop for the Solus Operating System.

%package -n typelib_1_0-Budgie-0_1
Summary:        GTK3 Desktop Environment -- Introspection bindings
Group:          System/Libraries
Requires:       %{name} = %{version}-%{release}

%description -n typelib_1_0-Budgie-0_1
A simple GTK3 desktop experience

%package devel
Summary:        GTK3 Desktop Environment -- Development files
Group:          Development/Libraries/GNOME
Requires:       typelib_1_0-Budgie-0_1 = %{version}-%{release}
Requires:       %{name} = %{version}-%{release}

%description devel
A simple GTK3 desktop experience

%package docs
Summary:        GTK3 Desktop Environment -- Documentation files
Group:          Documentation/HTML

%description docs
A simple GTK3 desktop experience -- Documentation files

%prep
%setup -q

%build
%configure
make %{?_smp_mflags}

%install
%{__make} install DESTDIR="%{buildroot}"
# Removing gnome-screensaver and replacing with budgie-screensaver upstream
# soon, so remove dead dep in openSUSE (and others)
rm %{buildroot}/%{_sysconfdir}/xdg/autostart/budgie-desktop-screensaver.desktop

%find_lang %{name}

%post
%if %{defined fedora}
/usr/bin/glib-compile-schemas %{_datadir}/glib-2.0/schemas
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
%else
%glib2_gsettings_schema_post
%icon_theme_cache_post
%endif
/sbin/ldconfig

%postun
%if %{defined fedora}
/usr/bin/glib-compile-schemas %{_datadir}/glib-2.0/schemas
if [ $1 -eq 0 ] ; then
    /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
    /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
fi
%else
%glib2_gsettings_schema_post
%icon_theme_cache_postun
%endif
/sbin/ldconfig


%if %{defined fedora}
%posttrans
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%endif

%files -f %{name}.lang
%defattr(-,root,root)
%doc LICENSE LICENSE.LGPL2.1
%{_libdir}/lib*.so.*
%{_bindir}/budgie-desktop
%{_bindir}/budgie-wm
%{_bindir}/budgie-panel
%{_bindir}/budgie-run-dialog
%{_bindir}/budgie-polkit-dialog
%{_datadir}/xsessions/budgie-desktop.desktop
%{_datadir}/glib-2.0/schemas/com.solus-project.budgie-menu.gschema.xml
%{_datadir}/glib-2.0/schemas/com.solus-project.budgie-panel.gschema.xml
%{_datadir}/glib-2.0/schemas/com.solus-project.budgie.wm.gschema.xml
%{_datadir}/glib-2.0/schemas/com.solus-project.icon-tasklist.gschema.xml
%{_datadir}/glib-2.0/schemas/com.solus-project.spacer.gschema.xml
%{_datadir}/applications/budgie-panel.desktop
%{_datadir}/applications/budgie-wm.desktop
%{_datadir}/applications/budgie-polkit.desktop
%{_datadir}/gnome-session/sessions/budgie-desktop.session
%{_datadir}/icons/hicolor/scalable/actions/notification-alert-symbolic.svg
%dir %{_libdir}/budgie-desktop
%dir %{_libdir}/budgie-desktop/plugins
%{_libdir}/budgie-desktop/Gvc-1.0.typelib
%{_libdir}/budgie-desktop/plugins/*.plugin
%{_libdir}/budgie-desktop/plugins/*.so
%{_datadir}/gir-1.0/Budgie*.gir
%{_sysconfdir}/xdg/autostart/budgie-desktop-nm-applet.desktop

%files devel
%{_includedir}/BudgieRaven.h
%{_includedir}/BudgieToplevel.h
%{_includedir}/BudgieSession.h
%{_includedir}/budgie-desktop/*.h
%dir %{_includedir}/budgie-desktop
%{_libdir}/pkgconfig/budgie*.pc
%{_libdir}/lib*.so
%exclude %{_libdir}/lib*.la
%exclude  %{_libdir}/budgie-desktop/plugins/lib*.la
%{_datadir}/vala/vapi/budgie-1.0.*

%files -n typelib_1_0-Budgie-0_1
%{_libdir}/girepository-1.0/Budgie*.typelib

%files docs
%dir %{_datadir}/gtk-doc/html/budgie-desktop-10.2.6/
%{_datadir}/gtk-doc/html/budgie-desktop-10.2.6/*.sgml
%{_datadir}/gtk-doc/html/budgie-desktop-10.2.6/*.html
%{_datadir}/gtk-doc/html/budgie-desktop-10.2.6/*.png
%{_datadir}/gtk-doc/html/budgie-desktop-10.2.6/*.css
%{_datadir}/gtk-doc/html/budgie-desktop-10.2.6/*.devhelp2

%changelog