diff --git a/README.md b/README.md index 64858af..5fc249e 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,4 @@ # libofa +LibOFA (Library Open Fingerprint Architecture) is an open-source audio fingerprint library. + diff --git a/libofa-0.9.3-curl-7.21.patch b/libofa-0.9.3-curl-7.21.patch new file mode 100644 index 0000000..d233518 --- /dev/null +++ b/libofa-0.9.3-curl-7.21.patch @@ -0,0 +1,11 @@ +diff -ru libofa-0.9.3.orig//examples/protocol.cpp libofa-0.9.3//examples/protocol.cpp +--- libofa-0.9.3.orig//examples/protocol.cpp 2006-05-10 20:05:42.000000000 +0200 ++++ libofa-0.9.3//examples/protocol.cpp 2011-07-22 19:02:30.687109297 +0200 +@@ -12,7 +12,6 @@ + #include + #include + #include +-#include + #include + + using namespace std; diff --git a/libofa-0.9.3-gcc-4.7.patch b/libofa-0.9.3-gcc-4.7.patch new file mode 100644 index 0000000..47adf6b --- /dev/null +++ b/libofa-0.9.3-gcc-4.7.patch @@ -0,0 +1,20 @@ +--- a/examples/uselame.cpp 2006-05-10 19:05:51.000000000 +0100 ++++ b/examples/uselame.cpp 2012-04-16 12:57:51.035989196 +0100 +@@ -12,6 +12,7 @@ + #else + #include + #endif ++#include + + AudioData *loadWaveFile(char *file); + +--- a/examples/wavefile.cpp 2006-05-10 19:05:56.000000000 +0100 ++++ b/examples/wavefile.cpp 2012-04-16 12:57:37.439463775 +0100 +@@ -11,6 +11,7 @@ + #include "io.h" + #endif + #include ++#include + + static bool readBytes(int fd, unsigned char *buf, int size) { + int ct = 0; \ No newline at end of file diff --git a/libofa-0.9.3-gcc-43.patch b/libofa-0.9.3-gcc-43.patch new file mode 100644 index 0000000..eeb6ec9 --- /dev/null +++ b/libofa-0.9.3-gcc-43.patch @@ -0,0 +1,31 @@ +--- lib/signal_op.cpp~ 2007-04-02 12:33:42.000000000 +0000 ++++ lib/signal_op.cpp 2007-04-02 12:33:47.000000000 +0000 +@@ -12,6 +12,7 @@ + // DATE CREATED: 1/12/06 + + ++#include + #include + #include "signal_op.h" + #include "AFLIB/aflibConverter.h" +--- examples/example.cpp~ 2007-04-02 12:34:01.000000000 +0000 ++++ examples/example.cpp 2007-04-02 12:34:10.000000000 +0000 +@@ -9,6 +9,8 @@ + -------------------------------------------------------------------*/ + + #include "protocol.h" + ++#include ++ + AudioData* loadWaveFile(char *file); + AudioData* loadDataUsingLAME(char *file); +--- examples/protocol.cpp~ 2006-05-10 18:05:42.000000000 +0000 ++++ examples/protocol.cpp 2007-12-29 18:06:16.000000000 +0000 +@@ -8,6 +8,7 @@ + -------------------------------------------------------------------*/ + #include + #include ++#include + #include + #include + #include diff --git a/libofa-0.9.3-gcc44.patch b/libofa-0.9.3-gcc44.patch new file mode 100644 index 0000000..815c70e --- /dev/null +++ b/libofa-0.9.3-gcc44.patch @@ -0,0 +1,13 @@ +diff -Nru libofa-0.9.3.orig//examples/example.cpp libofa-0.9.3/examples/example.cpp +--- libofa-0.9.3.orig//examples/example.cpp 2010-12-18 13:53:04.180151809 +0100 ++++ libofa-0.9.3/examples/example.cpp 2010-12-18 13:53:39.322152000 +0100 +@@ -8,7 +8,8 @@ + -------------------------------------------------------------------*/ + + #include "protocol.h" +- ++#include ++#include + #include + + AudioData* loadWaveFile(char *file); diff --git a/libofa-0.9.3-tnt_math_utils.patch b/libofa-0.9.3-tnt_math_utils.patch new file mode 100644 index 0000000..cb0d1e3 --- /dev/null +++ b/libofa-0.9.3-tnt_math_utils.patch @@ -0,0 +1,37 @@ +diff -Nru libofa-0.9.3.orig/lib/JAMA/tnt_math_utils.h libofa-0.9.3/lib/JAMA/tnt_math_utils.h +--- libofa-0.9.3.orig/lib/JAMA/tnt_math_utils.h 2006-05-10 19:58:50.000000000 +0200 ++++ libofa-0.9.3/lib/JAMA/tnt_math_utils.h 2009-01-10 14:33:19.000000000 +0100 +@@ -19,6 +19,16 @@ + + namespace TNT + { ++ ++/** ++ @returns the absolute value of a real (no-complex) scalar. ++*/ ++template ++Real abs(const Real &a) ++{ ++ return (a > 0 ? a : -a); ++} ++ + /** + @returns hypotenuse of real (non-complex) scalars a and b by + avoiding underflow/overflow +@@ -55,16 +65,7 @@ + return a > b ? a : b; + } + */ +- +-/** +- @returns the absolute value of a real (no-complex) scalar. +-*/ +-template +-Real abs(const Real &a) +-{ +- return (a > 0 ? a : -a); + } + +-} + #endif + /* MATH_UTILS_H */ diff --git a/libofa.spec b/libofa.spec new file mode 100644 index 0000000..ad3532a --- /dev/null +++ b/libofa.spec @@ -0,0 +1,83 @@ +Name: libofa +Version: 0.9.3 +Release: 3mamba +Summary: An open-source audio fingerprint library +Group: System/Libraries +Vendor: openmamba +Distribution: openmamba +Packager: Silvan Calarco +URL: http://code.google.com/p/musicip-libofa/ +Source: http://musicip-libofa.googlecode.com/files/libofa-%{version}.tar.gz +Patch0: %{name}-0.9.3-gcc-43.patch +Patch1: %{name}-0.9.3-tnt_math_utils.patch +Patch2: %{name}-0.9.3-gcc44.patch +Patch3: libofa-0.9.3-gcc-4.7.patch +Patch4: libofa-0.9.3-curl-7.21.patch +License: GPL +## AUTOBUILDREQ-BEGIN +BuildRequires: glibc-devel +BuildRequires: libfftw-devel +BuildRequires: libgcc +BuildRequires: libstdc++6-devel +## AUTOBUILDREQ-END +BuildRoot: %{_tmppath}/%{name}-%{version}-root + +%description +LibOFA (Library Open Fingerprint Architecture) is an open-source audio fingerprint library. + +%package devel +Group: Development/Libraries +Summary: Static libraries and headers for %{name} +Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release} + +%description devel +LibOFA (Library Open Fingerprint Architecture) is an open-source audio fingerprint library. + +This package contains static libraries and header files need for development. + +%prep +%setup -q +%patch0 -p0 +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 + +%build +%configure +%make + +%install +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" +%makeinstall + +%clean +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +%post -p /sbin/ldconfig +%postun -p /sbin/ldconfig + +%files +%defattr(-,root,root) +%{_libdir}/libofa.so.* +%doc AUTHORS COPYING + +%files devel +%defattr(-,root,root) +%dir %{_includedir}/ofa1 +%{_includedir}/ofa1/ofa.h +%{_libdir}/libofa.a +%{_libdir}/libofa.la +%{_libdir}/libofa.so +%{_libdir}/pkgconfig/libofa.pc +%doc README + +%changelog +* Wed Sep 05 2012 Silvan Calarco 0.9.3-3mamba +- rebuilt with gcc 4.7 and curl >= 7.21 patches + +* Sat Dec 18 2010 Silvan Calarco 0.9.3-2mamba +- rebuilt (added patch for missing include) + +* Sat Jan 10 2009 Silvan Calarco 0.9.3-1mamba +- package created by autospec