File mingw64-libofx.spec of Package mingw64-libofx
#
# spec file for package mingw64-libofx
#
# Copyright (c) 2017 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 _name libofx
Name: mingw64-%{_name}
Version: 0.10.5
Release: 0
Summary: OFX Command Parser and API
License: GPL-2.0-or-later
Group: Development/Libraries/Other
Url: http://libofx.sourceforge.net/
Source: https://sourceforge.net/projects/libofx/files/libofx/%{_name}-%{version}.tar.gz
Patch0: libofx-0.10.5-mingw.patch
BuildRequires: doxygen
BuildRequires: graphviz
BuildRequires: mingw64-cross-gcc-c++
BuildRequires: mingw64-cross-pkg-config
BuildRequires: mingw64-libcurl-devel
BuildRequires: mingw64-win_iconv-devel
BuildRequires: mingw64-libxml++ >= 2.6
BuildRequires: mingw64-opensp-devel
%_mingw64_package_header_debug
BuildArch: noarch
%description
LibOFX is a parser and API designed to allow applications to support
OFX command responses, usually provided by financial institutions for
statement downloads. The author says, "To my knowledge, it is the first
working OpenSource implementations of the OFX (Open Financial eXchange)
specification on the client side. This project was first started as my
end of degree project, with the goal of adding OFX support to GnuCash.
It has since evolved into a generic library, so all OpenSource
Financial software can benefit from it."
%package -n mingw64-libofx7
Summary: OFX Command Parser and API
Group: Development/Libraries/Other
Requires: %{name} >= %{version}
%description -n mingw64-libofx7
LibOFX is a parser and API designed to allow applications to support
OFX command responses, usually provided by financial institutions for
statement downloads. The author says, "To my knowledge, it is the first
working OpenSource implementations of the OFX (Open Financial eXchange)
specification on the client side. This project was first started as my
end of degree project, with the goal of adding OFX support to GnuCash.
It has since evolved into a generic library, so all OpenSource
Financial software can benefit from it."
%package devel
Summary: OFX Command Parser and API
Group: Development/Libraries/Other
Requires: %{name} = %{version}
%description devel
LibOFX is a parser and API designed to allow applications to support
OFX command responses, usually provided by financial institutions for
statement downloads. The author says, "To my knowledge, it is the first
working OpenSource implementations of the OFX (Open Financial eXchange)
specification on the client side. This project was first started as my
end of degree project, with the goal of adding OFX support to GnuCash.
It has since evolved into a generic library, so all OpenSource
Financial software can benefit from it."
%_mingw64_debug_package
%prep
%autosetup -p1 -n %{_name}-%{version}
chmod -x doc/ofx_sample_files/ofx_spec160_stmtrs_example.sgml
%build
export MINGW64_CFLAGS="%{_mingw64_cflags} -DOS_WIN32"
echo "lt_cv_deplibs_check_method='pass_all'" >>%{_mingw64_cache}
%_mingw64_configure --disable-static --with-opensp-libs=%{_mingw64_libdir} --with-opensp-includes=%{_mingw64_includedir}/OpenSP
make %{?_smp_mflags} docdir=%{_mingw64_defaultdocdir}/%{name}
%install
%_mingw64_makeinstall
mkdir -p %{buildroot}%{_mingw64_docdir}
mv %{buildroot}%{_mingw64_datadir}/doc/libofx %{buildroot}%{_mingw64_docdir}/%{name}
rm %{buildroot}%{_mingw64_docdir}/%{name}/INSTALL
rm doc/ofx_sample_files/*xml~
cp -a doc/ofx_sample_files/*.* %{buildroot}%{_mingw64_docdir}/%{name}/
cp -a doc/html %{buildroot}%{_mingw64_docdir}/%{name}/
rm -f %{buildroot}%{_libdir}/*.la
%files
%defattr(-,root,root)
%doc %dir %{_mingw64_docdir}/%{name}
%doc %{_mingw64_docdir}/%{name}/[ACNR]*
%doc %{_mingw64_docdir}/%{name}/*.txt
%{_mingw64_bindir}/*.exe
%{_mingw64_datadir}/libofx/
%{_mingw64_mandir}/man1/*.1%{?ext_man}
%files -n mingw64-libofx7
%defattr (-, root, root)
%{_mingw64_bindir}/*.dll
%files devel
%defattr(-,root,root)
%doc %{_mingw64_docdir}/%{name}/html/
%doc %{_mingw64_docdir}/%{name}/*.sgml
%doc %{_mingw64_docdir}/%{name}/*.xml
%doc %{_mingw64_docdir}/%{name}/*.ofx
%doc %{_mingw64_docdir}/%{name}/*.log
%doc %{_mingw64_docdir}/%{name}/*.trs
%{_mingw64_libdir}/*
%{_mingw64_includedir}/libofx/
%{_mingw64_libdir}/pkgconfig/libofx.pc
%clean
rm -rf %{buildroot}
%changelog