%{?mingw_package_header}
%global pkgname leptonica
Name: mingw-%{pkgname}
Version: 1.73
Release: 2%{?dist}
Summary: MinGW Windows Leptonica library
License: Leptonica
BuildArch: noarch
URL: http://code.google.com/p/leptonica/
Source0: http://www.leptonica.com/source/%{pkgname}-%{version}.tar.gz
# Until new upstream version is released with Patch0
BuildRequires: autoconf automake libtool
BuildRequires: mingw32-filesystem >= 95
BuildRequires: mingw32-gcc
BuildRequires: mingw32-libjpeg-turbo
BuildRequires: mingw32-libtiff
BuildRequires: mingw32-libpng
BuildRequires: mingw32-zlib
BuildRequires: mingw32-giflib
BuildRequires: mingw32-libwebp
BuildRequires: mingw64-filesystem >= 95
BuildRequires: mingw64-gcc
BuildRequires: mingw64-libjpeg-turbo
BuildRequires: mingw64-libtiff
BuildRequires: mingw64-libpng
BuildRequires: mingw64-zlib
BuildRequires: mingw64-giflib
BuildRequires: mingw64-libwebp
%description
MinGW Windows Leptonica library.
%package -n mingw32-%{pkgname}
Summary: MinGW Windows Leptonica library
%description -n mingw32-%{pkgname}
MinGW Windows Leptonica library.
%package -n mingw32-%{pkgname}-static
Summary: Static version of the MinGW Windows Leptonica library
Requires: mingw32-%{pkgname} = %{version}-%{release}
%description -n mingw32-%{pkgname}-static
Static version of the MinGW Windows Leptonica library.
%package -n mingw64-%{pkgname}
Summary: MinGW Windows Leptonica library
%description -n mingw64-%{pkgname}
MinGW Windows Leptonica library.
%package -n mingw64-%{pkgname}-static
Summary: Static version of the MinGW Windows Leptonica library
Requires: mingw64-%{pkgname} = %{version}-%{release}
%description -n mingw64-%{pkgname}-static
Static version of the MinGW Windows Leptonica library.
%{?mingw_debug_package}
%prep
%setup -q -n %{pkgname}-%{version}
%build
autoreconf -ifv
%mingw_configure
%mingw_make %{?_smp_mflags}
%install
%mingw_make install DESTDIR=%{buildroot}
# Delete *.la files
find %{buildroot} -name '*.la' -exec rm -f {} ';'
# Delete *.exe files
rm -rf %{buildroot}%{mingw32_bindir}/*.exe
rm -rf %{buildroot}%{mingw64_bindir}/*.exe
%files -n mingw32-%{pkgname}
%license leptonica-license.txt
%doc README.html version-notes.html
%{mingw32_bindir}/liblept-5.dll
%{mingw32_includedir}/leptonica/
%{mingw32_libdir}/liblept.dll.a
%{mingw32_libdir}/pkgconfig/lept.pc
%files -n mingw32-%{pkgname}-static
%{mingw32_libdir}/liblept.a
%files -n mingw64-%{pkgname}
%license leptonica-license.txt
%doc README.html version-notes.html
%{mingw64_bindir}/liblept-5.dll
%{mingw64_includedir}/leptonica/
%{mingw64_libdir}/liblept.dll.a
%{mingw64_libdir}/pkgconfig/lept.pc
%files -n mingw64-%{pkgname}-static
%{mingw64_libdir}/liblept.a
%changelog
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.73-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Tue Jan 26 2016 Sandro Mani <manisandro@gmail.com> - 1.73-1
- Update to 1.73
* Mon Dec 28 2015 Sandro Mani <manisandro@gmail.com> - 1.72-3
- Rebuild (libwebp)
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.72-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Mon Apr 27 2015 Sandro Mani <manisandro@gmail.com> - 1.72-1
- Update to 1.72
* Wed Aug 13 2014 Sandro Mani <manisandro@gmail.com> - 1.71-1
- Update to 1.71
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.69-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Thu May 22 2014 Kalev Lember <kalevlember@gmail.com> - 1.69-6
- Rebuilt with libwebp 0.4.0
* Fri Aug 09 2013 Sandro Mani <manisandro@gmail.com> - 1.69-5
- Patch for and rebuild against giflib 5.0.4
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.69-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Sat Jul 13 2013 Erik van Pienbroek <epienbro@fedoraproject.org> - 1.69-3
- Rebuild against libpng 1.6
* Sun May 19 2013 Sandro Mani <manisandro@gmail.com> - 1.69-2
- Remove mingw_build_win32/64 macros
- Properly version mingw32-filesystem BuildRequires
* Wed May 08 2013 Sandro Mani <manisandro@gmail.com> - 1.69-1
- Initial Fedora package