Blob Blame History Raw
%{?mingw_package_header}

%global pkgname exiv2

Name:          mingw-%{pkgname}
Version:       0.27.4
Release:       3%{?dist}
Summary:       MinGW Windows %{pkgname} library
License:       GPLv2+
BuildArch:     noarch
URL:           http://www.exiv2.org/
Source0:       https://github.com/Exiv2/%{pkgname}/archive/v%{version}/%{pkgname}-%{version}.tar.gz
# Backport patch for CVE-2021-37618
Patch0:        https://github.com/Exiv2/exiv2/commit/0fcdde80997913dde284ea98f06f9305d06cb160.patch
# Backport patch for CVE-2021-37619
Patch1:        https://github.com/Exiv2/exiv2/commit/86d0a1d5d9f6dc41013a6690408add974e59167c.patch
# Backport patch for CVE-2021-37620
Patch2:        https://github.com/Exiv2/exiv2/commit/21c9eb30c06fb7a29a4e0ec8fae23ccdc622e34f.patch
# Backport patch for CVE-2021-37621
Patch3:        https://github.com/Exiv2/exiv2/commit/1c919daba049c717485aa3d8c0dcf07ce30566e0.patch
# Backport patch for CVE-2021-37622
Patch4:        https://github.com/Exiv2/exiv2/commit/e931c0a11b972e9e39468f4c945d708b6c59d139.patch
# Backport patch for CVE-2021-37623
Patch5:        https://github.com/Exiv2/exiv2/commit/de6b706cfdc6816fe291c45f8364ad856c17b63e.patch
# Backport patch for CVE-2021-32815
Patch6:        https://github.com/Exiv2/exiv2/commit/17f0d759662aa88343b6084e8c97d67ef363a030.patch
# Backport patch for CVE-2021-34334
Patch7:        https://github.com/Exiv2/exiv2/commit/c4861fe77c4a2611c03c7e5b70f41c0cf77f67ad.patch
# Backport patch for CVE-2021-37615 and CVE-2021-37615
Patch8:        https://github.com/Exiv2/exiv2/commit/75a1832c57de18ef67c1e8b48f098393a7a843e1.patch
# Backport patch for CVE-2021-34335
Patch9:        https://github.com/Exiv2/exiv2/commit/cdec9dd774cd4b942a7aafb57f640de98f1e19e1.patch



BuildRequires: make
BuildRequires: cmake
BuildRequires: gettext

BuildRequires: mingw32-filesystem >= 95
BuildRequires: mingw32-gcc-c++
BuildRequires: mingw32-gettext
BuildRequires: mingw32-expat
BuildRequires: mingw32-win-iconv
BuildRequires: mingw32-zlib

BuildRequires: mingw64-filesystem >= 95
BuildRequires: mingw64-gcc-c++
BuildRequires: mingw64-gettext
BuildRequires: mingw64-expat
BuildRequires: mingw64-win-iconv
BuildRequires: mingw64-zlib


%description
MinGW Windows %{pkgname} library.


%package -n mingw32-%{pkgname}
Summary:       MinGW Windows %{pkgname} library

%description -n mingw32-%{pkgname}
MinGW Windows %{pkgname} library.


%package -n mingw64-%{pkgname}
Summary:       MinGW Windows %{pkgname} library

%description -n mingw64-%{pkgname}
MinGW Windows %{pkgname} library.


%{?mingw_debug_package}


%prep
%autosetup -p1 -n %{pkgname}-%{version}


%build
%mingw_cmake \
  -DEXIV2_ENABLE_NLS:BOOL=ON \
  -DEXIV2_BUILD_SAMPLES:BOOL=OFF \
  -DCMAKE_NO_SYSTEM_FROM_IMPORTED=ON \
  -DICONV_ACCEPTS_CONST_INPUT=1

# Hack around double slashes install paths in generated po/cmake_install.cmake
# sed -i 's|//|/|g' build_win32/po/cmake_install.cmake
# sed -i 's|//|/|g' build_win64/po/cmake_install.cmake

%mingw_make_build


%install
%mingw_make_install
%mingw_find_lang exiv2

rm -f %{buildroot}%{mingw32_libdir}/pkgconfig/exiv2.lsm
rm -f %{buildroot}%{mingw32_datadir}/man/man1/exiv2.1
rm -f %{buildroot}%{mingw64_libdir}/pkgconfig/exiv2.lsm
rm -f %{buildroot}%{mingw64_datadir}/man/man1/exiv2.1



%files -n mingw32-%{pkgname} -f mingw32-%{pkgname}.lang
%license COPYING
%{mingw32_bindir}/exiv2.exe
%{mingw32_bindir}/libexiv2.dll
%{mingw32_libdir}/libexiv2.dll.a
%{mingw32_libdir}/libexiv2-xmp.a
%{mingw32_libdir}/cmake/exiv2/
%{mingw32_libdir}/pkgconfig/exiv2.pc
%{mingw32_includedir}/exiv2/


%files -n mingw64-%{pkgname} -f mingw64-%{pkgname}.lang
%license COPYING
%{mingw64_bindir}/exiv2.exe
%{mingw64_bindir}/libexiv2.dll
%{mingw64_libdir}/libexiv2.dll.a
%{mingw64_libdir}/libexiv2-xmp.a
%{mingw64_libdir}/cmake/exiv2/
%{mingw64_libdir}/pkgconfig/exiv2.pc
%{mingw64_includedir}/exiv2/


%changelog
* Wed Aug 11 2021 Sandro Mani <mainsandro@gmail.com> - 0.27.4-3
- Backport patch for CVE-2021-37618
- Backport patch for CVE-2021-37619
- Backport patch for CVE-2021-37620
- Backport patch for CVE-2021-37621
- Backport patch for CVE-2021-37622
- Backport patch for CVE-2021-37623
- Backport patch for CVE-2021-32815
- Backport patch for CVE-2021-34334
- Backport patch for CVE-2021-37615 and CVE-2021-37615
- Backport patch for CVE-2021-34335

* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.27.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild

* Sun Jun 20 2021 Sandro Mani <manisandro@gmail.com> - 0.27.4-1
- Update to 0.27.4

* Wed May 26 2021 Sandro Mani <manisandro@gmail.com> - 0.27.3-6
- Backport patch for CVE-2021-32617, CVE-2021-29623

* Sat May 01 2021 Sandro Mani <manisandro@gmail.com> - 0.27.3-5
- Backport patch for CVE-2021-29470
- Backport patch for CVE-2021-29473

* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.27.3-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild

* Wed Aug 12 13:36:04 GMT 2020 Sandro Mani <manisandro@gmail.com> - 0.27.3-3
- Rebuild (mingw-gettext)

* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.27.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild

* Thu Jul 02 2020 Sandro Mani <manisandro@gmail.com> - 0.27.3-1
- Update to 0.27.3

* Mon Apr 20 2020 Sandro Mani <manisandro@gmail.com> - 0.27.2-4
- Rebuild (gettext)

* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.27.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild

* Tue Oct 08 2019 Sandro Mani <manisandro@gmail.com> - 0.27.2-2
- Rebuild (Changes/Mingw32GccDwarf2)

* Mon Jul 29 2019 Sandro Mani <manisandro@gmail.com> - 0.27.2-1
- Update to 0.27.2

* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.27.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild

* Mon Apr 29 2019 Sandro Mani <manisandro@gmail.com> - 0.27.1-1
- Update to 0.27.1

* Wed Apr 17 2019 Sandro Mani <manisandro@gmail.com> - 0.27-4
- Fix build against mingw-win-iconv-0.0.8

* Tue Apr 02 2019 Sandro Mani <manisandro@gmail.com> - 0.27-3
- Backport fix for CVE-2018-2009{6,7,8,9}

* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.27-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

* Wed Jan 30 2019 Sandro Mani <manisandro@gmail.com> - 0.27-1
- Update to 0.27

* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.26-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.26-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Tue Jul 11 2017 Sandro Mani <manisandro@gmail.com> - 0.26-1
- Update to 0.26

* Tue Jan 17 2017 Sandro Mani <manisandro@gmail.com> - 0.25-1
- Initial package