File spacefm.spec of Package spacefm

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


%bcond_with gtk2
Name:           spacefm
Version:        1.0.3
Release:        0
Summary:        Multi-panel tabbed file and desktop manager
License:        GPL-3.0+ and LGPL-3.0+
Group:          Productivity/File utilities
Url:            http://ignorantguru.github.io/spacefm
Source:         https://github.com/IgnorantGuru/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  fdupes
BuildRequires:  hicolor-icon-theme
BuildRequires:  intltool
BuildRequires:  libtool
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(gobject-2.0)
BuildRequires:  pkgconfig(gthread-2.0)
BuildRequires:  pkgconfig(libudev) >= 143
Requires:       desktop-file-utils
Requires:       shared-mime-info
Recommends:     %{name}-lang
# Mount without root requirement.
Recommends:     udisks2
# Plugin download.
Recommends:     wget
# Execution of SpaceFM and applications from root.
Recommends:     xdg-utils
%if %{with gtk2}
BuildRequires:  pkgconfig(gtk+-2.0) >= 2.18.0
%else
BuildRequires:  pkgconfig(gtk+-3.0) >= 3.0.0
%endif
%if 0%{?packman_bs}
BuildRequires:  pkgconfig(libffmpegthumbnailer)
%endif

%description
SpaceFM is a multi-panel tabbed file and desktop manager for GNU/Linux
with built-in VFS, udev-based device manager, customizable menu system
and bash integration. SpaceFM is popular among novice and power users
alike for its stability, speed, convenience and flexibility.

%lang_package

%prep
%setup -q
echo 'tmp_dir=%{_tmppath}' > %{name}.conf

%build
autoreconf -fi
%configure \
  --with-preferable-sudo=%{_bindir}/xdg-su \
%if !0%{?packman_bs}
  --disable-video-thumbnails               \
%endif
  --htmldir=%{_docdir}/%{name}
make %{?_smp_mflags}

%install
%make_install
install -Dm 0644 %{name}.conf %{buildroot}%{_sysconfdir}/%{name}/%{name}.conf
%suse_update_desktop_file -G 'Search for Files' %{name}-find GTK System Utility FileManager
%fdupes %{buildroot}
%find_lang %{name}

%post
%desktop_database_post
%mime_database_post
%icon_theme_cache_post

%postun
%desktop_database_postun
%mime_database_postun
%icon_theme_cache_postun

%files
%defattr(-,root,root)
%doc AUTHORS COPYING COPYING-LGPL ChangeLog README
%dir %{_sysconfdir}/%{name}/
%config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf
%{_bindir}/%{name}*
%{_datadir}/%{name}/
%{_datadir}/applications/%{name}*.desktop
%{_datadir}/icons/hicolor/*/apps/%{name}*.png
%{_datadir}/icons/Faenza/
%{_datadir}/mime/packages/%{name}-mime.xml

%files lang -f %{name}.lang
%defattr(-,root,root)

%changelog
openSUSE Build Service is sponsored by