File clipgrab.spec of Package clipgrab

# spec file for package clipgrab
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2008-2013
# 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

Name:           clipgrab
Version:        3.6.8
Release:        0
Summary:        Video downloader
License:        GPL-3.0+
Group:          Productivity/Multimedia/Video/Editors and Convertors
Source1:        %{name}.desktop
# PATCH-FIX-UPSTREAM clipgrab-qt5.patch -- build against Qt5
Patch0:         %{name}-qt5.patch
BuildRequires:  ImageMagick
BuildRequires:  hicolor-icon-theme >= 0.15
BuildRequires:  openjpeg
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(Qt5WebKit)
BuildRequires:  pkgconfig(Qt5WebKitWidgets)
BuildRequires:  pkgconfig(Qt5Xml)
Requires:       ffmpeg
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

A program which downloads and converts online videos from YouTube, Vimeo,
DailyMotion, MyVideo and many other platforms.

%setup -q
%patch0 -p1
chmod 0644 COPYING

# none too clean, but it beats depending on icns-utils which has problems on non-x86 archs
dd if=%{name}.icns of=icon512.jp2 bs=1 skip=71836 count=79384
# can't use ImageeMagick convert directly for it has no jpeg2000 support, cf. (boo#1036939)
j2k_to_image -i icon512.jp2 -o 512.png
for s in 16 32 128 256 ; do
    convert -strip -resize ${s}x${s} 512.png ${s}.png
rm -f moc_*
qmake-qt5 %{name}.pro QMAKE_CXXFLAGS="%{optflags}"
make %{?_smp_mflags} clean
make %{?_smp_mflags}

install -D -m0644 %{SOURCE1} %{buildroot}/%{_datadir}/applications/%{name}.desktop
install -D -m0755 %{name} %{buildroot}/%{_bindir}/%{name}
for s in 16 32 128 256 512; do
    install -D -m0644 "${s}.png" "%{buildroot}%{_datadir}/icons/hicolor/${s}x${s}/apps/%{name}.png"
%suse_update_desktop_file -r %{name} Video Editor




openSUSE Build Service is sponsored by