]>
Commit | Line | Data |
---|---|---|
f4330271 JB |
1 | # |
2 | # Conditional build: | |
68e9ffd2 | 3 | %bcond_with bootstrap # bootstrap (alias for _without_mpeg4ip) |
d7cfa918 JB |
4 | %bcond_with mpeg4ip # MPEG4IP plugin |
5 | %bcond_without static_libs # static libraries | |
6 | %bcond_without xmms # XMMS plugin | |
cbb60075 | 7 | |
327697e7 | 8 | %{?with_bootstrap:%undefine with_mpeg4ip} |
9c3cb898 | 9 | Summary: Freeware Advanced Audio Decoder 2 |
059244cb | 10 | Summary(pl.UTF-8): Darmowy zaawansowany dekoder audio |
9c3cb898 | 11 | Name: faad2 |
d7cfa918 | 12 | Version: 2.10.1 |
aff333c1 | 13 | Release: 1 |
45e28ee0 | 14 | License: GPL v2+ |
327697e7 | 15 | Group: Applications/Sound |
ac4a8719 JB |
16 | #Source0: http://downloads.sourceforge.net/faac/%{name}-%{version}.tar.gz |
17 | #Source0Download: https://github.com/knik0/faad2/releases | |
d7cfa918 JB |
18 | Source0: https://github.com/knik0/faad2/archive/%{version}/%{name}-%{version}.tar.gz |
19 | # Source0-md5: 62a0427c6ff3a273aa720e27da166758 | |
52db292f | 20 | Patch0: %{name}-make.patch |
e4d59ed1 | 21 | Patch1: %{name}-mpeg4ip.patch |
e4d59ed1 | 22 | Patch3: %{name}-backward_compat.patch |
45e28ee0 | 23 | Patch4: %{name}-mp4ff.patch |
ac4a8719 JB |
24 | Patch5: %{name}-mp4v2.patch |
25 | URL: https://www.audiocoding.com/ | |
c03578bb | 26 | %{?with_mpeg4ip:BuildRequires: SDL-devel} |
ac4a8719 | 27 | BuildRequires: autoconf >= 2.50 |
9c3cb898 | 28 | BuildRequires: automake |
52db292f | 29 | %{?with_xmms:BuildRequires: id3lib-devel >= 3.8.2} |
52db292f | 30 | BuildRequires: libtool >= 2:1.4d-3 |
ac4a8719 | 31 | %{?with_xmms:BuildRequires: mp4ff-devel} |
ea603bc1 JB |
32 | %if %{with mpeg4ip} |
33 | BuildRequires: mp4v2-devel | |
34 | BuildRequires: mpeg4ip-devel >= 1:1.6 | |
35 | %endif | |
aff333c1 | 36 | BuildRequires: rpmbuild(macros) >= 1.721 |
1ee9cb0a | 37 | %{?with_xmms:BuildRequires: xmms-devel} |
327697e7 | 38 | Requires: %{name}-libs = %{version}-%{release} |
9c3cb898 | 39 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
40 | ||
9c3cb898 | 41 | %description |
42 | FAAD 2 is a LC, MAIN and LTP profile, MPEG2 and MPEG-4 AAC decoder, | |
43 | completely written from scratch. | |
44 | ||
0e2dcaed JR |
45 | %description -l pl.UTF-8 |
46 | FAAD 2 to napisany całkowicie od początku dekoder MPEG2 i MPEG-4 | |
47 | obsługujący profile LC, MAIN i LTP. | |
f4330271 | 48 | |
327697e7 JB |
49 | %package libs |
50 | Summary: FAAD 2 libraries | |
059244cb | 51 | Summary(pl.UTF-8): Biblioteki FAAD 2 |
327697e7 | 52 | Group: Libraries |
aff333c1 JB |
53 | %if 0%{?_soname_prov:1} |
54 | Provides: %{_soname_prov libfaad.so.0} | |
55 | %endif | |
327697e7 JB |
56 | Conflicts: faad2 < 2.0-3 |
57 | ||
58 | %description libs | |
59 | FAAD 2 is a LC, MAIN and LTP profile, MPEG2 and MPEG-4 AAC decoder, | |
60 | completely written from scratch. This package contains base FAAD 2 | |
61 | libraries: libfaad and libmp4ff. | |
62 | ||
0e2dcaed JR |
63 | %description libs -l pl.UTF-8 |
64 | FAAD 2 to napisany całkowicie od początku dekoder MPEG2 i MPEG-4 | |
65 | obsługujący profile LC, MAIN i LTP. Ten pakiet zawiera podstawowe | |
327697e7 JB |
66 | biblioteki FAAD 2: libfaad i libmp4ff. |
67 | ||
9c3cb898 | 68 | %package devel |
327697e7 | 69 | Summary: Header files for faad2 |
059244cb | 70 | Summary(pl.UTF-8): Pliki nagłówkowe faad2 |
9c3cb898 | 71 | Group: Development/Libraries |
327697e7 | 72 | Requires: %{name}-libs = %{version}-%{release} |
9c3cb898 | 73 | |
74 | %description devel | |
327697e7 | 75 | Header files for faad2. |
9c3cb898 | 76 | |
0e2dcaed JR |
77 | %description devel -l pl.UTF-8 |
78 | Pliki nagłówkowe faad2. | |
f4330271 | 79 | |
9c3cb898 | 80 | %package static |
81 | Summary: Static faad2 library | |
059244cb | 82 | Summary(pl.UTF-8): Statyczna biblioteka faad2 |
9c3cb898 | 83 | Group: Development/Libraries |
327697e7 | 84 | Requires: %{name}-devel = %{version}-%{release} |
9c3cb898 | 85 | |
86 | %description static | |
87 | Static faad2 library. | |
88 | ||
0e2dcaed | 89 | %description static -l pl.UTF-8 |
f4330271 JB |
90 | Statyczna biblioteka faad2. |
91 | ||
327697e7 JB |
92 | %package -n mpeg4ip-plugin-faad2 |
93 | Summary: MPEG4IP plugin for AAC files | |
059244cb | 94 | Summary(pl.UTF-8): Wtyczka MPEG4IP do plików AAC |
327697e7 JB |
95 | Group: Applications/Sound |
96 | Requires: %{name}-libs = %{version}-%{release} | |
97 | Requires: mpeg4ip | |
98 | ||
99 | %description -n mpeg4ip-plugin-faad2 | |
100 | MPEG4IP plugin for AAC files. | |
101 | ||
0e2dcaed JR |
102 | %description -n mpeg4ip-plugin-faad2 -l pl.UTF-8 |
103 | Wtyczka MPEG4IP do plików AAC. | |
327697e7 | 104 | |
f4330271 JB |
105 | %package -n xmms-input-faad2 |
106 | Summary: XMMS plugin for AAC files | |
059244cb | 107 | Summary(pl.UTF-8): Wtyczka XMMS do plików AAC |
f4330271 | 108 | Group: X11/Applications/Sound |
327697e7 | 109 | Requires: %{name}-libs = %{version}-%{release} |
c7dec483 | 110 | Requires: xmms |
f4330271 JB |
111 | |
112 | %description -n xmms-input-faad2 | |
113 | XMMS plugin for AAC files. | |
114 | ||
0e2dcaed JR |
115 | %description -n xmms-input-faad2 -l pl.UTF-8 |
116 | Wtyczka XMMS do plików AAC. | |
f4330271 | 117 | |
9c3cb898 | 118 | %prep |
d7cfa918 | 119 | %setup -q |
52db292f | 120 | %patch0 -p1 |
281edd3d | 121 | %patch1 -p1 |
269b5740 | 122 | %patch3 -p1 |
b62e63c4 | 123 | %patch4 -p1 |
ac4a8719 | 124 | %patch5 -p1 |
9c3cb898 | 125 | |
126 | %build | |
52db292f JB |
127 | %{__libtoolize} |
128 | %{__aclocal} | |
129 | %{__autoconf} | |
130 | %{__autoheader} | |
131 | %{__automake} | |
70f03c9e | 132 | %configure \ |
ac4a8719 JB |
133 | --with-xmms%{!?with_xmms:=no} \ |
134 | --with-mpeg4ip%{!?with_mpeg4ip:=no} \ | |
68e9ffd2 | 135 | %{!?with_static_libs:--disable-static} |
70f03c9e | 136 | |
9c3cb898 | 137 | %{__make} |
138 | ||
139 | %install | |
140 | rm -rf $RPM_BUILD_ROOT | |
f4330271 JB |
141 | |
142 | %{__make} install \ | |
143 | DESTDIR=$RPM_BUILD_ROOT | |
144 | ||
aa497f07 | 145 | %if %{with xmms} |
45e28ee0 | 146 | %{__rm} $RPM_BUILD_ROOT%{xmms_input_plugindir}/*.{la,a} |
aa497f07 | 147 | %endif |
012e2079 | 148 | %if %{with mpeg4ip} |
45e28ee0 | 149 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/mp4player_plugin/*.{la,a} |
012e2079 | 150 | %endif |
9c3cb898 | 151 | |
aff333c1 JB |
152 | # for compatibility with apps using dlopen("libfaad.so.0") |
153 | ln -sf $(basename $RPM_BUILD_ROOT%{_libdir}/libfaad.so.2.*.*) $RPM_BUILD_ROOT%{_libdir}/libfaad.so.0 | |
154 | ||
9c3cb898 | 155 | %clean |
156 | rm -rf $RPM_BUILD_ROOT | |
157 | ||
327697e7 JB |
158 | %post libs -p /sbin/ldconfig |
159 | %postun libs -p /sbin/ldconfig | |
9c3cb898 | 160 | |
161 | %files | |
162 | %defattr(644,root,root,755) | |
327697e7 | 163 | %attr(755,root,root) %{_bindir}/faad |
45e28ee0 | 164 | %{_mandir}/man1/faad.1* |
327697e7 JB |
165 | |
166 | %files libs | |
167 | %defattr(644,root,root,755) | |
9c3cb898 | 168 | %doc AUTHORS ChangeLog NEWS README TODO |
e4d59ed1 | 169 | %attr(755,root,root) %{_libdir}/libfaad.so.*.*.* |
aff333c1 JB |
170 | %attr(755,root,root) %ghost %{_libdir}/libfaad.so.2 |
171 | # compat symlink | |
172 | %attr(755,root,root) %{_libdir}/libfaad.so.0 | |
173 | %attr(755,root,root) %{_libdir}/libfaad_drm.so.*.*.* | |
174 | %attr(755,root,root) %ghost %{_libdir}/libfaad_drm.so.2 | |
9c3cb898 | 175 | |
176 | %files devel | |
177 | %defattr(644,root,root,755) | |
327697e7 | 178 | %attr(755,root,root) %{_libdir}/libfaad.so |
aff333c1 | 179 | %attr(755,root,root) %{_libdir}/libfaad_drm.so |
327697e7 | 180 | %{_libdir}/libfaad.la |
aff333c1 | 181 | %{_libdir}/libfaad_drm.la |
327697e7 | 182 | %{_includedir}/faad.h |
7c7f8a92 | 183 | %{_includedir}/neaacdec.h |
ac4a8719 | 184 | %{_pkgconfigdir}/faad2.pc |
9c3cb898 | 185 | |
68e9ffd2 | 186 | %if %{with static_libs} |
9c3cb898 | 187 | %files static |
188 | %defattr(644,root,root,755) | |
327697e7 | 189 | %{_libdir}/libfaad.a |
aff333c1 | 190 | %{_libdir}/libfaad_drm.a |
68e9ffd2 | 191 | %endif |
f4330271 | 192 | |
db60caea | 193 | %if %{with xmms} |
f4330271 JB |
194 | %files -n xmms-input-faad2 |
195 | %defattr(644,root,root,755) | |
e4d59ed1 | 196 | %attr(755,root,root) %{xmms_input_plugindir}/libmp4.so |
f4330271 | 197 | %endif |
327697e7 JB |
198 | |
199 | %if %{with mpeg4ip} | |
200 | %files -n mpeg4ip-plugin-faad2 | |
201 | %defattr(644,root,root,755) | |
e4d59ed1 | 202 | %attr(755,root,root) %{_libdir}/mp4player_plugin/faad2_plugin.so* |
327697e7 | 203 | %endif |