File engrampa.spec of Package engrampa

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


%define _version 1.18
Name:           engrampa
Version:        1.18.1
Release:        0
Summary:        MATE Desktop archive manager
License:        GPL-2.0+ and LGPL-2.0+
Group:          System/GUI/Other
Url:            https://mate-desktop.org/
Source:         http://pub.mate-desktop.org/releases/%{_version}/%{name}-%{version}.tar.xz
BuildRequires:  caja >= %{_version}
BuildRequires:  hicolor-icon-theme
BuildRequires:  libxml2-python
BuildRequires:  mate-common >= %{_version}
BuildRequires:  pkgconfig
BuildRequires:  update-desktop-files
BuildRequires:  yelp-tools
BuildRequires:  pkgconfig(glib-2.0)
BuildRequires:  pkgconfig(gtk+-3.0) >= 3.14
BuildRequires:  pkgconfig(libcaja-extension) >= %{_version}
BuildRequires:  pkgconfig(sm)
Recommends:     %{name}-lang
# mate-file-archiver was last used in openSUSE 13.1.
Provides:       mate-file-archiver = %{version}
Obsoletes:      mate-file-archiver < %{version}
Obsoletes:      mate-file-archiver-lang < %{version}
%glib2_gsettings_schema_requires

%description
Engrampa is an archive manager for the MATE Desktop Environment.
This means that you can create and modify archives; view the
content of an archive; view and modify a file contained in the
archive; extract files from the archive.

%lang_package

%package -n caja-%{name}
Summary:        MATE Desktop engrampa plugin for caja
Group:          System/GUI/Other
Requires:       %{name} = %{version}-%{release}
# mate-file-manager-engrampa was last used in openSUSE 13.1.
Provides:       mate-file-manager-%{name} = %{version}
Obsoletes:      mate-file-manager-%{name} < %{version}

%description -n caja-engrampa
Engrampa is an archive manager for the MATE Desktop Environment.
This means that you can create and modify archives; view the
content of an archive; view and modify a file contained in the
archive; extract files from the archive.

%prep
%setup -q

%build
NOCONFIGURE=1 mate-autogen
%configure \
  --disable-static                    \
  --disable-scrollkeeper              \
  --libexecdir=%{_libexecdir}/%{name}
make %{?_smp_mflags} V=1

%install
%make_install
%find_lang %{name} %{?no_lang_C}
find %{buildroot} -type f -name "*.la" -delete -print

%post
%desktop_database_postun
%icon_theme_cache_postun
%glib2_gsettings_schema_post

%postun
%desktop_database_postun
%icon_theme_cache_postun
%glib2_gsettings_schema_postun

%files
%defattr(-,root,root)
%doc AUTHORS COPYING NEWS README
%{_bindir}/%{name}
%{_libexecdir}/%{name}/
%{_datadir}/dbus-1/services/org.mate.Engrampa.service
%{_datadir}/%{name}/
%{_datadir}/glib-2.0/schemas/*.xml
%{_datadir}/help/C/%{name}/
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/*/*/*
%dir %{_datadir}/appdata/
%{_datadir}/appdata/%{name}.appdata.xml
%{_mandir}/man?/%{name}.?%{?ext_man}

%files -n caja-%{name}
%defattr(-,root,root)
%{_datadir}/caja/extensions/libcaja-engrampa.caja-extension
%{_libdir}/caja/extensions-2.0/libcaja-%{name}.so

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

%changelog