]>
Commit | Line | Data |
---|---|---|
6e529ff8 JR |
1 | # TODO: port to standalone mp4v2 |
2 | ||
3 | %bcond_with mp4v2 # build with mp4v2 support | |
4 | ||
14cee363 | 5 | %define major 0.5 |
2f94c4ac | 6 | Summary: The MusicBrainz tagging library |
1d7513e5 | 7 | Summary(pl.UTF-8): Biblioteka znakowania MusicBrainz |
2f94c4ac | 8 | Name: libtunepimp |
14cee363 | 9 | Version: %{major}.3 |
6e529ff8 | 10 | Release: 16 |
2f94c4ac JB |
11 | License: GPL |
12 | Group: Libraries | |
13 | Source0: ftp://ftp.musicbrainz.org/pub/musicbrainz/%{name}-%{version}.tar.gz | |
b83e31ac | 14 | # Source0-md5: 09649f983acef679a548344ba7a9bb2f |
a40019e2 | 15 | Patch0: %{name}-ltdl.patch |
7e6206cd | 16 | Patch1: %{name}-mpeg4ip.patch |
1e0007f6 | 17 | Patch2: %{name}-gcc43.patch |
e5acd9f6 | 18 | Patch3: gcc44.patch |
2f94c4ac JB |
19 | BuildRequires: autoconf >= 2.52 |
20 | BuildRequires: automake | |
a40019e2 JB |
21 | BuildRequires: curl-devel |
22 | BuildRequires: expat-devel | |
640006af | 23 | BuildRequires: flac-devel |
a40019e2 | 24 | BuildRequires: libltdl-devel |
2f94c4ac | 25 | BuildRequires: libmad-devel |
a041b484 | 26 | BuildRequires: libmusicbrainz-devel >= 2.1.0 |
a40019e2 | 27 | BuildRequires: libofa-devel >= 0.4.0 |
2f94c4ac JB |
28 | BuildRequires: libstdc++-devel >= 2:1.4d |
29 | BuildRequires: libtool | |
30 | BuildRequires: libvorbis-devel | |
6e529ff8 | 31 | %{?with_mp4v2:BuildRequires: mp4v2-devel} |
dad21fdb | 32 | BuildRequires: python-devel >= 1:2.5 |
a40019e2 | 33 | BuildRequires: rpm-pythonprov |
bd146259 | 34 | BuildRequires: taglib-devel >= 1.4 |
a40019e2 | 35 | BuildRequires: zlib-devel |
2f94c4ac JB |
36 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
37 | ||
38 | %description | |
39 | The MusicBrainz tagging library. | |
40 | ||
1372dcb1 | 41 | %description -l pl.UTF-8 |
2f94c4ac JB |
42 | Biblioteka znakowania MusicBrainz. |
43 | ||
44 | %package devel | |
45 | Summary: Header files for libtunepimp library | |
1d7513e5 | 46 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libtunepimp |
2f94c4ac | 47 | Group: Development/Libraries |
a041b484 | 48 | Requires: %{name} = %{version}-%{release} |
23dda988 JB |
49 | Requires: curl-devel |
50 | Requires: expat-devel | |
a40019e2 | 51 | Requires: libltdl-devel |
a041b484 | 52 | Requires: libmusicbrainz-devel >= 2.1.0 |
a62fd4a4 | 53 | Requires: libofa-devel >= 0.4.0 |
112e17ae | 54 | Requires: libstdc++-devel >= 2:1.4d |
2f94c4ac JB |
55 | |
56 | %description devel | |
57 | Header files for libtunepimp library. | |
58 | ||
1372dcb1 JR |
59 | %description devel -l pl.UTF-8 |
60 | Pliki nagłówkowe biblioteki libtunepimp. | |
2f94c4ac JB |
61 | |
62 | %package static | |
63 | Summary: Static libtunepimp library | |
1d7513e5 | 64 | Summary(pl.UTF-8): Statyczna biblioteka libtunepimp |
2f94c4ac | 65 | Group: Development/Libraries |
a041b484 | 66 | Requires: %{name}-devel = %{version}-%{release} |
2f94c4ac JB |
67 | |
68 | %description static | |
69 | Static libtunepimp library. | |
70 | ||
1372dcb1 | 71 | %description static -l pl.UTF-8 |
2f94c4ac JB |
72 | Statyczna biblioteka libtunepimp. |
73 | ||
a40019e2 JB |
74 | %package -n python-tunepimp |
75 | Summary: Python bindings for libtunepimp library | |
1d7513e5 | 76 | Summary(pl.UTF-8): Wiązania Pythona do biblioteki libtunepimp |
a40019e2 JB |
77 | Group: Libraries/Python |
78 | %pyrequires_eq python-libs | |
79 | Requires: %{name} = %{version}-%{release} | |
a40019e2 JB |
80 | |
81 | %description -n python-tunepimp | |
82 | Python bindings for libtunepimp library. | |
83 | ||
1372dcb1 JR |
84 | %description -n python-tunepimp -l pl.UTF-8 |
85 | Wiązania Pythona do biblioteki libtunepimp. | |
a40019e2 | 86 | |
2f94c4ac JB |
87 | %prep |
88 | %setup -q | |
65af387d | 89 | %patch0 -p1 |
1e0007f6 | 90 | %patch2 -p1 |
e5acd9f6 | 91 | %patch3 -p1 |
6e529ff8 | 92 | %patch1 -p1 |
2f94c4ac | 93 | |
c41f0aab PS |
94 | %{__sed} -i 's/ -O2//' configure.in |
95 | %{__sed} -i 's/lt_dlhandle_struct \*/lt_dlhandle/' lib/plugins.cpp | |
bd146259 | 96 | |
2f94c4ac JB |
97 | %build |
98 | %{__libtoolize} | |
99 | %{__aclocal} | |
100 | %{__autoconf} | |
101 | %{__autoheader} | |
102 | %{__automake} | |
c41f0aab PS |
103 | |
104 | %configure \ | |
6e529ff8 | 105 | %{!?with_mp4v2:ac_cv_lib_mp4v2_MP4Read=false} \ |
c41f0aab PS |
106 | --enable-ltdl-install=no |
107 | ||
2f94c4ac JB |
108 | %{__make} |
109 | ||
a40019e2 JB |
110 | # perl bindings are not updated to current API |
111 | #cd perl/tunepimp-perl | |
112 | #%{__perl} Makefile.PL \ | |
113 | # OPTIMIZE="%{rpmcflags}" | |
114 | #%{__make} | |
115 | # cd ../.. | |
116 | ||
117 | cd python | |
118 | python setup.py build | |
119 | ||
2f94c4ac JB |
120 | %install |
121 | rm -rf $RPM_BUILD_ROOT | |
122 | ||
123 | %{__make} install \ | |
124 | DESTDIR=$RPM_BUILD_ROOT | |
125 | ||
bd146259 | 126 | # not installed, but used by installed headers (track.h, tunepimp.h) |
640006af | 127 | install lib/threads/posix/mutex.h \ |
a40019e2 JB |
128 | lib/{analyzer,filecache,plugins,readmeta,write}.h \ |
129 | include/tunepimp-*/metadata.h \ | |
14cee363 | 130 | $RPM_BUILD_ROOT%{_includedir}/tunepimp-%{major} |
a40019e2 JB |
131 | |
132 | #cd perl/tunepimp-perl | |
133 | #%{__make} install \ | |
134 | # DESTDIR=$RPM_BUILD_ROOT | |
135 | #install -D examples/tp_tagger.pl $RPM_BUILD_ROOT%{_bindir}/tp_tagger | |
136 | # cd ../.. | |
137 | ||
138 | cd python | |
139 | python setup.py install \ | |
140 | --root=$RPM_BUILD_ROOT \ | |
141 | --optimize=2 | |
142 | %py_postclean | |
143 | install -D examples/trm.py $RPM_BUILD_ROOT%{_bindir}/trm | |
2f94c4ac JB |
144 | |
145 | %clean | |
146 | rm -rf $RPM_BUILD_ROOT | |
147 | ||
148 | %post -p /sbin/ldconfig | |
149 | %postun -p /sbin/ldconfig | |
150 | ||
151 | %files | |
152 | %defattr(644,root,root,755) | |
153 | %doc AUTHORS ChangeLog README.LGPL TODO | |
a40019e2 JB |
154 | %attr(755,root,root) %{_bindir}/puid |
155 | %attr(755,root,root) %{_libdir}/libtunepimp.so.*.*.* | |
0c3e412c | 156 | %attr(755,root,root) %ghost %{_libdir}/libtunepimp.so.5 |
640006af PS |
157 | %dir %{_libdir}/tunepimp |
158 | %dir %{_libdir}/tunepimp/plugins | |
159 | %attr(755,root,root) %{_libdir}/tunepimp/plugins/*.tpp | |
2f94c4ac JB |
160 | |
161 | %files devel | |
162 | %defattr(644,root,root,755) | |
a40019e2 JB |
163 | %attr(755,root,root) %{_libdir}/libtunepimp.so |
164 | %{_libdir}/libtunepimp.la | |
14cee363 | 165 | %{_includedir}/tunepimp-%{major} |
2f94c4ac JB |
166 | |
167 | %files static | |
168 | %defattr(644,root,root,755) | |
a40019e2 JB |
169 | %{_libdir}/libtunepimp.a |
170 | ||
171 | %files -n python-tunepimp | |
172 | %defattr(644,root,root,755) | |
173 | %attr(755,root,root) %{_bindir}/trm | |
174 | %dir %{py_sitescriptdir}/tunepimp | |
175 | %{py_sitescriptdir}/tunepimp/*.py[co] | |
753a68b7 | 176 | %{py_sitescriptdir}/*.egg-info |