File curlew.spec of Package curlew

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


Name:           curlew
Version:        0.2.5
Release:        0
Summary:        Multimedia converter
License:        Beerware
Group:          Productivity/Multimedia/Video/Editors and Convertors
URL:            http://sourceforge.net/projects/curlew/
Source0:        http://sourceforge.net/projects/curlew/files/curlew-%{version}/%{name}-%{version}.tar.gz
# PATCH-FIX-OPENSUSE sitelib.patch avvissu@yandex.ru -- Change path to files (use site-packages)
Patch0:         curlew-sitelib.patch
BuildRequires:  dbus-1-python3
BuildRequires:  gobject-introspection
BuildRequires:  hicolor-icon-theme
BuildRequires:  intltool
BuildRequires:  python3-base >= 3.3.2
BuildRequires:  python3-gobject >= 3.12.0
BuildRequires:  python3-setuptools
BuildRequires:  rsvg-convert
BuildRequires:  update-desktop-files
Requires:       dbus-1-python3
Requires:       ffmpeg
Requires:       mediainfo
Requires:       mencoder
Requires:       python3-gobject
Requires:       xdg-utils
# Conflict with ffmpeg
#Requires:       libav-tools
BuildArch:      noarch

%description
Easy to use, Free and Open-Source Multimedia converter for Linux.
Curlew written in python and GTK3 and it depends on (ffmpeg/avconv,
mencoder).

Main Features:
  - Easy to use with simple user interface.
  - Hide the advanced options with the ability to show them.
  - Convert to more than 100 different formats.
  - Show file informations (duration, remaining time, estimated size,
    progress value).
  - Allow to skip or remove file during conversion process.
  - Preview file before conversion.
  - Convert a specified portion of file.
  - Combine subtitle with video file.
  - Show error details if exist.
  - And more ...

%lang_package

%prep
%setup -q
%patch0 -p1

# Fix: spurious-executable-perm
find . -type f -perm /u+x -exec chmod 644 {} \; || :

%build
python3 setup.py build

%install
python3 setup.py install --root=%{buildroot}
%suse_update_desktop_file -r %{name} AudioVideo Video AudioVideoEditing
%find_lang %{name}

%post
%icon_theme_cache_post
%desktop_database_post

%postun
%icon_theme_cache_postun
%desktop_database_postun

%files
%license LICENSE*
%doc AUTHORS changelog README
%{_bindir}/%{name}
%{_datadir}/%{name}/
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/*/apps/%{name}.??g
%{python3_sitelib}/%{name}-*.egg-info
%{python3_sitelib}/%{name}/

%files lang -f %{name}.lang

%changelog