File k9copy.spec of Package k9copy
#
# spec file for package k9copy
#
# Copyright (c) 2022 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#
Name: k9copy
Summary: DVD backup utility
Version: 3.0.3
Release: 0
Url: http://%{name}-reloaded.sourceforge.net/
Source0: %{name}-%{version}.tar.xz
Patch0: %{name}-desktop_files.patch
Patch1: %{name}-dvdread.patch
Patch2: %{name}-ffmpeg.patch
Patch3: %{name}-installdirs.patch
Patch4: %{name}-gcc.patch
Patch5: %{name}-cmake.patch
License: GPL-2.0-only
Group: Productivity/Multimedia/CD/Record
BuildRequires: extra-cmake-modules
BuildRequires: kdelibs4support
BuildRequires: update-desktop-files
BuildRequires: cmake(KF5Archive)
BuildRequires: cmake(KF5Bookmarks)
BuildRequires: cmake(KF5Config)
BuildRequires: cmake(KF5ConfigWidgets)
BuildRequires: cmake(KF5CoreAddons)
BuildRequires: cmake(KF5Crash)
BuildRequires: cmake(KF5DBusAddons)
BuildRequires: cmake(KF5DocTools)
BuildRequires: cmake(KF5GlobalAccel)
BuildRequires: cmake(KF5GuiAddons)
BuildRequires: cmake(KF5I18n)
BuildRequires: cmake(KF5IconThemes)
BuildRequires: cmake(KF5KIO)
BuildRequires: cmake(KF5Solid)
BuildRequires: cmake(KF5Su)
BuildRequires: cmake(KF5WidgetsAddons)
BuildRequires: cmake(KF5XmlGui)
BuildRequires: pkgconfig(Qt5DBus)
BuildRequires: pkgconfig(Qt5Gui)
BuildRequires: pkgconfig(Qt5PrintSupport)
BuildRequires: pkgconfig(Qt5Svg)
BuildRequires: pkgconfig(Qt5Widgets)
BuildRequires: pkgconfig(Qt5X11Extras)
BuildRequires: pkgconfig(Qt5Xml)
BuildRequires: pkgconfig(dvdnav)
BuildRequires: pkgconfig(dvdread)
BuildRequires: pkgconfig(libavcodec) < 59
BuildRequires: pkgconfig(libavformat) < 59
BuildRequires: pkgconfig(libavutil) < 59
BuildRequires: pkgconfig(libmpeg2)
BuildRequires: pkgconfig(libswscale)
BuildRequires: pkgconfig(libxine) >= 1.2
BuildRequires: pkgconfig(libzstd)
BuildRequires: pkgconfig(phonon4qt5)
BuildRequires: pkgconfig(x11)
Requires: dvd+rw-tools
Requires: dvdauthor
Requires: vamps
Recommends: MPlayer
Recommends: ffmpeg
Recommends: genisoimage
Recommends: k3b
Recommends: libdvdcss2
Recommends: wodim
%description
K9Copy is a small utility which allows the copy of DVD on Linux. The DVD video stream is compressed by the program Vamps.
%lang_package
%prep
%autosetup -p1 -n %{name}
%build
%{__rm} -rf src/libdvdnav-NOW src/libdvdread-NOW
%cmake_kf5 -d build -- -DQT5_BUILD=ON
%{_bindir}/find -type f -print0 | %{_bindir}/sort -z | %{_bindir}/xargs -0n2 grep -nl KF5::Auth | %{_bindir}/xargs --verbose --no-run-if-empty sed -i~~ 's@-lKF5::Auth@@'
%install
%cmake_install
%{__strip} -s %{buildroot}%{_bindir}/%{name}
%{__strip} -s %{buildroot}%{_bindir}/k9play
%{__strip} -s %{buildroot}%{_bindir}/k9xineplayer
%{__sed} -i '/^X-SuSE-translate=true/d' %{buildroot}%{_kf5_sharedir}/applications/%{name}.desktop
%{__sed} -i '/^X-SuSE-translate=true/d' %{buildroot}%{_kf5_sharedir}/applications/%{name}_assistant.desktop
%if 0%{?suse_version} && 0%{?suse_version} > 1500
%{__sed} -i 's/ -caption .*$//g' %{buildroot}%{_kf5_sharedir}/applications/%{name}.desktop
%{__sed} -i 's/ -caption .*$//g' %{buildroot}%{_kf5_sharedir}/applications/%{name}_assistant.desktop
%endif
%suse_update_desktop_file -N K9Copy %{name}
%suse_update_desktop_file -N "K9Copy Assistant" %{name}_assistant
%find_lang %{name} --without-kde
%check
%files
%defattr(-,root,root,-)
%attr(755,root,root) %{_kf5_bindir}/*
%{_kf5_htmldir}
%{_kf5_iconsdir}
%{_kf5_kxmlguidir}
%{_kf5_sharedir}/applications
%{_kf5_sharedir}/%{name}
%{_kf5_sharedir}/solid
%doc README
%license COPYING
%files lang -f %{name}.lang
%changelog