File PhotoFilmStrip.spec of Package PhotoFilmStrip
#
# spec file for package PhotoFilmStrip
#
# Copyright (c) 2022 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#
###BuildRequires: python3-setuptools
%define X_Display ":98"
Name: PhotoFilmStrip
Version: 4.1.0
Release: 0
Summary: Creates movies out of your pictures in just 3 steps
License: GPL-2.0-or-later
Group: Productivity/Multimedia/Video/Editors and Convertors
URL: https://www.photofilmstrip.org/
Source0: https://github.com/PhotoFilmStrip/PFS/archive/v%{version}/%{name}-%{version}.tar.gz
BuildRequires: fdupes
BuildRequires: gettext
BuildRequires: hicolor-icon-theme
BuildRequires: pkgconfig
BuildRequires: python-rpm-generators
BuildRequires: python-rpm-macros
BuildRequires: python3
BuildRequires: python3-Pillow
BuildRequires: python3-numpy
# wxPython < 4.1.0 is require because of erros in >= 4.1.0. Search for wx._core.wxAssertionError: C++ assertion.
# Its only need for building.
#BuildRequires: python3-wxPython < 4.1.0
#BuildRequires: python3-wxPython >= 4.0.1
BuildRequires: python3-wxPython
BuildRequires: wxGTK3-3_2-devel
BuildRequires: xorg-x11-server
BuildRequires: pkgconfig(gstreamer-1.0)
Requires: gstreamer
Requires: gstreamer-editing-services
Requires: gstreamer-plugins-base
#Requires: mencoder
Requires: python3-Pillow
Requires: python3-numpy
Requires: python3-wxPython
Recommends: %{name}-lang
Recommends: gstreamer-plugins-bad
Recommends: gstreamer-plugins-good
Recommends: mencoder
BuildArch: noarch
#%%{?python_enable_dependency_generator}
%description
PhotoFilmStrip creates movies out of your pictures in just 3 steps. First select your photos, customize the motion path and render the video. There are several output possibilities for VCD, SVCD, DVD up to FULL-HD.
The effect of the slideshow is known as "Ken Burns". Comments of the pictures are generated into a subtitle file. Furthermore an audio file can be specified to setup the background musice for the slide show.
In contrary to other projects i know so far, PhotoFilmStrip has the opportunity to render slide show in Full-HD (1920x1080) resolution.
%lang_package
%prep
%setup -q -n PFS-%{version}
find -type f \( -name "CLI.py" -or -name "GUI.py" \) -exec sed -i -i 's|\/usr\/bin\/python|\/usr\/bin\/python3|g' {} \;
find ./scripts -type f -name "photofilmstrip*" -exec sed -i -e 's|#!python|#!/usr/bin/python3|g' {} \;
find -type f -name "*.bat" -delete
%build
###%%python3_build
export DISPLAY=%{X_Display}
Xvfb %{X_Display} >& Xvfb.log &
trap "kill $! || true" EXIT
sleep 20
python3 setup.py build
%install
###%%python3_install
export DISPLAY=%{X_Display}
Xvfb %{X_Display} >& Xvfb.log &
trap "kill $! || true" EXIT
sleep 25
python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
# Fix path. Under prep it does not work in suse_version >= 1600. Only in < 1600. Why?
find %{buildroot}/usr/bin -type f -name "photofilmstrip*" -exec sed -i -e 's|#!python|#!/usr/bin/python3|g' {} \;
%fdupes %{buildroot}%{python3_sitelib}
%find_lang %{name}
%files
%license LICENSE COPYING
%doc docs/
%{_bindir}/photofilmstrip
%{_bindir}/photofilmstrip-cli
%{_datadir}/applications/photofilmstrip.desktop
%{_datadir}/icons/hicolor/*/apps/photofilmstrip*.png
%{_datadir}/icons/hicolor/*/apps/photofilmstrip*.svg
%{_datadir}/pixmaps/photofilmstrip.xpm
%dir %{_datadir}/photofilmstrip/
%dir %{_datadir}/photofilmstrip/audio/
%{_datadir}/photofilmstrip/audio/*mp3
%{python3_sitelib}/*
%files lang -f %{name}.lang
%changelog