File mingw32-ktoblzcheck.spec of Package mingw32-ktoblzcheck

# Copyright (c) 2005-2008 oc2pus
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments to toni@links2linux.de

# norootforbuild

%define with_python      1
%define pysuffix         3
%define pydep            python3-base python3-openpyxl

%define _name   ktoblzcheck
Name:           mingw32-%{_name}
Summary:        A library to check account numbers and bank codes of German banks
Version:        1.59
Release:        0
Source:         http://downloads.sourceforge.net/project/%{_name}/%{_name}-%{version}.tar.gz
Patch1:         fix-building-mingw.patch
Group:          Productivity/Office/Finance
License:        LGPL-2.1-only
URL:            http://ktoblzcheck.sourceforge.net
BuildRequires:  doxygen
BuildRequires:  mingw32-cross-cmake
BuildRequires:  mingw32-cross-gcc-c++
BuildRequires:  mingw32-ktoblzcheck-data
BuildRequires:  mingw32-libcurl-devel
BuildRequires:  %{pydep}
# for %_mingw32_python3_sitearch|_version
BuildRequires:  mingw32-python3-devel
BuildRequires:  mingw32-sqlite-devel
%_mingw32_package_header_debug
BuildArch:      noarch

%description
KtoBLZCheck is a library to check account numbers and bank codes
of German banks. Both a library for other programs as well as a
short command-line tool is available. It is possible to check
pairs of account numbers and bank codes (BLZ) of German banks,
and to map bank codes (BLZ) to the clear-text name and location
of the bank.

%package devel
Summary:    Libraries, includes etc to develop with ktoblzcheck library
Group:      Development/Libraries/C and C++
Requires:   mingw32-libktoblzcheck1 = %{version}
Provides:   mingw32-lib%{_name}1-devel = %{version}
Obsoletes:  mingw32-lib%{_name}1-devel < %{version}

%description devel
Libraries, includes etc to develop with ktoblzcheck library.

%package -n mingw32-lib%{_name}1
Summary:    Shared Libraries for ktoblzcheck
Group:      System/Libraries

%description -n mingw32-lib%{_name}1
Shared Libraries for ktoblzcheck.

%if %{with_python}
%package -n mingw32-python%{pysuffix}-%{_name}
Summary:    KtoBLZCheck python-bindings
Group:      Development/Libraries/Python
Requires:   %{name} = %{version}
Requires:   mingw32-lib%{_name}1 = %{version}
Requires:   mingw32-python%{pysuffix} >= 2.3

%description -n mingw32-python%{pysuffix}-%{_name}
This package contains the python-bindings for ktoblzcheck.
%endif

%_mingw32_debug_package

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

%build
%_mingw32_cmake \
    -DINSTALL_RAW_BANKDATA_FILE=0\
    -DENABLE_BANKDATA_DOWNLOAD=0 \
    -DPython3_FOUND=1 \
    -DPython3_EXECUTABLE=/usr/bin/python%{pysuffix} \
    -DPython3_VERSION=%{_mingw32_python3_version} \
    -DPython3_SITEARCH=%{_mingw32_python3_sitearch}
%_mingw32_cmake_build

%install
%_mingw32_cmake_install DESTDIR=%{buildroot}

%files
%defattr(-,root,root)
%doc AUTHORS README.md COPYING ChangeLog NEWS
%{_mingw32_bindir}/%{_name}.exe
%{_mingw32_bindir}/ktoblzupdate.exe
%{_mingw32_bindir}/ibanchk.exe
%{_mingw32_mandir}/man1/*.1*

%files -n mingw32-lib%{_name}1
%defattr(-,root,root)
%{_mingw32_bindir}/*.dll

%files devel
%defattr(-,root,root)
%doc AUTHORS README.md COPYING ChangeLog NEWS
%{_mingw32_datadir}/doc/%{_name}
%{_mingw32_libdir}/*.dll.a
%{_mingw32_libdir}/cmake/KtoBlzCheck
%{_mingw32_libdir}/pkgconfig/%{_name}.pc
%{_mingw32_includedir}/%{_name}.h
%{_mingw32_includedir}/iban.h
%{_mingw32_includedir}/ktoblzcheck_export.h

%if %{with_python}
%files -n mingw32-python%{pysuffix}-%{_name}
%defattr(-,root,root)
%dir %{_mingw32_python3_platlibdir}
%{_mingw32_python3_sitearch}
%endif

%changelog
openSUSE Build Service is sponsored by