]> git.pld-linux.org Git - packages/faad2.git/blob - faad2.spec
4a1054f0af75e79a26031c758b0d4014a12e574f
[packages/faad2.git] / faad2.spec
1 #
2 # Conditional build:
3 %bcond_without  static_libs     # static libraries
4
5 Summary:        Freeware Advanced Audio Decoder 2
6 Summary(pl.UTF-8):      Darmowy zaawansowany dekoder audio
7 Name:           faad2
8 Version:        2.11.1
9 Release:        1
10 License:        GPL v2+
11 Group:          Applications/Sound
12 #Source0:       http://downloads.sourceforge.net/faac/%{name}-%{version}.tar.gz
13 #Source0Download: https://github.com/knik0/faad2/releases
14 Source0:        https://github.com/knik0/faad2/archive/%{version}/%{name}-%{version}.tar.gz
15 # Source0-md5:  f85b2514c4fb2f87d22a3bc879d83277
16 Patch0:         %{name}-backward_compat.patch
17 URL:            https://github.com/knik0/faad2
18 BuildRequires:  cmake >= 3.15
19 BuildRequires:  rpmbuild(macros) >= 1.721
20 Requires:       %{name}-libs = %{version}-%{release}
21 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22
23 %description
24 FAAD 2 is a LC, MAIN and LTP profile, MPEG2 and MPEG-4 AAC decoder,
25 completely written from scratch.
26
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.
30
31 %package libs
32 Summary:        FAAD 2 libraries
33 Summary(pl.UTF-8):      Biblioteki FAAD 2
34 Group:          Libraries
35 %if 0%{?_soname_prov:1}
36 Provides:       %{_soname_prov libfaad.so.0}
37 %endif
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
43 libraries: libfaad and libfaad_drm.
44
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
48 biblioteki FAAD 2: libfaad i libfaad_drm.
49
50 %package devel
51 Summary:        Header files for faad2
52 Summary(pl.UTF-8):      Pliki nagłówkowe faad2
53 Group:          Development/Libraries
54 Requires:       %{name}-libs = %{version}-%{release}
55
56 %description devel
57 Header files for faad2.
58
59 %description devel -l pl.UTF-8
60 Pliki nagłówkowe faad2.
61
62 %package static
63 Summary:        Static faad2 library
64 Summary(pl.UTF-8):      Statyczna biblioteka faad2
65 Group:          Development/Libraries
66 Requires:       %{name}-devel = %{version}-%{release}
67
68 %description static
69 Static faad2 library.
70
71 %description static -l pl.UTF-8
72 Statyczna biblioteka faad2.
73
74 %prep
75 %setup -q
76 %patch0 -p1
77
78 %build
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
89
90 %install
91 rm -rf $RPM_BUILD_ROOT
92
93 %if %{with static_libs}
94 %{__make} -C build-static install \
95         DESTDIR=$RPM_BUILD_ROOT
96
97 # ensure files from shared build are packaged
98 %{__rm} $RPM_BUILD_ROOT%{_bindir}/faad
99 %{__rm} $RPM_BUILD_ROOT%{_pkgconfigdir}/faad2.pc
100 %endif
101
102 %{__make} -C build install \
103         DESTDIR=$RPM_BUILD_ROOT
104
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
108 %clean
109 rm -rf $RPM_BUILD_ROOT
110
111 %post   libs -p /sbin/ldconfig
112 %postun libs -p /sbin/ldconfig
113
114 %files
115 %defattr(644,root,root,755)
116 %attr(755,root,root) %{_bindir}/faad
117 %{_mandir}/man1/faad.1*
118
119 %files libs
120 %defattr(644,root,root,755)
121 %doc AUTHORS ChangeLog README
122 %attr(755,root,root) %{_libdir}/libfaad.so.*.*.*
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
128
129 %files devel
130 %defattr(644,root,root,755)
131 %attr(755,root,root) %{_libdir}/libfaad.so
132 %attr(755,root,root) %{_libdir}/libfaad_drm.so
133 %{_includedir}/faad.h
134 %{_includedir}/neaacdec.h
135 %{_pkgconfigdir}/faad2.pc
136
137 %if %{with static_libs}
138 %files static
139 %defattr(644,root,root,755)
140 %{_libdir}/libfaad.a
141 %{_libdir}/libfaad_drm.a
142 %endif
This page took 0.116459 seconds and 3 git commands to generate.