File k3b.spec of Package k3b

# spec file for package k3b
# Copyright (c) 2016 SUSE LINUX 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

%bcond_without ffmpeg

Name:           k3b
Version:        2.0.3
Release:        0
Summary:        CD/DVD/Blu-ray Burning Application for KDE
License:        GPL-2.0+
Group:          Productivity/Multimedia/CD/Record
# PATCH-FIX-OPENSUSE initial-preference.diff -- Make the default handler for .iso files instead of Ark
Patch0:         initial-preference.diff
# PATCH-FIX-OPENSUSE building-docs-once-is-enough.patch  -- Fix build when CMP002 policy is set to NEW
Patch1:         building-docs-once-is-enough.patch
# PATCH-FIX-UPSTREAM fix-dvd-transcoding.patch kde#350403 -- Fix transcoding of DVD titles
Patch2:         fix-dvd-transcoding.patch
# PATCH-FIX-UPSTREAM k3b-2.0.3-gcc6.patch -- Fix build with GCC 6
Patch3:         k3b-2.0.3-gcc6.patch
# PATCH-FIX arch linux k3b-ffmpeg3.patch - fix build with ffmpeg 3x abi
Patch4:         k3b-ffmpeg3.patch

BuildRequires:  fdupes
BuildRequires:  flac-devel
BuildRequires:  libdvdread-devel
BuildRequires:  libkcddb4-devel
BuildRequires:  libmpcdec-devel
BuildRequires:  libmusicbrainz-devel
BuildRequires:  libsamplerate-devel
BuildRequires:  libsndfile-devel
BuildRequires:  libvorbis-devel
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(taglib)
%if %{with ffmpeg}
BuildRequires:  pkgconfig(libavcodec)
BuildRequires:  pkgconfig(libavformat)
Requires:       %{_bindir}/cdrdao
Requires:       %{_bindir}/cdrecord
Requires:       %{_bindir}/mkisofs
Requires:       %{_bindir}/readcd
Requires:       dvd+rw-tools
Requires(post):  hicolor-icon-theme
Requires(postun):  hicolor-icon-theme
Requires(post): shared-mime-info
Requires(postun): shared-mime-info
Recommends:     %{_bindir}/normalize
Recommends:     %{_bindir}/sox
Recommends:     %{_bindir}/transcode
Recommends:     %{name}-lang = %{version}
Recommends:     vcdimager
Provides:       kde4-k3b = 4.2.2.svn951754
Obsoletes:      kde4-k3b < 4.2.2.svn951754
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

Featuring a simple, yet powerful graphical interface, k3b provides various
options for burning a CD, DVD, or BD (Blu-ray disc). Various types of optical
projects are supported including (but not limited to) audio and data, video
projects for DVD and VCD, as well as multi-session and mixed-mode discs. k3b
also has the ability to erase re-writeable media and can perform more
complicated tasks such as audiovisual encoding and decoding.

%package devel
Summary:        Development files for k3b
Group:          Development/Libraries/C and C++
Requires:       %{name} = %{version}

%description devel
This package contain files needed for development with k3b.


%setup -q
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1

CXXFLAGS="%{optflags} -fno-strict-aliasing"
%cmake_kde4 -d build -- -DK3B_ENABLE_HAL_SUPPORT=OFF

%kde4_makeinstall -C build

%suse_update_desktop_file -r k3b Qt KDE AudioVideo DiscBurning

# symlink solid actions into place known to Plasma 5, remove once k3b is KF5-based
mkdir -p %{buildroot}%{_datadir}/solid/actions
pushd %{buildroot}%{_kde4_appsdir}/solid/actions/
for i in k3b_*.desktop; do
ln -s %{_kde4_appsdir}/solid/actions/$i %{buildroot}%{_datadir}/solid/actions/

%fdupes -s %{buildroot}

%find_lang k3b k3b.lang
%find_lang k3bsetup k3b.lang
%find_lang libk3b k3b.lang
%find_lang libk3bdevice k3b.lang
%find_lang kio_videodvd k3b.lang




%doc %{_kde4_htmldir}/en/k3b/
%dir %{_kde4_appsdir}/solid
%dir %{_kde4_appsdir}/solid/actions
%dir %{_datadir}/solid
%dir %{_datadir}/solid/actions
%config %{_sysconfdir}/dbus-1/system.d/org.kde.kcontrol.k3bsetup.conf

%files devel

%files lang -f k3b.lang
%exclude %{_kde4_htmldir}/en/k3b/