File winff.spec of Package winff

#
# spec file for package winff
#
# Copyright (c) 2014 SUSE LINUX Products 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:		winff
Summary:	A cross platform batch GUI for FFmpeg
Version:	1.6.4
Release:	1
# Old Homepage and Source
#URL:		http://winff.org/
#Source0:	http://winff.org/docs/source/%%{name}-%%{version}-source.tar.gz

URL:        https://github.com/WinFF/winff
Source0:	https://github.com/WinFF/winff/archive/refs/tags/%{name}-%{version}.tar.gz

Source1:	winff.desktop
#Patch0:		winff-presets.patch
Patch1:		winff-lpi.patch
###Patch2:		winff-version.patch
# PATCH-FIX-UPSTREAM enable-build-with-lazarus-1.8.patch: fix build error with new lazarus/fpc
###Patch3:		enable-build-with-lazarus-1.8.patch
License:	GPL-3.0
Group:		Productivity/Multimedia/Video/Editors and Convertors
#BuildRequires:	ffmpeg-devel
BuildRequires:	libcdio-paranoia-devel
BuildRequires:	dos2unix
BuildRequires:	fpc
BuildRequires:	fpc-src
BuildRequires:	glib2-devel
BuildRequires:	gtk2-devel
BuildRequires:	lazarus
BuildRequires:	xorg-x11-devel
BuildRequires:	update-desktop-files
BuildRequires:	fdupes
BuildRequires:	pkgconfig(libavresample)
BuildRequires:	pkgconfig(libavutil)
Requires:       ffmpeg
BuildRoot:	%{_tmppath}/%{name}-%{version}-build

%description
WinFF is a GUI for the command line video converter FFMPEG.
It will convert most any video file that FFmpeg will convert.
WinFF does multiple files in multiple formats at one time.
You can for example convert mpeg's, flv's, and mov's, all into avi's all at once.

%prep

%setup -q -n %{name}-winff-%{version}
#%%patch0 -p1
%patch -P 1 -p1
###%%patch -P 2 -p1
###%%patch- P 3 -p1
###dos2unix *.txt
#ecs#chmod 644 AUTHORS *.txt docs/*.pdf docs/*.odg docs/*.odt docs/*.txt winff-icons/*.txt
# rmove exec bits
###chmod a-x {README*.txt,changelog.txt,AUTHORS,docs/*.pdf,docs/*.odt,docs/*.odg,docs/*.txt,winff-icons/*.txt}


%build
pushd winff
lazbuild \
	--lazarusdir=%{_libdir}/lazarus \
%ifarch x86_64
	--cpu=x86_64 \
%endif
	--widgetset=gtk2 \
	-B winff.lpr
popd

%install
install -D -m755 winff/winff %buildroot%{_bindir}/winff
install -D -m644 %{S:1} %buildroot%{_datadir}/applications/winff.desktop
install -D -m644 winff/presets.xml %buildroot%{_datadir}/winff/presets.xml
install -d -m755 %buildroot%{_datadir}/winff/languages/
install -m644 winff/languages/*.po %buildroot%{_datadir}/winff/languages/
install -d -m755 %buildroot%{_mandir}/man1
install -m644 winff/winff.1 %buildroot%{_mandir}/man1

install -d -m755 %buildroot%{_datadir}/icons/hicolor
for i in 16 24 32 48; do
  install -d -m755 %buildroot%{_datadir}/icons/hicolor/"$i"x"$i"/apps
  install -m644 winff/winff-icons/"$i"x"$i"/*.png %buildroot%{_datadir}/icons/hicolor/"$i"x"$i"/apps
done
%suse_update_desktop_file -r "%{name}" AudioVideo AudioVideoEditing
%fdupes %buildroot


%clean
rm -rf %buildroot

%files
%defattr(-,root,root)
%license winff/COPYING
%doc README.md winff/AUTHORS winff/*.txt winff/docs/*.pdf winff/docs/*.odg winff/docs/*.odt winff/docs/*.txt winff/winff-icons/*.txt
%{_bindir}/winff
%{_datadir}/applications/winff.desktop
%{_datadir}/icons/*
%dir %{_datadir}/winff
%{_datadir}/winff/presets.xml
%dir %{_datadir}/winff/languages
%{_datadir}/winff/languages/*.po
%{_mandir}/man1/*


%changelog
openSUSE Build Service is sponsored by