File exo.spec of Package exo
#
# spec file for package exo
#
# Copyright (c) 2014 SUSE LINUX Products 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 libname libexo-1-0
Name: exo
Version: 0.10.2
Release: 0
Summary: Application Development Library for Xfce
License: GPL-2.0+ and LGPL-2.1+
Group: System/Libraries
Url: http://docs.xfce.org/xfce/exo/start
Source0: http://archive.xfce.org/src/xfce/exo/0.10/%{name}-%{version}.tar.bz2
# icons taken from tango-icon-theme 0.8.90
Source1: %{name}-icons.tar.bz2
# PATCH-FIX-UPSTREAM exo-firefox-params.patch bwalle@suse.de -- Removes obsolete Firefox commandline arguments
Patch0: exo-firefox-params.patch
# PATCH-FIX-OPENSUSE use-versioned-helpers-db.patch gber@opensuse.org -- Use a versioned helpers files DB since some of the desktop files are tied to the exo API version (e.g. by using exo-compose-mail-1)
Patch1: use-versioned-helpers-db.patch
BuildRequires: fdupes
BuildRequires: gtk-doc
BuildRequires: intltool
BuildRequires: perl-URI
BuildRequires: update-desktop-files
BuildRequires: xfce4-dev-tools
BuildRequires: pkgconfig(dbus-1)
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(gtk+-2.0)
BuildRequires: pkgconfig(libstartup-notification-1.0)
BuildRequires: pkgconfig(libxfce4ui-1)
BuildRequires: pkgconfig(libxfce4util-1.0)
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Exo is an extension library to Xfce which is targeted at application
development.
%package tools
Summary: Tools for exo
License: GPL-2.0+ and LGPL-2.1+
Group: System/Libraries
Provides: exo:%{_bindir}/exo-csource
Provides: exo:%{_bindir}/exo-desktop-item-edit
Provides: exo:%{_bindir}/exo-open
Provides: exo:%{_bindir}/exo-preferred-applications
%description tools
This package provides tools and helpers for exo.
%package -n %{libname}
Summary: Application Development Library for Xfce
License: GPL-2.0+ and LGPL-2.1+
Group: System/Libraries
Requires: %{libname}-branding = %{version}
Requires: perl-URI
Provides: exo = %{version}
Obsoletes: exo <= 0.6.2
Provides: exo-doc = %{version}
Obsoletes: exo-doc <= 0.6.2
Provides: exo-data = %{version}
Obsoletes: exo-data <= 0.10.2
Recommends: %{name}-lang = %{version}
Recommends: %{name}-tools
%description -n %{libname}
Exo is an extension library to Xfce which is targeted at application
development.
%package devel
Summary: Development Files for exo
License: GPL-2.0+ and LGPL-2.1+
Group: Development/Libraries/C and C++
Requires: %{libname} = %{version}
Requires: %{name}-tools = %{version}
%description devel
This package contains development files needed for developing applications
based on exo.
%package -n %{libname}-branding-upstream
Summary: Upstream Branding of exo
License: GPL-2.0+
Group: System/GUI/XFCE
# BRAND: helpers.rc: Controls default applications and MIME handler.
Conflicts: otherproviders(%{libname}-branding)
Provides: %{libname}-branding = %{version}
Provides: exo-branding = %{version}
Provides: exo-branding-upstream = %{version}
Obsoletes: exo-branding-upstream <= 0.10.2
Supplements: packageand(%{libname}:branding-upstream)
BuildArch: noarch
%description -n %{libname}-branding-upstream
This package provides the upstream look and feel for the exo library.
# this should be replaced by %%lang_package once bnc#513786 is resolved
%package lang
Summary: Languages for package %{name}
License: GPL-2.0+ and LGPL-2.1+
Group: System/Localization
Requires: %{libname} = %{version}
Provides: %{name}-lang-all = %{version}
Supplements: packageand(bundle-lang-other:%{libname})
BuildArch: noarch
%description lang
Provides translations to the package %{name}
%prep
%setup -q -b1
%patch0 -p1
%patch1 -p1
find . -name '*.pl' | \
xargs sed -i 's|^#! */usr/bin/env *\perl|#!/usr/bin/perl|'
%build
xdt-autogen
%configure \
--docdir=%{_datadir}/xfce4/exo-preferred-applications \
--with-helper-path-prefix=%{_libexecdir} \
--enable-gtk-doc \
--disable-static
make %{?_smp_mflags} V=1
%install
%make_install
# currently expected by too many Xfce packages
mkdir -p %{buildroot}%{_libdir}/xfce4
rm -f %{buildroot}%{_libdir}/*.la
%if 0%{?suse_version} < 1220
# install icons
(
cd ../exo-icons
find usr -depth -print | cpio -pvd %{buildroot}
)
%endif
%fdupes %{buildroot}%{_datadir}
# remove unsupported locales
rm -rf %{buildroot}%{_datadir}/locale/{ast,kk,tl_PH,ur_PK}
%find_lang exo-1 %{?no_lang_C}
%suse_update_desktop_file exo-preferred-applications
%suse_update_desktop_file exo-mail-reader
%suse_update_desktop_file exo-terminal-emulator
%suse_update_desktop_file exo-file-manager
%suse_update_desktop_file exo-web-browser
%post -n %{libname} -p /sbin/ldconfig
%postun -n %{libname} -p /sbin/ldconfig
%post tools
%icon_theme_cache_post
%desktop_database_post
%postun tools
%icon_theme_cache_postun
%desktop_database_postun
%files tools
%defattr(-,root,root)
%{_bindir}/exo-csource
%{_bindir}/exo-desktop-item-edit
%{_bindir}/exo-open
%{_bindir}/exo-preferred-applications
%{_datadir}/applications/exo-file-manager.desktop
%{_datadir}/applications/exo-mail-reader.desktop
%{_datadir}/applications/exo-preferred-applications.desktop
%{_datadir}/applications/exo-terminal-emulator.desktop
%{_datadir}/applications/exo-web-browser.desktop
%{_mandir}/man1/exo-csource.1*
%{_mandir}/man1/exo-open.1*
%{_datadir}/icons/hicolor/*/*/*
%files lang -f exo-1.lang
%files -n %{libname}
%defattr(-,root,root)
%doc README ChangeLog NEWS COPYING AUTHORS THANKS TODO
%{_libdir}/libexo-1.so.*
%dir %{_libdir}/xfce4
%dir %{_libexecdir}/xfce4
%dir %{_libexecdir}/xfce4/exo-1
# helper binaries which can be considered part of the API
%{_libexecdir}/xfce4/exo-1/exo-compose-mail-1
%{_libexecdir}/xfce4/exo-1/exo-helper-1
# the helper file db makes use of the above versioned binaries
%dir %{_datadir}/xfce4/exo-1
%{_datadir}/xfce4/exo-1/helpers
# frame image directly used by the library
%dir %{_datadir}/pixmaps/exo-1/
%{_datadir}/pixmaps/exo-1/exo-thumbnail-frame.png
%files devel
%defattr(-,root,root)
%{_includedir}/exo-1
%{_libdir}/libexo*.so
%{_libdir}/pkgconfig/exo*
%{_datadir}/gtk-doc/html/exo-1/
%files -n %{libname}-branding-upstream
%defattr(-,root,root)
%dir %{_sysconfdir}/xdg/xfce4
%dir %{_sysconfdir}/xdg/xfce4/exo-1
%config %{_sysconfdir}/xdg/xfce4/exo-1/helpers.rc
%changelog