File vidcutter.spec of Package vidcutter

#
# spec file for package vidcutter
#
# 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/
#


Name:           vidcutter
Version:        3.5.0
Release:        0
Summary:        Video cutter and joiner
License:        GPL-3.0+
Group:          Productivity/Multimedia/Video/Editors and Convertors
Url:            http://vidcutter.ozmartians.com/
Source0:        https://github.com/ozmartian/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source99:       %{name}-rpmlintrc
# PATCH-FIX-OPENSUSE vidcutter-setup.patch
Patch0:         %{name}-setup.patch
BuildRequires:  desktop-file-utils
BuildRequires:  fdupes
BuildRequires:  hicolor-icon-theme
BuildRequires:  python3-devel
BuildRequires:  python3-setuptools
BuildRequires:  update-desktop-files
Requires:       ffmpeg
Requires:       libmpv1
Requires:       mediainfo
Requires:       python3-qt5
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

%description
Vidcutter is a Qt5-based application for video trimming/splitting
and merging/joining. The backend is driven by FFmpeg.

%prep
%setup -q
%patch0 -p1
# remove shebang
export _filelist="
videolist.py __init__.py videoslider.py __main__.py libs/videoservice.py libs/widgets.py
videotoolbar.py libs/mpv.py videoinfo.py updater.py videoframe.py videostyles.py about.py
videocutter.py"
for f in $_filelist; do
    sed -i -e "1d" vidcutter/${f}
done

%build
python3 setup.py build

%install
python3 setup.py install --root %{buildroot}
%fdupes -s %{buildroot}%{_datadir}

%post
%desktop_database_post
%icon_theme_cache_post

%postun
%desktop_database_postun
%icon_theme_cache_postun

%files
%defattr(-,root,root)
%doc LICENSE README.md
%{_bindir}/%{name}
%{python3_sitelib}/%{name}-%{version}-py*.egg-info/
%{python3_sitelib}/%{name}/
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/16x16/apps/%{name}.png
%{_datadir}/icons/hicolor/22x22/apps/%{name}.png
%{_datadir}/icons/hicolor/24x24/apps/%{name}.png
%{_datadir}/icons/hicolor/32x32/apps/%{name}.png
%{_datadir}/icons/hicolor/48x48/apps/%{name}.png
%{_datadir}/icons/hicolor/64x64/apps/%{name}.png
%{_datadir}/icons/hicolor/128x128/apps/%{name}.png
%{_datadir}/icons/hicolor/256x256/apps/%{name}.png
%{_datadir}/icons/hicolor/512x512/apps/%{name}.png
%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
%{_datadir}/mime/packages/x-%{name}.xml
%{_datadir}/pixmaps/%{name}.svg

%changelog
openSUSE Build Service is sponsored by