]>
Commit | Line | Data |
---|---|---|
f4330271 JB |
1 | # |
2 | # Conditional build: | |
d7cfa918 | 3 | %bcond_without static_libs # static libraries |
cbb60075 | 4 | |
9c3cb898 | 5 | Summary: Freeware Advanced Audio Decoder 2 |
059244cb | 6 | Summary(pl.UTF-8): Darmowy zaawansowany dekoder audio |
9c3cb898 | 7 | Name: faad2 |
43c8175c | 8 | Version: 2.11.1 |
aff333c1 | 9 | Release: 1 |
45e28ee0 | 10 | License: GPL v2+ |
327697e7 | 11 | Group: Applications/Sound |
ac4a8719 JB |
12 | #Source0: http://downloads.sourceforge.net/faac/%{name}-%{version}.tar.gz |
13 | #Source0Download: https://github.com/knik0/faad2/releases | |
d7cfa918 | 14 | Source0: https://github.com/knik0/faad2/archive/%{version}/%{name}-%{version}.tar.gz |
43c8175c JB |
15 | # Source0-md5: f85b2514c4fb2f87d22a3bc879d83277 |
16 | Patch0: %{name}-backward_compat.patch | |
17 | URL: https://github.com/knik0/faad2 | |
18 | BuildRequires: cmake >= 3.15 | |
aff333c1 | 19 | BuildRequires: rpmbuild(macros) >= 1.721 |
327697e7 | 20 | Requires: %{name}-libs = %{version}-%{release} |
9c3cb898 | 21 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
22 | ||
9c3cb898 | 23 | %description |
24 | FAAD 2 is a LC, MAIN and LTP profile, MPEG2 and MPEG-4 AAC decoder, | |
25 | completely written from scratch. | |
26 | ||
0e2dcaed JR |
27 | %description -l pl.UTF-8 |
28 | FAAD 2 to napisany całkowicie od początku dekoder MPEG2 i MPEG-4 | |
29 | obsługujący profile LC, MAIN i LTP. | |
f4330271 | 30 | |
327697e7 JB |
31 | %package libs |
32 | Summary: FAAD 2 libraries | |
059244cb | 33 | Summary(pl.UTF-8): Biblioteki FAAD 2 |
327697e7 | 34 | Group: Libraries |
aff333c1 JB |
35 | %if 0%{?_soname_prov:1} |
36 | Provides: %{_soname_prov libfaad.so.0} | |
37 | %endif | |
327697e7 JB |
38 | Conflicts: faad2 < 2.0-3 |
39 | ||
40 | %description libs | |
41 | FAAD 2 is a LC, MAIN and LTP profile, MPEG2 and MPEG-4 AAC decoder, | |
42 | completely written from scratch. This package contains base FAAD 2 | |
43c8175c | 43 | libraries: libfaad and libfaad_drm. |
327697e7 | 44 | |
0e2dcaed JR |
45 | %description libs -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. Ten pakiet zawiera podstawowe | |
43c8175c | 48 | biblioteki FAAD 2: libfaad i libfaad_drm. |
327697e7 | 49 | |
9c3cb898 | 50 | %package devel |
327697e7 | 51 | Summary: Header files for faad2 |
059244cb | 52 | Summary(pl.UTF-8): Pliki nagłówkowe faad2 |
9c3cb898 | 53 | Group: Development/Libraries |
327697e7 | 54 | Requires: %{name}-libs = %{version}-%{release} |
9c3cb898 | 55 | |
56 | %description devel | |
327697e7 | 57 | Header files for faad2. |
9c3cb898 | 58 | |
0e2dcaed JR |
59 | %description devel -l pl.UTF-8 |
60 | Pliki nagłówkowe faad2. | |
f4330271 | 61 | |
9c3cb898 | 62 | %package static |
63 | Summary: Static faad2 library | |
059244cb | 64 | Summary(pl.UTF-8): Statyczna biblioteka faad2 |
9c3cb898 | 65 | Group: Development/Libraries |
327697e7 | 66 | Requires: %{name}-devel = %{version}-%{release} |
9c3cb898 | 67 | |
68 | %description static | |
69 | Static faad2 library. | |
70 | ||
0e2dcaed | 71 | %description static -l pl.UTF-8 |
f4330271 JB |
72 | Statyczna biblioteka faad2. |
73 | ||
9c3cb898 | 74 | %prep |
d7cfa918 | 75 | %setup -q |
52db292f | 76 | %patch0 -p1 |
9c3cb898 | 77 | |
78 | %build | |
43c8175c JB |
79 | %if %{with static_libs} |
80 | %cmake -B build-static \ | |
81 | -DBUILD_SHARED_LIBS=OFF | |
82 | ||
83 | %{__make} -C build-static | |
84 | %endif | |
85 | ||
86 | %cmake -B build | |
87 | ||
88 | %{__make} -C build | |
9c3cb898 | 89 | |
90 | %install | |
91 | rm -rf $RPM_BUILD_ROOT | |
f4330271 | 92 | |
43c8175c JB |
93 | %if %{with static_libs} |
94 | %{__make} -C build-static install \ | |
f4330271 JB |
95 | DESTDIR=$RPM_BUILD_ROOT |
96 | ||
43c8175c JB |
97 | # ensure files from shared build are packaged |
98 | %{__rm} $RPM_BUILD_ROOT%{_bindir}/faad | |
99 | %{__rm} $RPM_BUILD_ROOT%{_pkgconfigdir}/faad2.pc | |
012e2079 | 100 | %endif |
9c3cb898 | 101 | |
43c8175c JB |
102 | %{__make} -C build install \ |
103 | DESTDIR=$RPM_BUILD_ROOT | |
104 | ||
aff333c1 JB |
105 | # for compatibility with apps using dlopen("libfaad.so.0") |
106 | ln -sf $(basename $RPM_BUILD_ROOT%{_libdir}/libfaad.so.2.*.*) $RPM_BUILD_ROOT%{_libdir}/libfaad.so.0 | |
107 | ||
9c3cb898 | 108 | %clean |
109 | rm -rf $RPM_BUILD_ROOT | |
110 | ||
327697e7 JB |
111 | %post libs -p /sbin/ldconfig |
112 | %postun libs -p /sbin/ldconfig | |
9c3cb898 | 113 | |
114 | %files | |
115 | %defattr(644,root,root,755) | |
327697e7 | 116 | %attr(755,root,root) %{_bindir}/faad |
45e28ee0 | 117 | %{_mandir}/man1/faad.1* |
327697e7 JB |
118 | |
119 | %files libs | |
120 | %defattr(644,root,root,755) | |
43c8175c | 121 | %doc AUTHORS ChangeLog README |
e4d59ed1 | 122 | %attr(755,root,root) %{_libdir}/libfaad.so.*.*.* |
aff333c1 JB |
123 | %attr(755,root,root) %ghost %{_libdir}/libfaad.so.2 |
124 | # compat symlink | |
125 | %attr(755,root,root) %{_libdir}/libfaad.so.0 | |
126 | %attr(755,root,root) %{_libdir}/libfaad_drm.so.*.*.* | |
127 | %attr(755,root,root) %ghost %{_libdir}/libfaad_drm.so.2 | |
9c3cb898 | 128 | |
129 | %files devel | |
130 | %defattr(644,root,root,755) | |
327697e7 | 131 | %attr(755,root,root) %{_libdir}/libfaad.so |
aff333c1 | 132 | %attr(755,root,root) %{_libdir}/libfaad_drm.so |
327697e7 | 133 | %{_includedir}/faad.h |
7c7f8a92 | 134 | %{_includedir}/neaacdec.h |
ac4a8719 | 135 | %{_pkgconfigdir}/faad2.pc |
9c3cb898 | 136 | |
68e9ffd2 | 137 | %if %{with static_libs} |
9c3cb898 | 138 | %files static |
139 | %defattr(644,root,root,755) | |
327697e7 | 140 | %{_libdir}/libfaad.a |
aff333c1 | 141 | %{_libdir}/libfaad_drm.a |
68e9ffd2 | 142 | %endif |