File thunar.spec of Package thunar

#
# spec file for package thunar
#
# Copyright (c) 2011 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/
#



Name:           thunar
Version:        1.2.3
Release:        1
License:        GPLv2+
Summary:        Fast and Easy to Use File Manager for the Xfce Desktop Environment
Url:            http://thunar.xfce.org/
Group:          Productivity/File utilities
Source:         Thunar-%{version}.tar.bz2
# images missing from the source tarball, see bxo#7838
Source1:        thunarx-refrence-images.tar.bz2
Source2:        thunar-sendto-bluetooth.desktop
Source100:      %{name}-rpmlintrc
# PATCH-FIX-OPENSUSE thunar-fix-desktop-files.patch gber@opensuse.org -- Use the system-file-manager stock icon
Patch0:         %{name}-fix-desktop-files.patch
# PATCH-FIX-UPSTREAM thunar-allow-custom-helper-dir.patch gber@opensuse.org -- Allow installation of the helpers in a custom location (backported from upstream git)
Patch1:         %{name}-allow-custom-helper-dir.patch
BuildRequires:  fdupes
BuildRequires:  gtk-doc
BuildRequires:  intltool
BuildRequires:  libpng-devel
BuildRequires:  perl-XML-Parser
BuildRequires:  pkgconfig(dbus-glib-1)
BuildRequires:  pkgconfig(exo-1)
BuildRequires:  pkgconfig(gconf-2.0)
BuildRequires:  pkgconfig(glib-2.0)
BuildRequires:  pkgconfig(gtk+-2.0)
BuildRequires:  pkgconfig(gudev-1.0)
BuildRequires:  pkgconfig(libexif)
BuildRequires:  pkgconfig(libnotify)
BuildRequires:  pkgconfig(libstartup-notification-1.0)
BuildRequires:  pkgconfig(libxfce4panel-1.0)
BuildRequires:  pkgconfig(libxfce4ui-1)
BuildRequires:  pkgconfig(libxfcegui4-1.0)
BuildRequires:  update-desktop-files
BuildRequires:  xfconf
BuildRequires:  xfce4-dev-tools
Recommends:     %{name}-lang = %{version}
Recommends:     %{name}-doc = %{version}
Recommends:     thunar-volman
Recommends:     gvfs
Recommends:     tumbler
# thunar 1.3.x is the development branch, the next stable version will be 1.4.0
Obsoletes:      thunar = 1.3.0
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Thunar a file manager for the Xfce desktop environment which has been designed
from the ground up to be fast and easy to use. It provides a clean, intuitive,
and fully accessible user interface and does not include any confusing or
useless options by default. Thunar is fast and responsive with good startup and
folder load times.

%package -n libthunarx-2-0
License:        GPLv2+
Summary:        Thunar Extension Library
Group:          System/Libraries
Obsoletes:      libthunarx-2-0 = 1.3.0

%description  -n libthunarx-2-0
Thunar a file manager for the Xfce desktop environment which has been designed
from the ground up to be fast and easy to use. It provides a clean, intuitive,
and fully accessible user interface and does not include any confusing or
useless options by default. Thunar is fast and responsive with good startup and
folder load times.

This package contains the Thunar extension library.

%package doc
License:        GPLv2+
Summary:        Documentation for Thunar
Group:          Documentation/HTML
BuildArch:      noarch
Requires:       %{name} = %{version}
Obsoletes:      thunar-doc = 1.3.0

%description doc
Thunar a file manager for the Xfce desktop environment which has been designed
from the ground up to be fast and easy to use. It provides a clean, intuitive,
and fully accessible user interface and does not include any confusing or
useless options by default. Thunar is fast and responsive with good startup and
folder load times.

This package provides the user documentation for Thunar.


%package devel
License:        GPLv2+
Summary:        Development Files for Thunar
Group:          Development/Libraries/C and C++
Requires:       libpng-devel
Requires:       libthunarx-2-0 = %{version}
Requires:       pkgconfig(dbus-glib-1)
Requires:       pkgconfig(exo-1)
Requires:       pkgconfig(gconf-2.0)
Requires:       pkgconfig(glib-2.0)
Requires:       pkgconfig(gtk+-2.0)
Requires:       pkgconfig(libexif)
Requires:       pkgconfig(libstartup-notification-1.0)
Requires:       pkgconfig(libxfce4panel-1.0)
Requires:       pkgconfig(libxfcegui4-1.0)
Requires:       %{name} = %{version}
Recommends:     %{name}-devel-doc = %{version}
Obsoletes:      thunar-devel = 1.3.0

%description devel
Thunar a file manager for the Xfce desktop environment which has been designed
from the ground up to be fast and easy to use. It provides a clean, intuitive,
and fully accessible user interface and does not include any confusing or
useless options by default. Thunar is fast and responsive with good startup and
folder load times.

This package provides the development files needed for developing extensions for
Thunar.

%package devel-doc
License:        GPLv2+
Summary:        Developer Documentation for Thunar
Group:          Documentation/HTML
BuildArch:      noarch
Requires:       %{name}-devel = %{version}
Obsoletes:      thunar-devel-doc = 1.3.0

%description devel-doc
Thunar a file manager for the Xfce desktop environment which has been designed
from the ground up to be fast and easy to use. It provides a clean, intuitive,
and fully accessible user interface and does not include any confusing or
useless options by default. Thunar is fast and responsive with good startup and
folder load times.

This package provides the developer documentation for Thunar.



%lang_package
%prep
%setup -q -n Thunar-%{version} -a 1
%patch0 -p1
%patch1 -p1

%build
xdt-autogen
%configure \
    --with-helper-path-prefix=%{_libexecdir} \
    --docdir=%{_datadir}/xfce4/Thunar \
    --enable-dbus \
    --enable-exif \
    --enable-startup-notification \
    --enable-pcre \
    --enable-gtk-doc \
    --disable-static
make %{?_smp_mflags} V=1

%install
%make_install
install -D -p -m 644 %{SOURCE2} \
    %{buildroot}%{_datadir}/Thunar/sendto/thunar-sendto-bluetooth.desktop
rm -f %{buildroot}%{_datadir}/xfce4/Thunar/README.*
%suse_update_desktop_file -i Thunar System Utility Core GTK FileManager
%suse_update_desktop_file -i Thunar-bulk-rename System Utility Core GTK Filesystem
%suse_update_desktop_file thunar-settings
%suse_update_desktop_file -i Thunar-folder-handler System Utility Core GTK FileManager
%suse_update_desktop_file %{buildroot}%{_datadir}/Thunar/sendto/thunar-sendto-bluetooth.desktop
%find_lang Thunar
rm -f %{buildroot}%{_libdir}/*.la
rm -f %{buildroot}%{_libdir}/thunarx-2/*.la
rm -f %{buildroot}%{_libdir}/xfce4/panel/plugins/*.la
( cd %{buildroot}%{_mandir}/man1/ && ln -sf Thunar.1* \
    $(printf "%s\n" Thunar.1* | tr [:upper:] [:lower:]) )
%fdupes %{buildroot}%{_datadir}

%clean
rm -rf %{buildroot}

%post -n libthunarx-2-0 -p /sbin/ldconfig

%postun -n libthunarx-2-0 -p /sbin/ldconfig

%if 0%{?suse_version} >= 1140

%post
%desktop_database_post
%icon_theme_cache_post

%postun
%desktop_database_postun
%icon_theme_cache_postun
%endif

%files
%defattr(-,root,root)
%doc README ChangeLog COPYING AUTHORS FAQ HACKING THANKS TODO docs/README.*
%dir %{_sysconfdir}/xdg/Thunar
%config %{_sysconfdir}/xdg/Thunar/uca.xml
%{_bindir}/Thunar
%{_bindir}/thunar
%{_bindir}/thunar-settings
%dir %{_libexecdir}/Thunar
%{_libexecdir}/Thunar/ThunarBulkRename
%{_libexecdir}/Thunar/ThunarHelp
%{_libexecdir}/Thunar/thunar-sendto-email
%{_libdir}/thunarx-2
%{_libdir}/xfce4/panel/plugins/libthunar-tpa.so
%{_datadir}/Thunar
%{_datadir}/applications/*.desktop
%{_datadir}/dbus-1/services/org.xfce.FileManager.service
%{_datadir}/dbus-1/services/org.xfce.Thunar.service
%{_datadir}/icons/hicolor/*/*/*.png
%{_datadir}/icons/hicolor/*/*/*.svg
%{_datadir}/icons/hicolor/*/*/*/*.png
%{_datadir}/pixmaps/Thunar
%{_datadir}/xfce4/panel-plugins/thunar-tpa.desktop
%{_datadir}/Thunar/sendto
%doc %{_mandir}/man1/Thunar.1*
%doc %{_mandir}/man1/thunar.1*

%files -n libthunarx-2-0
%defattr(-,root,root)
%{_libdir}/libthunarx-2.so.*

%files doc
%defattr(-,root,root)
%dir %{_datadir}/xfce4
%dir %{_datadir}/xfce4/Thunar
%doc %{_datadir}/xfce4/Thunar/html/

%files devel
%defattr(-,root,root)
%dir %{_includedir}/thunarx-2
%dir %{_includedir}/thunarx-2/thunarx
%{_includedir}/thunarx-2/thunarx/*.h
%{_libdir}/libthunarx-2.so
%{_libdir}/pkgconfig/thunarx-2.pc

%files devel-doc
%defattr(-,root,root)
%doc %{_datadir}/gtk-doc/html/thunarx

%files lang -f Thunar.lang

%changelog
openSUSE Build Service is sponsored by