File cdio-utils.spec of Package libcdio

#
# spec file for package cdio-utils
#
# Copyright (c) 2018 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 http://bugs.opensuse.org/
#


%define cdioutils 1
Name:           cdio-utils
Version:        0.94
Release:        0
Summary:        Utility programs making use of libcdio, a CD-ROM access library
License:        GPL-3.0+
Group:          Productivity/Multimedia/Other
Url:            https://savannah.gnu.org/projects/libcdio
Source0:        https://ftp.gnu.org/gnu/libcdio/libcdio-%{version}.tar.gz
Source1:        https://ftp.gnu.org/gnu/libcdio/libcdio-%{version}.tar.gz.sig
Source2:        libcdio.keyring
Source4:        baselibs.conf
# PATCH-FIX-UPSTREAM 0001-Savannah-Bug-49907.patch https://savannah.gnu.org/bugs/index.php?49907
Patch0:         0001-Savannah-Bug-49907.patch
# PATCH-FIX-SECURITY CVE-2017-18201.patch bsc1082877 CVE-2017-18201 sbrabec@suse.com -- Fix double free vulnerability.
Patch1:         CVE-2017-18201.patch
# PATCH-FIX-SECURITY CVE-2017-18199.patch bsc1082821 CVE-2017-18199 sbrabec@suse.com -- Fix NULL Pointer Dereference.
Patch2:         CVE-2017-18199.patch
# PATCH-FIX-UPSTREAM libcdio-0.94-leak-01.patch bsc1082821 sbrabec@suse.com -- Memory leak fix.
Patch101:       libcdio-0.94-leak-01.patch
# PATCH-FIX-UPSTREAM libcdio-0.94-leak-02.patch bsc1082821 sbrabec@suse.com -- Memory leak fix.
Patch102:       libcdio-0.94-leak-02.patch
# PATCH-FIX-UPSTREAM libcdio-0.94-leak-03.patch bsc1082821 sbrabec@suse.com -- Memory leak fix.
Patch103:       libcdio-0.94-leak-03.patch
# PATCH-FIX-UPSTREAM libcdio-0.94-leak-04.patch bsc1082821 sbrabec@suse.com -- Memory leak fix.
Patch104:       libcdio-0.94-leak-04.patch
# PATCH-FIX-UPSTREAM libcdio-0.94-leak-05.patch bsc1082821 sbrabec@suse.com -- Memory leak fix.
Patch105:       libcdio-0.94-leak-05.patch
# PATCH-FIX-UPSTREAM libcdio-0.94-leak-06.patch bsc1082821 sbrabec@suse.com -- Memory leak fix.
Patch106:       libcdio-0.94-leak-06.patch
# PATCH-FIX-UPSTREAM libcdio-0.94-leak-07patch bsc1082821 sbrabec@suse.com -- Memory leak fix.
Patch107:       libcdio-0.94-leak-07.patch
# PATCH-FIX-UPSTREAM libcdio-0.94-leak-08.patch bsc1082821 sbrabec@suse.com -- Memory leak fix.
Patch108:       libcdio-0.94-leak-08.patch
# PATCH-FIX-UPSTREAM libcdio-0.94-leak-09.patch bsc1082821 sbrabec@suse.com -- Memory leak fix.
Patch109:       libcdio-0.94-leak-09.patch
# PATCH-FIX-UPSTREAM libcdio-0.94-leak-10.patch bsc1082821 sbrabec@suse.com -- Memory leak fix.
Patch110:       libcdio-0.94-leak-10.patch
# PATCH-FIX-UPSTREAM libcdio-0.94-leak-11.patch bsc1082821 sbrabec@suse.com -- Memory leak fix.
Patch111:       libcdio-0.94-leak-11.patch
# PATCH-FIX-UPSTREAM libcdio-0.94-leak-12.patch bsc1082821 sbrabec@suse.com -- Memory leak fix.
Patch112:       libcdio-0.94-leak-12.patch
# PATCH-FIX-UPSTREAM libcdio-0.94-leak-13.patch bsc1082821 sbrabec@suse.com -- Memory leak fix.
Patch113:       libcdio-0.94-leak-13.patch
# PATCH-FIX-UPSTREAM libcdio-0.94-leak-14.patch bsc1082821 sbrabec@suse.com -- Memory leak fix.
Patch114:       libcdio-0.94-leak-14.patch
# PATCH-FIX-UPSTREAM libcdio-0.94-leak-15.patch bsc1082821 sbrabec@suse.com -- Memory leak fix.
Patch115:       libcdio-0.94-leak-15.patch
# PATCH-FIX-UPSTREAM libcdio-0.94-leak-16.patch bsc1082821 sbrabec@suse.com -- Memory leak fix.
Patch116:       libcdio-0.94-leak-16.patch
# PATCH-FIX-UPSTREAM libcdio-0.94-leak-17.patch bsc1082821 sbrabec@suse.com -- Memory leak fix.
Patch117:       libcdio-0.94-leak-17.patch
# PATCH-FIX-UPSTREAM libcdio-0.94-leak-18.patch bsc1082821 sbrabec@suse.com -- Memory leak fix.
Patch118:       libcdio-0.94-leak-18.patch
# PATCH-FIX-UPSTREAM libcdio-0.94-leak-19.patch bsc1082821 sbrabec@suse.com -- Memory leak fix.
Patch119:       libcdio-0.94-leak-19.patch
# PATCH-FIX-UPSTREAM libcdio-0.94-leak-20.patch bsc1082821 sbrabec@suse.com -- Memory leak fix.
Patch120:       libcdio-0.94-leak-20.patch
BuildRequires:  fdupes
BuildRequires:  gcc-c++
BuildRequires:  help2man
BuildRequires:  libcdio-devel
BuildRequires:  libtool
BuildRequires:  makeinfo
BuildRequires:  ncurses-devel
BuildRequires:  pkgconfig
BuildRequires:  popt-devel
BuildRequires:  pkgconfig(libcddb)
BuildRequires:  pkgconfig(libvcdinfo)
Provides:       libcdio-utils = %{version}
Obsoletes:      libcdio-utils < %{version}

%description
This package contains a number of utility programs that make use of
libcdio.

%prep
%setup -q -n libcdio-%{version}
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch101 -p1
%patch102 -p1
%patch103 -p1
%patch104 -p1
%patch105 -p1
%patch106 -p1
%patch107 -p1
%patch108 -p1
%patch109 -p1
%patch110 -p1
%patch111 -p1
%patch112 -p1
%patch113 -p1
%patch114 -p1
%patch115 -p1
%patch116 -p1
%patch117 -p1
%patch118 -p1
%patch119 -p1
%patch120 -p1

%define buildir ${PWD}

%build
export VCDINFO_CFLAGS=-I%{_includedir}/libvcd
export VCDINFO_LIBS="-L%{_libdir} -lvcdinfo -L%{buildir}/lib/iso9660/.libs/ -liso9660 -L%{buildir}/lib/driver/.libs/ -lcdio"

# autoreconf needed for libcdio-0.94-leak-07.patch:
autoreconf -f -i
VCDINFO_CFLAGS=-I%{_includedir}/libvcd VCDINFO_LIBS="-L%{_libdir} -lvcdinfo -L%{buildir}/lib/iso9660/.libs -liso9660 \
-L%{buildir}/lib/driver/.libs -lcdio" \
%configure \
	--disable-rpath \
	--disable-static \
	--disable-cxx \
	--enable-vcd-info=yes

VCDINFO_CFLAGS=-I%{_includedir}/libvcd VCDINFO_LIBS="-L%{_libdir} -lvcdinfo \
-L%{buildir}/lib/iso9660/.libs/ -liso9660 -L%{buildir}/lib/driver/.libs/ -lcdio" \
 VERBOSE=1 make -e %{?_smp_mflags}

%install
%make_install
#empty depdendency libs
rm -rf %{buildroot}%{_libdir} %{buildroot}%{_includedir} %{buildroot}%{_infodir}
%fdupes -s %{buildroot}%{_mandir}

%files -n cdio-utils
%doc AUTHORS COPYING NEWS README README.libcdio THANKS TODO
%{_bindir}/cd-*
%{_bindir}/cdda-*
%{_bindir}/iso-*
%{_bindir}/mmc-*
%{_mandir}/man?/*%{ext_man}

%changelog
openSUSE Build Service is sponsored by