File libofa.spec of Package libofa

#
# spec file for package libofa
#
# 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:           libofa
Summary:        Open Fingerprint Architecture Library
License:        GPL-2.0+ or APL-1.0 (spdx.org/licenses)
Group:          System/Libraries
Version:        0.9.3
Release:        88
Url:            http://code.google.com/p/musicip-libofa/
Source0:        %{name}-%{version}.tar.bz2
Source1:        baselibs.conf
Patch0:         libofa-incl.patch
Patch1:         libofa-0.9.3-gcc43.patch
Patch2:         libofa-0.9.3-pkgconfigbloat.patch
Patch3:         libofa-0.9.3-gcc44.patch
Patch4:         libofa-curl-types.patch
BuildRequires:  curl-devel fftw3-devel gcc-c++ libexpat-devel pkg-config
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
MusicDNS and the Open Fingerprint Architecture provide a system for
identifying a piece of music with nothing more than the sound of the
piece itself.
This library is by design compatible with the MusicDNS web service.
Non-commercial access to the service is available at
http://www.musicdns.org.

%package -n libofa0


Group:          System/Libraries
Summary:        Open Fingerprint Architecture Library
Provides:       %{name} = %{version}
#opensuse 10.3
Obsoletes:      libofa < 0.9.3

%description -n libofa0
MusicDNS and the Open Fingerprint Architecture provide a system for
identifying a piece of music with nothing more than the sound of the
piece itself.
This library is by design compatible with the MusicDNS web service.
Non-commercial access to the service is available at
http://www.musicdns.org.

%package devel


Group:          Development/Libraries/C and C++
Requires:       libofa0 = %{version} fftw3-devel libexpat-devel glibc-devel
Summary:        Open Fingerprint Architecture Library

%description devel
MusicDNS and the Open Fingerprint Architecture provide a system for
identifying a piece of music with nothing more than the sound of the
piece itself.
This library is by design compatible with the MusicDNS web service.
Non-commercial access to the service is available at
http://www.musicdns.org.

%prep
%setup -q
%patch0
%patch1
%patch2
%patch3 -p1
%patch4
tr -d '\r' <README >README~
mv README~ README

%build
autoreconf -fi
%configure  --disable-static --with-pic
make %{?jobs:-j%jobs}

%install
make DESTDIR=$RPM_BUILD_ROOT install

%clean
rm -rf $RPM_BUILD_ROOT

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

%files devel
%defattr(-, root, root)
%doc AUTHORS COPYING README
%doc examples/*.cpp examples/*.h
%dir %{_includedir}/ofa1
%{_includedir}/ofa1/*.h
%{_libdir}/lib*.so
%{_libdir}/pkgconfig/*.pc
%exclude %{_libdir}/lib*.*a

%post -n libofa0 -p /sbin/ldconfig

%postun -n libofa0 -p /sbin/ldconfig

%changelog
openSUSE Build Service is sponsored by