File libofx.spec of Package libofx

#
# spec file for package libofx
#
# Copyright (c) 2011 SUSE LINUX Products 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/
#

# norootforbuild


Name:           libofx
BuildRequires:  curl-devel doxygen fdupes gcc-c++ graphviz libxml++-devel opensp-devel pkgconfig
License:        GPLv2+
Group:          Development/Libraries/Other
Version:        0.9.4
Release:        5
Summary:        OFX Command Parser and API
Url:            http://libofx.sourceforge.net/
Source:         libofx-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%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 libofx4
License:        GPLv2+
Group:          Development/Libraries/Other
Summary:        OFX Command Parser and API
Requires:       %{name} = %{version}

%description -n libofx4
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
License:        GPLv2+
Group:          Development/Libraries/Other
Summary:        OFX Command Parser and API
Requires:       %{name} = %{version} glibc-devel

%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."

%prep
%setup
chmod -x doc/ofx_sample_files/ofx_spec160_stmtrs_example.sgml

%build
%configure --disable-static --with-pic --with-opensp-libs=%{_libdir}	
%{__make} %{?jobs:-j%jobs} docdir=%{_defaultdocdir}/%{name}

%install
make install DESTDIR=$RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_defaultdocdir}
mv $RPM_BUILD_ROOT%{_datadir}/doc/libofx $RPM_BUILD_ROOT%{_defaultdocdir}/%{name}
rm $RPM_BUILD_ROOT%{_defaultdocdir}/%{name}/INSTALL
cp -a doc/ofx_sample_files/*.* $RPM_BUILD_ROOT%{_defaultdocdir}/%{name}/
cp -a doc/html $RPM_BUILD_ROOT%{_defaultdocdir}/%{name}/
%fdupes $RPM_BUILD_ROOT
%{__rm} -f %{buildroot}%{_libdir}/*.la

%post -n libofx4 -p /sbin/ldconfig

%postun -n libofx4 -p /sbin/ldconfig

%files
%defattr(-,root,root)
%doc %dir %{_defaultdocdir}/%{name}
%doc %{_defaultdocdir}/%{name}/[ACNR]*
%doc %{_defaultdocdir}/%{name}/*.txt
%{_bindir}/*
%{_datadir}/libofx/
%{_mandir}/man1/*.1%{?ext_man}

%files -n libofx4
%defattr (-, root, root)
%{_libdir}/*.so.*

%files devel
%defattr(-,root,root)
%doc %{_defaultdocdir}/%{name}/html/
%doc %{_defaultdocdir}/%{name}/*.sgml
%doc %{_defaultdocdir}/%{name}/*.xml
%{_libdir}/*.so
%{_includedir}/libofx/
%{_libdir}/pkgconfig/libofx.pc

%clean
rm -rf $RPM_BUILD_ROOT

%changelog
openSUSE Build Service is sponsored by