File exiv2.spec of Package exiv2.26842

#
# spec file for package exiv2
#
# 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 https://bugs.opensuse.org/
#


Name:           exiv2
Version:        0.26
Release:        0
Summary:        Tool to access image Exif metadata
License:        GPL-2.0-or-later
Group:          Productivity/Graphics/Other
URL:            http://www.exiv2.org/
Source0:        https://github.com/Exiv2/exiv2/archive/v0.26.tar.gz
Source1:        baselibs.conf
Patch1:         exiv2-build-date.patch
Patch2:         parallel-build-dep.patch
# git diff --no-merges v0.26..upstream/0.26
Patch3:         exiv2-update-to-0.26-branch.patch
Patch4:         0001-Avoid-null-pointer-exception-due-to-NULL-return-valu.patch
Patch5:         0001-IptcData-printStructure-Remove-buffer-overrun.patch
Patch6:         0001-Fix-SEGV-in-DataValue-Copy.patch
Patch7:         0001-PSD-Use-Safe-add-for-preventing-overflows-in-PSD-fil.patch
Patch8:         0002-PSD-enforce-Length-of-image-resource-section-file-si.patch
Patch9:         0001-Fix-561.-Use-proper-counter-for-the-idx-variable.patch
Patch14:        CVE-2018-5772.patch
Patch15:        CVE-2018-8976.patch
Patch16:        CVE-2018-8977.patch
Patch17:        CVE-2020-18898.patch
Patch18:        CVE-2021-31291.patch
Patch19:        CVE-2021-31292.patch
Patch20:        CVE-2021-37618.patch
Patch21:        CVE-2021-37619.patch
Patch22:        CVE-2020-18899.patch
Patch23:        CVE-2018-10772.patch
Patch24:        CVE-2018-18915.patch
Patch25:        CVE-2021-37620.patch
Patch26:        CVE-2021-29470.patch
Patch27:        CVE-2021-37621.patch
Patch28:        CVE-2021-32617.patch
Patch29:        CVE-2020-19716.patch
Patch30:        CVE-2019-14368.patch
Patch31:        CVE-2019-20421.patch
Patch32:        CVE-2019-13111.patch
Patch33:        webp-alpha-detection.patch
Patch34:        CVE-2021-29463.patch
Patch35:        improve-pngchunk-bounds-checking.patch
Patch36:        CVE-2021-34334.patch
Patch37:        CVE-2021-29473.patch
Patch38:        CVE-2019-17402.patch
Patch39:        CVE-2019-13109.patch
Patch40:        CVE-2018-20099.patch
Patch41:        CVE-2018-20097.patch
Patch42:        CVE-2018-17581.patch
Patch43:        CVE-2021-32815.patch
BuildRequires:  autoconf
BuildRequires:  cmake
BuildRequires:  doxygen
BuildRequires:  fdupes
BuildRequires:  gcc-c++
BuildRequires:  gettext-devel
# doxygen likes to have this
BuildRequires:  graphviz
BuildRequires:  libexpat-devel
BuildRequires:  libxslt
BuildRequires:  pkgconfig
BuildRequires:  python3-base
BuildRequires:  zlib-devel
Recommends:     %{name}-lang = %{version}

%description
Exiv2 is a command line utility to access image metadata from tags like
Exif.

%package -n libexiv2-26
Summary:        Library to access image metadata
Group:          System/Libraries

%description -n libexiv2-26
libexiv2 is a C++ library with a C compatibility interface to access
image metadata, esp from Exif tags.

%package -n libexiv2-devel
Summary:        Development Headers for Exiv2
Group:          Development/Libraries/C and C++
Requires:       libexiv2-26 = %{version}
Requires:       libstdc++-devel

%description -n libexiv2-devel
Exiv2 is a C++ library and a command line utility to access image
metadata.

%package -n libexiv2-doc
Summary:        Library to access image metadata - Documentation
Group:          System/Libraries

%description -n libexiv2-doc
libexiv2 is a C++ library with a C compatibility interface to access
image metadata, esp from Exif tags. This package contains the developer
documentation in HTML format.

%lang_package

%prep
%autosetup -p1

# use python3 not env python
sed -i -e 's:#! %{_bindir}/env python:#!%{_bindir}/python3:' doc/templates/gen.py

%build
export CXXFLAGS="%{optflags} $(getconf LFS_CFLAGS)"
%cmake \
  -DEXIV2_ENABLE_BUILD_PO:BOOL=ON \
  -DEXIV2_ENABLE_VIDEO:BOOL=OFF \
  -DEXIV2_ENABLE_BUILD_SAMPLES:BOOL=OFF
make %{?_smp_mflags}
make %{?_smp_mflags} doc

%install
%cmake_install
%find_lang exiv2
%fdupes -s doc/html
find %{buildroot} -type f -name "*.la" -delete -print
rm -f %{buildroot}%{_libdir}/*.a
rm %{buildroot}%{_libdir}/pkgconfig/exiv2.lsm

%post -n libexiv2-26 -p /sbin/ldconfig
%postun -n libexiv2-26 -p /sbin/ldconfig

%files lang -f exiv2.lang

%files
%doc doc/ChangeLog doc/cmd.txt
%{_bindir}/exiv2
%{_mandir}/man1/*

%files -n libexiv2-26
%{_libdir}/libexiv2.so.*

%files -n libexiv2-devel
%{_includedir}/exiv2
%{_libdir}/libexiv2.so
%{_libdir}/pkgconfig/exiv2.pc

%files -n libexiv2-doc
%doc doc/html

%changelog
openSUSE Build Service is sponsored by