Changes of Revision 2
[-] | Changed | libtunepimp.spec |
x 1
2 # norootforbuild 3 4 -%define _prefix /usr 5 %define soname 5 6 7 -%if %suse_version >= 930 8 -%define split_mad 1 9 -%endif 10 - 11 %if %{?_with_perl:1}0 12 %define with_perl 1 13 %endif 14 15 -%if %suse_version >= 1030 16 +%if %suse_version >= 1030 || %suse_version < 1020 17 Name: libtunepimp%{soname} 18 %else 19 -%if %suse_version >= 1020 20 Name: libtunepimp 21 -%else 22 -Name: libtunepimp%{soname} 23 -%endif 24 %endif 25 Version: 0.5.3 26 Release: 100 27
28 Source: http://ftp.musicbrainz.org/pub/musicbrainz/libtunepimp-%{version}.tar.gz 29 Patch1: libtunepimp-plugins-5.diff 30 Patch2: libtunepimp-acinclude.diff 31 +Patch3: libtunepimp-fixes.patch 32 +Patch4: libtunepimp-ltdl.patch 33 URL: http://www.musicbrainz.org 34 Group: System/Libraries 35 License: GNU Library General Public License version 2 (LGPL 2) 36 BuildRoot: %{_tmppath}/build-%{name}-%{version} 37 -BuildRequires: libmusicbrainz-devel flac-devel 38 +BuildRequires: libmusicbrainz-devel flac-devel mpeg4ip 39 BuildRequires: libogg-devel libvorbis-devel mad-devel 40 +%if %suse_version >= 1030 41 +# workaround for broken lbuild 42 +BuildRequires: libreadline5 43 +%endif 44 BuildRequires: ncurses-devel readline-devel zlib-devel 45 BuildRequires: taglib-devel libmp4v2-devel libofa-devel 46 %if %suse_version < 1020 47 BuildRequires: taglib 48 %endif 49 BuildRequires: openssl-devel fftw3-devel curl-devel 50 +%if %suse_version >= 1020 51 +BuildRequires: libmpcdec-devel 52 +%else 53 BuildRequires: libmpcdec 54 -BuildRequires: gcc-c++ libstdc++ libstdc++-devel make glibc-devel 55 +%endif 56 +BuildRequires: gcc-c++ libstdc++-devel make glibc-devel 57 BuildRequires: python python-devel 58 BuildRequires: autoconf automake libtool 59 Obsoletes: trm 60
61 server is designed to enable Audio CD and MP3/Vorbis players to 62 download metadata about the music they are playing. 63 64 -%if %{?!split_mp3:1}0 65 -This package includes support for MP3, MP4, Ogg/Vorbis, FLAC and WMA. 66 -%else 67 -This package includes support for MP4, Ogg/Vorbis, FLAC and WMA. 68 -MP3 support is available by installing the %{name}-mad package. 69 -%endif 70 - 71 %package -n libtunepimp-devel 72 Summary: Include Files and Libraries mandatory for Development. 73 Group: Development/Libraries/C and C++ 74
75 %description -n python-libtunepimp 76 Python bindings for %{name} 77 78 -%if %{?split_mad:1}0 79 %package mad 80 -Summary: MP3 support for %{name} 81 +Summary: MP3 Support Plugin for %{name} 82 Requires: %{name} = %{version}-%{release} 83 Group: System/Libraries 84 %if %suse_version >= 1020 && %suse_version < 1030 85 Provides: libtunepimp%{soname}-mad = %{version}-%{release} 86 +%else 87 +Provides: libtunepimp-mad = %{version}-%{release} 88 %endif 89 +Provides: libtunepimp%{soname}-mp3 = %{version}-%{release} 90 +Provides: libtunepimp-mp3 = %{version}-%{release} 91 92 %description mad 93 This package adds MP3 support to libtunepimp 94 -%endif 95 96 %package mp4 97 -Summary: MP4 Plugin for %{name} 98 +Summary: MP4 Support Plugin for %{name} 99 Group: System/Libraries 100 Requires: %{name} = %{version}-%{release} 101 %if %suse_version >= 1020 && %suse_version < 1030 102 Provides: libtunepimp%{soname}-mp4 = %{version}-%{release} 103 +%else 104 +Provides: libtunepimp-mp4 = %{version}-%{release} 105 %endif 106 107 %description mp4 108
109 Group: Development/Libraries/Perl 110 Requires: %{name} = %{version}-%{release} 111 Provides: libtunepimp-perl = %{version}-%{release} 112 +Provides: libtunepimp%{soname}-perl = %{version}-%{release} 113 Provides: perl-libtunepimp%{soname} = %{version}-%{release} 114 115 %description -n perl-libtunepimp 116 Provides Perl bindings for %{name}. 117 %endif 118 119 +%if %suse_version >= 1030 120 +%package -n libtunepimp 121 +%else 122 %package -n libtunepimp-tools 123 +%endif 124 Summary: Command-Line Tools that use %{name} 125 Group: Productivity/Multimedia/Sound/Utilities 126 Requires: %{name} = %{version}-%{release} 127 +%if %suse_version >= 1030 128 +Provides: libtunepimp-tools = %{version}-%{release} 129 +%else 130 Provides: libtunepimp%{soname}-tools = %{version}-%{release} 131 +%endif 132 133 +%if %suse_version >= 1030 134 +%description -n libtunepimp 135 +%else 136 %description -n libtunepimp-tools 137 +%endif 138 Command-line tools for %{name}. 139 140 -%if %suse_version >= 930 141 %debug_package 142 -%endif 143 %prep 144 %setup -q -n "libtunepimp-%{version}" 145 +%if %suse_version < 1030 146 %patch1 147 +%endif 148 %patch2 149 +%patch3 -p1 150 +%patch4 151 152 %build 153 autoreconf -fiv 154
155 # Aliasing problems in mp4.cpp: 156 export CXXFLAGS="%{optflags} -fno-strict-aliasing" 157 %configure 158 - 159 %__make %{?jobs:-j%{jobs}} 160 161 pushd python 162
163 popd #perl/tunepimp-perl 164 %endif 165 166 -%if %suse_version < 930 167 -%__strip "%{buildroot}%{_bindir}"/* \ 168 - "%{buildroot}%{_libdir}"/lib*.so.* \ 169 - "%{buildroot}%{_libdir}/tunepimp05/plugins"/*.tpp \ 170 - 2>/dev/null || : 171 -%endif 172 - 173 %post -n %{name} -p /sbin/ldconfig 174 175 %postun -n %{name} -p /sbin/ldconfig 176
177 %doc AUTHORS ChangeLog COPYING README README.LGPL TODO 178 %{_libdir}/libtunepimp.so.%{soname} 179 %{_libdir}/libtunepimp.so.%{soname}.* 180 -%dir %{_libdir}/tunepimp* 181 +# only explicitly check for the exact directory name 182 +# here (to make sure we don't inadvertisedly use 183 +# libdir/libtunepimp5 on openSUSE 10.3); for the other 184 +# files that follow, just use a * to avoid duplicating 185 +# all lines for 10.3 and !=10.3 186 +%if %suse_version >= 1030 187 +%dir %{_libdir}/tunepimp 188 +%else 189 +%dir %{_libdir}/tunepimp%{soname} 190 +%endif 191 %dir %{_libdir}/tunepimp*/plugins 192 %{_libdir}/tunepimp*/plugins/flac.tpp 193 -%if %{?!split_mad:1}0 194 -%{_libdir}/tunepimp*/plugins/mp3.tpp 195 -%endif 196 %{_libdir}/tunepimp*/plugins/mpc.tpp 197 %{_libdir}/tunepimp*/plugins/vorbis.tpp 198 %{_libdir}/tunepimp*/plugins/wav.tpp 199
200 %{_libdir}/tunepimp*/plugins/speex.tpp 201 |
||
[+] | Added | libtunepimp-fixes.patch ^ |
@@ -0,0 +1,121 @@ +--- libtunepimp-0.5.3/lib/utf8/utf8util.cpp.xx 2007-10-24 10:32:24.000000000 +0200 ++++ libtunepimp-0.5.3/lib/utf8/utf8util.cpp 2007-10-24 10:32:34.000000000 +0200 +@@ -26,6 +26,7 @@ + ----------------------------------------------------------------------------*/ + + #include <stdio.h> ++#include <cstdlib> + #include "utf8util.h" + #include "utf8.h" + #ifdef WIN32 +--- libtunepimp-0.5.3/include/tunepimp-0.5/metadata.h.xx 2007-10-24 10:59:51.000000000 +0200 ++++ libtunepimp-0.5.3/include/tunepimp-0.5/metadata.h 2007-10-24 11:01:16.000000000 +0200 +@@ -28,6 +28,7 @@ + #define __METADATA_H__ + + #include <string> ++#include <cstring> + #include <cstdio> + + #include "defs.h" +--- libtunepimp-0.5.3/lib/metadata.cpp.xx 2007-10-24 11:01:59.000000000 +0200 ++++ libtunepimp-0.5.3/lib/metadata.cpp 2007-10-24 11:02:29.000000000 +0200 +@@ -25,6 +25,7 @@ + + ----------------------------------------------------------------------------*/ + #include <math.h> ++#include <cstdlib> + #include <stdio.h> + #include "metadata.h" + #include "../config.h" +--- libtunepimp-0.5.3/lib/protocol.cpp.xx 2007-10-24 11:03:57.000000000 +0200 ++++ libtunepimp-0.5.3/lib/protocol.cpp 2007-10-24 11:04:02.000000000 +0200 +@@ -9,6 +9,7 @@ + #include <stdio.h> + #include <stdlib.h> + #include <string> ++#include <cstring> + #include <map> + #include <expat.h> + #include <curl/curl.h> +--- libtunepimp-0.5.3/lib/tunepimp.cpp.xx 2007-10-24 11:00:22.000000000 +0200 ++++ libtunepimp-0.5.3/lib/tunepimp.cpp 2007-10-24 11:00:31.000000000 +0200 +@@ -32,6 +32,7 @@ + + #include <stdio.h> + #include <map> ++#include <cstdlib> + using namespace std; + + #ifdef WIN32 +--- libtunepimp-0.5.3/lib/c_wrapper.cpp.xx 2007-10-24 11:02:52.000000000 +0200 ++++ libtunepimp-0.5.3/lib/c_wrapper.cpp 2007-10-24 11:03:02.000000000 +0200 +@@ -28,6 +28,7 @@ + #include "mutex.h" + #include "tp_c.h" + #include "astrcmp.h" ++#include <cstdlib> + + #define DB printf("%s:%d\n", __FILE__, __LINE__); + +--- libtunepimp-0.5.3/lib/readmeta.cpp.xx 2007-10-24 11:03:19.000000000 +0200 ++++ libtunepimp-0.5.3/lib/readmeta.cpp 2007-10-24 11:03:27.000000000 +0200 +@@ -31,6 +31,7 @@ + #endif + + #include <stdio.h> ++#include <cstdlib> + #ifndef WIN32 + #include <unistd.h> + #endif +--- libtunepimp-0.5.3/lib/fileio.cpp.xx 2007-10-24 11:03:40.000000000 +0200 ++++ libtunepimp-0.5.3/lib/fileio.cpp 2007-10-24 11:03:47.000000000 +0200 +@@ -28,6 +28,8 @@ + #include <assert.h> + #include <errno.h> + #include <string> ++#include <cstring> ++#include <cstdlib> + #ifndef WIN32 + #include <unistd.h> + #endif +--- libtunepimp-0.5.3/plugins/wma/wmafile.cpp.xx 2007-10-24 11:04:53.000000000 +0200 ++++ libtunepimp-0.5.3/plugins/wma/wmafile.cpp 2007-10-24 11:05:00.000000000 +0200 +@@ -20,6 +20,7 @@ + ***************************************************************************/ + + #include <tstring.h> ++#include <cstring> + #include <wmafile.h> + #include <wmatag.h> + #include <wmaproperties.h> +--- libtunepimp-0.5.3/plugins/wma/wma.cpp.xx 2007-10-24 11:04:32.000000000 +0200 ++++ libtunepimp-0.5.3/plugins/wma/wma.cpp 2007-10-24 11:04:40.000000000 +0200 +@@ -27,6 +27,7 @@ + + #include <string.h> + #include <stdio.h> ++#include <cstdlib> + #include <wmafile.h> + #include "metadata.h" + #include "plugin.h" +--- libtunepimp-0.5.3/plugins/mp3/id3_2_3_meta.cpp.orig 2008-04-27 00:57:25.000000000 +0200 ++++ libtunepimp-0.5.3/plugins/mp3/id3_2_3_meta.cpp 2008-04-27 00:57:55.000000000 +0200 +@@ -28,6 +28,7 @@ + #include <stdio.h> + #include <assert.h> + #include <ctype.h> ++#include <cstdlib> + #include <musicbrainz/mb_c.h> + #include "mp3.h" + #include "id3_2_3_meta.h" +--- libtunepimp-0.5.3/plugins/mp3/id3_meta.cpp.orig 2008-04-27 10:01:09.000000000 +0200 ++++ libtunepimp-0.5.3/plugins/mp3/id3_meta.cpp 2008-04-27 10:01:22.000000000 +0200 +@@ -28,6 +28,7 @@ + #include <stdio.h> + #include <time.h> + #include <ctype.h> ++#include <cstdlib> + #include <musicbrainz/mb_c.h> + #include "mp3.h" + #include "id3_meta.h" | ||
[+] | Added | libtunepimp-ltdl.patch ^ |
@@ -0,0 +1,44 @@ +--- lib/plugins.cpp ++++ lib/plugins.cpp +@@ -103,12 +103,12 @@ int Plugins::load(const char *path, bool + strcat(init_func, "InitPlugin"); + + /* Opened plugin ok, now locate our entry function */ +- init_function = (Plugin *(*)(void))lt_dlsym((lt_dlhandle_struct *)info.handle, init_func); ++ init_function = (Plugin *(*)(void))lt_dlsym((lt_dlhandle)info.handle, init_func); + if (init_function == NULL) + { + if (printDebugInfo) + fprintf(stderr, "Cannot find entry point in %s (%s).\n", file, lt_dlerror()); +- lt_dlclose((lt_dlhandle_struct *)info.handle); ++ lt_dlclose((lt_dlhandle)info.handle); + continue; + } + +@@ -116,7 +116,7 @@ int Plugins::load(const char *path, bool + info.methods = (*init_function)(); + if (info.methods == NULL) + { +- lt_dlclose((lt_dlhandle_struct *)info.handle); ++ lt_dlclose((lt_dlhandle)info.handle); + if (printDebugInfo) + fprintf(stderr, "Cannot retrieve supported methods from %s.\n", file); + continue; +@@ -150,7 +150,7 @@ int Plugins::load(const char *path, bool + fprintf(stderr, " [Plugin %s has already been loaded. " + "Skipping.]\n", info.file); + info.methods->shutdown(); +- lt_dlclose((lt_dlhandle_struct *)info.handle); ++ lt_dlclose((lt_dlhandle)info.handle); + break; + } + } +@@ -173,7 +173,7 @@ void Plugins::unload(void) + if ((*i).handle) + { + (*i).methods->shutdown(); +- lt_dlclose((lt_dlhandle_struct *)(*i).handle); ++ lt_dlclose((lt_dlhandle)(*i).handle); + (*i).handle = NULL; + } + } | ||
Added | libtunepimp5-0.5.3-100.pm.9.src.rpm ^ |