File kdenlive.spec of Package kdenlive

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


%define mlt_version 6.0.0

Name:           kdenlive
Version:        16.08.2
Release:        0
Summary:        Non-linear video editor
License:        GPL-3.0+
Group:          Productivity/Multimedia/Video/Editors and Convertors
Url:            http://www.kdenlive.org/
Source0:        http://download.kde.org/stable/applications/16.08.2/src/%{name}-%{version}.tar.xz
Patch1:         use-mlt_datadir.patch
BuildRequires:  desktop-file-utils
BuildRequires:  fdupes
BuildRequires:  hicolor-icon-theme
BuildRequires:  shared-mime-info
BuildRequires:  pkgconfig(gl)
BuildRequires:  pkgconfig(glu)
BuildRequires:  pkgconfig(glew)
BuildRequires:  pkgconfig(libv4l2)
BuildRequires:  libmlt-devel
BuildRequires:  pkgconfig(mlt++) >= %{mlt_version}
BuildRequires:  pkgconfig(mlt-framework) >= %{mlt_version}
BuildRequires:  pkgconfig(x11)
BuildRequires:  extra-cmake-modules
BuildRequires:  pkgconfig(Qt5Core)
BuildRequires:  pkgconfig(Qt5DBus)
BuildRequires:  pkgconfig(Qt5Widgets)
BuildRequires:  pkgconfig(Qt5Script)
BuildRequires:  pkgconfig(Qt5Svg)
BuildRequires:  pkgconfig(Qt5OpenGL)
BuildRequires:  pkgconfig(Qt5Test)
BuildRequires:  pkgconfig(Qt5Concurrent)
BuildRequires:  pkgconfig(Qt5Qml)
BuildRequires:  kconfig-devel
BuildRequires:  karchive-devel
BuildRequires:  kcoreaddons-devel
BuildRequires:  kconfigwidgets-devel
BuildRequires:  kdbusaddons-devel
BuildRequires:  kio-devel
BuildRequires:  kdoctools-devel
BuildRequires:  knotifications-devel
BuildRequires:  kwidgetsaddons-devel
BuildRequires:  kplotting-devel
BuildRequires:  knotifyconfig-devel
BuildRequires:  knewstuff-devel
BuildRequires:  kxmlgui-devel
BuildRequires:  kiconthemes-devel
BuildRequires:  ktextwidgets-devel
BuildRequires:  kguiaddons-devel
BuildRequires:  kcrash-devel
%define melt_path %(pkg-config --variable=meltbin mlt-framework)
Requires:       %{melt_path}
# Waiting for the day all libraries have versioned symbols...
Requires:       %(rpm -qf $(readlink -qne %{_libdir}/libmlt++.so) --qf '%{NAME}') >= %{mlt_version}
Requires:       %(rpm -qf $(readlink -qne %{_libdir}/libmlt.so) --qf '%{NAME}') >= %{mlt_version}
# Without a few of the plugins it crashes on start
Requires:       %(rpm -qf $(readlink -qne %{_libdir}/libmlt.so) --qf '%{NAME}')-modules
# It requires the profiles
Requires:       %(rpm -qf $(readlink -qne %{_libdir}/libmlt.so) --qf '%{NAME}')-data
# It doesn't start without it (boo#994649)
Requires:       libqt5-qtquickcontrols
Recommends:     %{_bindir}/dvdauthor
Recommends:     %{_bindir}/dvgrab
Recommends:     %{_bindir}/ffmpeg
Recommends:     %{_bindir}/ffplay
Recommends:     %{_bindir}/genisoimage
%define mlt_soname %(pkg-config --variable=moduledir mlt-framework | sed 's/.*-\\([0-9]\\+\\)/\\1/')
Recommends:     mlt(%{mlt_soname})(avformat)
Obsoletes:      kdenlive5 < %{version}
Provides:       kdenlive5 = %{version}

%description
Kdenlive is a non-linear video editor for GNU/Linux and FreeBSD, which supports
DV, AVCHD (experimental support) and HDV editing. Kdenlive relies on several
other open source projects, such as FFmpeg and the MLT video framework. It was
designed to answer all needs, from basic video editing to semi-professional
work.

%prep
%setup -q
#patch1 -p1

%build
%cmake_kf5 -d build
%make_jobs

%install
%kf5_makeinstall -C build
%fdupes -s %{buildroot}

%post
%icon_theme_cache_post
%icon_theme_cache_post oxygen
%mime_database_post
%desktop_database_post

%postun
%desktop_database_postun
%mime_database_postun
%icon_theme_cache_postun oxygen
%icon_theme_cache_postun

%files
%defattr(0644,root,root,0755)
%doc AUTHORS COPYING README
%attr(0755,-,-) %{_bindir}/%{name}
%attr(0755,-,-) %{_bindir}/%{name}_render
%dir %_kf5_configkcfgdir
%_kf5_configkcfgdir/kdenlivesettings.kcfg
%_datadir/kdenlive/
%_mandir/man1/*
%_datadir/mime/packages/*
%_kf5_applicationsdir/org.kde.kdenlive.desktop
%_datadir/kxmlgui5/kdenlive/
%(config) %_kf5_configdir/*.knsrc
%_kf5_plugindir/mltpreview.so
%_datadir/knotifications5/kdenlive.notifyrc
%_kf5_servicesdir/mltpreview.desktop
%_kf5_htmldir/en/kdenlive/
%_kf5_appstreamdir/
%{_kf5_iconsdir}/hicolor/*/*/*

%changelog
openSUSE Build Service is sponsored by