File PhotoFilmStrip.spec of Package PhotoFilmStrip

%define lcname photofilmstrip

Name:		PhotoFilmStrip
Version:	2.0.0
Release:	1
License:	GPL
Group:		Video
Summary:	PhotoFilmStrip creates movies
URL:		http://www.photofilmstrip.org/1-1-Home.html
Source:		%{lcname}-%{version}.tar.gz
BuildRoot:	%{_tmppath}/%{lcname}-%{release}-%{version}-buildroot
BuildRequires:  python-devel
BuildRequires:  python-imaging
BuildRequires:  python-wxWidgets
BuildRequires:  python-setuptools
BuildRequires:  ImageMagick
Requires:       python
Requires:       python-imaging
Requires:       python-wxWidgets
Requires:       mencoder
%if 0%{?suse_version} <= 1110
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
%else
BuildArch:      noarch
%py_requires
%endif

%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.

#german
%description -l de
PhotoFilmStrip erstellt Videoclips aus Bildern in nur 3 Schritten. Bilder
auswählen, Bewegungspfad bestimmen und Video erzeugen. Es stehen Ausgabeformate
für VCD, SVCD, DVD und FULL-HD zur Verfügung.

Der Slideshow-Effekt ist auch als “Ken Burns”-Effekt bekannt. Bildkommentare
werden in eine Untertiteldatei generiert. Weiterhin kann in der Slideshow eine
Hintergrundmusik verwendet werden.

Im Gegensatz zu anderen Programmen, bietet PhotoFilmStrip die Möglichkeit, die
Slideshow in Full-HD (1920×1080) Auflösung zu erzeugen.

%prep
%setup -q -n %{lcname}-%{version}
# compatibility patch for Pillow [hpj@urpla.net]
sed -i 's|import Image|from PIL import Image|' photofilmstrip/core/__init__.py
sed -i 's|^import Image, ImageDraw|from PIL import Image, ImageDraw|' photofilmstrip/core/PILBackend.py
# fix categories [hpj@urpla.net]
sed -i 's|^Categories=AudioVideo;|Categories=AudioVideo;AudioVideoEditing;|' data/photofilmstrip.desktop

%build

%install
rm -rf %{buildroot}
python setup.py install --prefix=%{_prefix} --root=%{buildroot}

# Install icon
for res in 16x16 22x22 24x24 36x36 72x72 96x96; do \
  %{__mkdir_p} %{buildroot}/%{_datadir}/icons/hicolor/${res}/apps
  convert -size 192x192 %{buildroot}/%{_datadir}/icons/hicolor/192x192/apps/photofilmstrip.png -resize ${res} %{buildroot}/%{_datadir}/icons/hicolor/${res}/apps/%{lcname}.png
done;

%clean
rm -rf %{buildroot}

%files 
%defattr(-,root,root)
%{_datadir}/doc/%{lcname}
%{_bindir}/%{lcname}
%{_bindir}/%{lcname}-cli
%{_datadir}/applications/%{lcname}.desktop
%{_datadir}/locale/*
%{_datadir}/%{lcname}/
%{_datadir}/pixmaps/%{lcname}.xpm
%{_datadir}/icons/hicolor/*/apps/%{lcname}.png
%{python_sitelib}/photofilmstrip
%{python_sitelib}/photofilmstrip-*

%changelog