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