File getdata.spec of Package getdata

#
# spec file for package getdata
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2011 Christian Trippe <ctrippe@opensuse.org>
#
# 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/
#



Name:           getdata
Version:        0.7.3
Release:        2
License:        LGPL-2.1+
Summary:        Library for reading and writing dirfile data
Url:            http://getdata.sourceforge.net/
Group:          Development/Libraries/C and C++
Source:         %{name}-%{version}.tar.bz2
BuildRequires:  bzip2
BuildRequires:  gcc-c++
BuildRequires:  gcc-fortran
BuildRequires:  libtool
BuildRequires:  pkg-config
BuildRequires:  python-devel
BuildRequires:  python-numpy-devel
BuildRequires:  xz
BuildRequires:  xz-devel
BuildRequires:  zlib-devel
Recommends:     %{name}-doc
Recommends:     bzip2
Recommends:     gzip
Recommends:     xz
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
The GetData Project is the reference implementation of the Dirfile Standards, a
filesystem-based database format for time-ordered binary data. The Dirfile
database format is designed to provide a fast, simple format for storing and
reading data.

%package devel
License:        LGPL-2.1+
Summary:        Headers required when building programs against GetData
Group:          Development/Libraries/Other
Requires:       %{name} = %{version}
Requires:       gcc-c++
Requires:       gcc-fortran
Requires:       libgetdata++2 = %{version}
Requires:       pkgconfig

%description devel
Headers required when building a program against the GetData library.
Includes C++ and FORTRAN (77 & 95) bindings.

%package doc
License:        LGPL-2.1+
Summary:        Documentation for GetData
Group:          Development/Libraries/C and C++
Requires:       %{name} = %{version}

%description doc
Documentation and manuals for the GetData library.

%package -n libgetdata4
License:        LGPL-2.1+
Summary:        Library for GetData
Group:          Development/Libraries/Other

%description -n libgetdata4
Library for C-bindings for GetData.

%post -n libgetdata4 -p /sbin/ldconfig

%postun -n libgetdata4 -p /sbin/ldconfig

%package -n libgetdata++2
License:        LGPL-2.1+
Summary:        Library for GetData
Group:          Development/Libraries/Other

%description -n libgetdata++2
Library for C++-bindings for GetData.

%post -n libgetdata++2 -p /sbin/ldconfig

%postun -n libgetdata++2 -p /sbin/ldconfig

%package -n libf95getdata2
License:        LGPL-2.1+
Summary:        GetData bindings for fortran
Group:          Development/Libraries/Other

%description -n libf95getdata2
The GetData library for fortran programs.

%post -n libf95getdata2 -p /sbin/ldconfig

%postun -n libf95getdata2 -p /sbin/ldconfig

%package -n libfgetdata2
License:        LGPL-2.1+
Summary:        GetData bindings for fortran
Group:          Development/Libraries/Other

%description -n libfgetdata2
The GetData library for fortran programs.

%post -n libfgetdata2 -p /sbin/ldconfig

%postun -n libfgetdata2 -p /sbin/ldconfig

%package -n python-getdata
License:        LGPL-2.1+
Summary:        GetData bindings for the python language
Group:          Development/Libraries/Python
Requires:       %{name} = %{version}
Requires:       python-base = %py_ver
Requires:       python-numpy

%description -n python-getdata
Bindings to the GetData library for the python lanuguage.
Uses (and requires) the numpy python library for large numeric arrays.

%prep
%setup -q

%build
%configure --disable-static --enable-modules
make %{?_smp_mflags}

%check
make check

%install
%make_install
# Remove .la files.
rm -f %{buildroot}/%{_libdir}/lib*.la
rm -f %{buildroot}/%{python_sitearch}/*.la
# Remove simple docs
rm -f  %{buildroot}/%{_datadir}/doc/%{name}/*

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root,-)
%doc COPYING AUTHORS
%{_bindir}/dirfile2ascii
%{_bindir}/checkdirfile
%{_libdir}/getdata
%{_mandir}/man1/checkdirfile.1.gz
%{_mandir}/man1/dirfile2ascii.1.gz

%files doc
%defattr(-,root,root,-)
%{_mandir}/man5/*
%doc README NEWS TODO ChangeLog

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

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

%files -n python-getdata
%defattr(-,root,root,-)
%{python_sitearch}/*.so

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

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

%files devel
%defattr(-,root,root,-)
%doc doc/README.cxx doc/README.f77 doc/unclean_database_recovery.txt doc/README.python
%{_libdir}/libgetdata.so
%{_libdir}/libf*getdata.so
%{_libdir}/libgetdata++.so
%{_includedir}/*
%{_mandir}/man3/*
%{_libdir}/pkgconfig/getdata.pc

%changelog