File makemkv.spec of Package MakeMKV
#
# spec file for package makemkv
#
# Copyright (c) 2024 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 http://bugs.opensuse.org/
#
%define majordriveio 0
%define libdriveio libdriveio
%define libnamedriveio %{libdriveio}%{majordriveio}
%define majormakemkv 1
%define libmakemkv libmakemkv
%define libnamemakemkve %{libmakemkv}%{majormakemkv}
%define majormmbd 0
%define libmmbd libmmbd
%define libnamemmbd %{libmmbd}%{majormmbd}
Name: makemkv
Summary: DVD and BlueRay Ripping tool
Version: 1.17.8
Release: 0
License: Beerware
Group: Productivity/Multimedia/Video/Editors and Convertors
Url: http://www.makemkv.com
Source0: %{name}-oss-%{version}.tar.gz
Source1: %{name}-bin-%{version}.tar.gz
Source2: %{name}-sha-%{version}.txt
Patch0: fix-reproducible-builds.patch
Patch1: silence-return-type.patch
Requires: %{libnamedriveio} = %{version}-%{release}
Requires: %{libnamemakemkve} = %{version}-%{release}
Requires: %{libnamemmbd} = %{version}-%{release}
BuildRequires: coreutils
BuildRequires: grep
BuildRequires: libopenssl-devel
BuildRequires: libexpat-devel
BuildRequires: zlib-devel
BuildRequires: pkgconfig(Qt5Core)
BuildRequires: pkgconfig(Qt5DBus)
BuildRequires: pkgconfig(Qt5Gui)
BuildRequires: pkgconfig(Qt5Widgets)
BuildRequires: pkgconfig(libavcodec)
BuildRequires: pkgconfig(libavutil)
BuildRequires: update-desktop-files
ExclusiveArch: i586 x86_64
%description
MakeMKV is your one-click solution to convert video that you own into
free and patents-unencumbered format that can be played everywhere.
MakeMKV is a format converter, otherwise called "transcoder". It
converts the video clips from proprietary (and usually encrypted)
disc into a set of MKV files, preserving most information but not
changing it in any way. The MKV format can store multiple video/audio
tracks with all meta-information and preserve chapters. There are many
players that can play MKV files nearly on all platforms, and there are
tools to convert MKV files to many formats, including DVD and Blu-ray
discs.
Additionally MakeMKV can instantly stream decrypted video without
intermediate conversion to wide range of players, so you may watch
Blu-ray and DVD discs with your favorite player on your favorite OS
or on your favorite device.
* Reads DVD and Blu-ray discs
* Reads Blu-ray discs protected with latest versions of AACS and BD+
* Preserves all video and audio tracks, including HD audio
* Preserves chapters information
* Preserves all meta-information (track language, audio type)
* Fast conversion - converts as fast as your drive can read data.
* No additional software is required for conversion or decryption.
* Available for Windows, Mac OS X and Linux
* Functionality to open DVD discs is free and will always stay free.
* All features (including Blu-ray decryption and processing) are free during BETA.
%package -n %{libnamedriveio}
Group: System/Libraries
Summary: MakeMKV %{libdriveio}
Provides: %{libdriveio} = %{version}-%{release}
%description -n %{libnamedriveio}
MakeMKV %{libdriveio} shared library
%package -n %{libnamemakemkve}
Group: System/Libraries
Summary: MakeMKV %{libmakemkv}
Provides: %{libmakemkv} = %{version}-%{release}
%description -n %{libnamemakemkve}
MakeMKV %{libmakemkv} shared library
%package -n %{libnamemmbd}
Group: System/Libraries
Summary: MakeMKV %{libmmbd}
Provides: %{libmmbd} = %{version}-%{release}
%description -n %{libnamemmbd}
MakeMKV %{libmmbd} shared library
%prep
[ "$(grep $(basename %{SOURCE0}) %{SOURCE2} | cut -d' ' -f1)" == "$(sha256sum < %{SOURCE0} | cut -d' ' -f1)" ] || exit 1
[ "$(grep $(basename %{SOURCE1}) %{SOURCE2} | cut -d' ' -f1)" == "$(sha256sum < %{SOURCE1} | cut -d' ' -f1)" ] || exit 1
%autosetup -n %{name}-oss-%{version} -p1
%build
export CC="gcc -fcommon" # see <https://gcc.gnu.org/gcc-10/porting_to.html#common>
%configure
%make_build
%install
%make_install
%suse_update_desktop_file -c makemkv makemkv "makemkv" makemkv makemkv.png AudioVideo AudioVideoEditing
tar xaf %{SOURCE1}
%ifarch x86_64
%{__install} -m 755 %{name}-bin-%{version}/bin/amd64/makemkvcon %{buildroot}%{_bindir}/
%else
%{__install} -m 755 %{name}-bin-%{version}/bin/i386/makemkvcon %{buildroot}%{_bindir}/
%endif
chmod 755 %{buildroot}%{_libdir}/%{libdriveio}.so.%{majordriveio}* \
%{buildroot}%{_libdir}/%{libmakemkv}.so.%{majormakemkv}* \
%{buildroot}%{_libdir}/%{libmmbd}.so.%{majormmbd}*
mkdir -p -m 755 %{buildroot}%{_datadir}/MakeMKV
%{__install} -m 644 %{name}-bin-%{version}/src/share/* %{buildroot}%{_datadir}/MakeMKV/
%post -n %{libnamedriveio} -p /sbin/ldconfig
%postun -n %{libnamedriveio} -p /sbin/ldconfig
%post -n %{libnamemakemkve} -p /sbin/ldconfig
%postun -n %{libnamemakemkve} -p /sbin/ldconfig
%post -n %{libnamemmbd} -p /sbin/ldconfig
%postun -n %{libnamemmbd} -p /sbin/ldconfig
%files
%doc %{name}-bin-%{version}/src/eula_en_linux.txt
%{_bindir}/*
%{_datadir}/MakeMKV
%{_datadir}/icons/hicolor
%{_datadir}/applications/makemkv.desktop
%files -n %{libnamedriveio}
%{_libdir}/%{libdriveio}.so.%{majordriveio}*
%files -n %{libnamemakemkve}
%{_libdir}/%{libmakemkv}.so.%{majormakemkv}*
%files -n %{libnamemmbd}
%{_libdir}/%{libmmbd}.so.%{majormmbd}*
%changelog