]>
Commit | Line | Data |
---|---|---|
4979ec52 | 1 | # |
cee2dd04 | 2 | # Conditional build: |
0f42ec7c | 3 | %bcond_with amr # AMR-NB and AMR-WB (floating-point) support |
13701c20 JB |
4 | %bcond_without faad # AAC decoding support |
5 | %bcond_without ffmpeg # ffmpeg support | |
6 | %bcond_without freetype # freetype support | |
7 | %bcond_without jpeg # JPEG support | |
8 | %bcond_without js # JavaScript support | |
9 | %bcond_without mad # MP3 support | |
10 | %bcond_without png # PNG support | |
11 | %bcond_without xvid # xvid support | |
0f42ec7c | 12 | %bcond_without wx # wxWidgets support |
cee2dd04 | 13 | # |
b2995149 | 14 | Summary: GPAC - an implementation of the MPEG-4 Systems standard (ISO/IEC 14496-1) |
5dbd083d | 15 | Summary(pl.UTF-8): GPAC - implementacja standardu MPEG-4 Systems (ISO/IEC 14496-1) |
5f694ea5 | 16 | Name: gpac |
13701c20 | 17 | Version: 0.4.5 |
24d8f263 | 18 | Release: 7 |
13701c20 JB |
19 | License: LGPL v2+ |
20 | Group: Applications/Multimedia | |
21 | Source0: http://downloads.sourceforge.net/gpac/%{name}-%{version}.tar.gz | |
22 | # Source0-md5: 755e8c438a48ebdb13525dd491f5b0d1 | |
e25a2665 | 23 | Patch0: %{name}-install.patch |
0f42ec7c JB |
24 | Patch1: %{name}-libpng.patch |
25 | Patch2: %{name}-pic.patch | |
26 | Patch3: %{name}-xulrunner.patch | |
27 | Patch4: %{name}-amr.patch | |
ab82664f | 28 | Patch5: %{name}-ffmpeg.patch |
c59004e5 | 29 | Patch6: %{name}-install-is-not-clean.patch |
a8c7bdfb | 30 | Patch7: %{name}-flags.patch |
9cf5dcbc | 31 | Patch8: %{name}-ffmpeg-0.8.patch |
5f694ea5 | 32 | URL: http://gpac.sourceforge.net/ |
f0a57dca | 33 | BuildRequires: SDL-devel |
13701c20 JB |
34 | BuildRequires: a52dec-libs-devel |
35 | BuildRequires: alsa-lib-devel >= 0.9 | |
0f42ec7c JB |
36 | %{?with_amr:BuildRequires: amrnb-devel} |
37 | %{?with_amr:BuildRequires: amrwb-devel} | |
cee2dd04 | 38 | %{?with_faad:BuildRequires: faad2-devel} |
9c5072f3 | 39 | %{?with_ffmpeg:BuildRequires: ffmpeg-devel >= 0.6} |
cee2dd04 | 40 | %{?with_freetype:BuildRequires: freetype-devel} |
13701c20 | 41 | BuildRequires: jack-audio-connection-kit-devel |
cee2dd04 JB |
42 | %{?with_js:BuildRequires: js-devel} |
43 | %{?with_jpeg:BuildRequires: libjpeg-devel} | |
44 | %{?with_mad:BuildRequires: libmad-devel} | |
13701c20 | 45 | BuildRequires: libogg-devel |
cee2dd04 | 46 | %{?with_png:BuildRequires: libpng-devel} |
13701c20 JB |
47 | BuildRequires: libtheora-devel |
48 | BuildRequires: libvorbis-devel | |
6dcdf31e | 49 | BuildRequires: libxml2-devel |
13701c20 JB |
50 | BuildRequires: openjpeg-devel |
51 | BuildRequires: pulseaudio-devel | |
60486834 | 52 | BuildRequires: rpmbuild(macros) >= 1.357 |
0f42ec7c | 53 | BuildRequires: sed >= 4.0 |
b676b63c | 54 | BuildRequires: unzip |
0f42ec7c | 55 | %{?with_wx:BuildRequires: wxGTK2-devel >= 2.6.0} |
37b9f29d | 56 | %{?with_wx:BuildRequires: wxGTK2-unicode-devel >= 2.6.0} |
a8c7bdfb | 57 | BuildRequires: xmlrpc-c-server-devel |
13701c20 JB |
58 | BuildRequires: xorg-lib-libXext-devel |
59 | BuildRequires: xorg-lib-libXv-devel | |
60 | BuildRequires: xulrunner-devel >= 1.9.1 | |
cee2dd04 | 61 | %{?with_xvid:BuildRequires: xvid-devel} |
5f694ea5 | 62 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
63 | ||
64 | %description | |
b2995149 | 65 | GPAC is an implementation of the MPEG-4 Systems standard (ISO/IEC |
66 | 14496-1) developed from scratch in ANSI C. | |
5f694ea5 | 67 | |
b2995149 | 68 | The main development goal is to provide a clean (a.k.a. readable by as |
69 | many people as possible), small and flexible alternative to the MPEG-4 | |
70 | Systems reference software (known as IM1 and distributed in ISO/IEC | |
71 | 14496-5). The MPEG-4 Reference software is indeed a very large piece | |
72 | of software, designed to verify the standard rather than provide a | |
73 | small, production-stable software. GPAC is written in ANSI C for | |
74 | portability reasons (embedded platforms and DSPs) with a simple goal: | |
75 | keep the memory footprint as low as possible. The project will at term | |
76 | provide player(s), systems encoders and publishing tools for content | |
77 | distribution. | |
5f694ea5 | 78 | |
80b9bf8c | 79 | %description -l pl.UTF-8 |
cee2dd04 JB |
80 | GPAC to implementacja standardu MPEG-4 Systems (ISO/IEC 14496-1) |
81 | stworzona od zera w ANSI C. | |
82 | ||
80b9bf8c JR |
83 | Głównym celem tworzenia jej jest dostarczenie czystej (tzn. czytelnej |
84 | dla jak największej liczby ludzi), małej i elastycznej alternatywy dla | |
cee2dd04 JB |
85 | wzorcowego oprogramowania MPEG-4 Systems (znanego jako IM1 i |
86 | rozprowadzanego w ISO/IEC 14496-5). Wzorcowe oprogramowanie MPEG-4 | |
80b9bf8c JR |
87 | jest bardzo dużą porcją kodu, zaprojektowaną raczej do zweryfikowania |
88 | standardu niż dostarczenia małej, stabilnej wersji produkcyjnej. GPAC | |
89 | jest pisany w ANSI C ze względu na przenośność (platformy wbudowane i | |
90 | DSP) z prostym celem: wymagać tak mało pamięci, jak to tylko możliwe. | |
91 | Projekt docelowo dostarczy odtwarzacz(e), kodery systemowe i narzędzia | |
92 | do publikacji w celu dystrybucji materiałów. | |
cee2dd04 | 93 | |
9cf5dcbc JB |
94 | %package devel |
95 | Summary: Header files for GPAC library | |
96 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki GPAC | |
97 | Group: Development/Libraries | |
98 | Requires: %{name} = %{version}-%{release} | |
99 | ||
100 | %description devel | |
101 | Header files for GPAC library. | |
102 | ||
103 | %description devel -l pl.UTF-8 | |
104 | Pliki nagłówkowe biblioteki GPAC. | |
105 | ||
0f42ec7c JB |
106 | %package gui |
107 | Summary: wxWidgets-based GUI for GPAC | |
108 | Summary(pl.UTF-8): Oparty na wxWidgets graficzny interfejs do GPAC | |
109 | Group: X11/Applications/Multimedia | |
110 | Requires: %{name} = %{version}-%{release} | |
111 | ||
112 | %description gui | |
113 | Osmo4 - wxWidgets-based GUI for GPAC. | |
114 | ||
115 | %description gui -l pl.UTF-8 | |
116 | Osmo4 - oparty na wxWidgets graficzny interfejs do GPAC. | |
117 | ||
84d02762 | 118 | %package -n browser-plugin-%{name} |
119 | Summary: GPAC browser plugin | |
5dbd083d | 120 | Summary(pl.UTF-8): Wtyczka GPAC do przegląderek WWW |
84d02762 | 121 | Group: X11/Libraries |
122 | Requires: %{name} = %{version}-%{release} | |
60486834 ER |
123 | Requires: browser-plugins >= 2.0 |
124 | Requires: browser-plugins(%{_target_base_arch}) | |
84d02762 | 125 | |
126 | %description -n browser-plugin-%{name} | |
127 | GPAC plugin for Netscape-compatible WWW browsers. | |
128 | ||
80b9bf8c JR |
129 | %description -n browser-plugin-%{name} -l pl.UTF-8 |
130 | Wtyczka GPAC dla przeglądarek WWW zgodnych z Netscape. | |
84d02762 | 131 | |
5f694ea5 | 132 | %prep |
f0a57dca ER |
133 | %setup -q -n %{name} |
134 | %patch0 -p1 | |
0f42ec7c | 135 | %patch1 -p1 |
267232dd | 136 | %patch2 -p1 |
5eb82e91 | 137 | %patch3 -p1 |
13701c20 | 138 | %patch4 -p1 |
ab82664f | 139 | %patch5 -p1 |
c59004e5 | 140 | %patch6 -p1 |
a8c7bdfb | 141 | %patch7 -p1 |
9cf5dcbc | 142 | %patch8 -p1 |
13701c20 | 143 | |
cee2dd04 | 144 | %if %{with amr} |
0f42ec7c | 145 | sed -i -e 's/amr_\([nw]b\)_ft/amr\1/' modules/amr_float_dec/amr_float_dec.c |
5f694ea5 | 146 | %endif |
0f42ec7c | 147 | sed -i -e 's/wx-config/wx-gtk2-unicode-config/' configure |
e25a2665 | 148 | chmod a+x configure |
5f694ea5 | 149 | |
5f694ea5 | 150 | %build |
13701c20 JB |
151 | cd applications/osmozilla |
152 | xpidl -m header -I /usr/share/idl/xulrunner nsIOsmozilla.idl | |
153 | xpidl -m typelib -I /usr/share/idl/xulrunner nsIOsmozilla.idl | |
154 | cp -f nsIOsmozilla.xpt nsIOsmozilla.xpt_linux | |
155 | cd ../.. | |
cee2dd04 | 156 | %configure \ |
13701c20 JB |
157 | --X11-path=/usr \ |
158 | --cc="%{__cc}" \ | |
159 | --disable-opt \ | |
0f42ec7c JB |
160 | %{!?with_wx:--disable-wx} \ |
161 | %{?with_amr:--enable-amr} \ | |
13701c20 JB |
162 | --enable-joystick \ |
163 | --enable-pic \ | |
164 | --extra-cflags="%{rpmcflags}" \ | |
165 | --extra-ldflags="%{rpmldflags}" \ | |
166 | --mozdir=%{_browserpluginsdir} \ | |
167 | %{!?with_faad:--use-faad=no} \ | |
168 | %{!?with_ffmpeg:--use-ffmpeg=no} \ | |
169 | %{!?with_freetype:--use-ft=no} \ | |
170 | %{!?with_jpeg:--use-jpeg=no} \ | |
171 | %{!?with_js:--use-js=no} \ | |
172 | %{!?with_mad:--use-mad=no} \ | |
173 | %{!?with_png:--use-png=no} \ | |
174 | %{!?with_xvid:--use-xvid=no} \ | |
175 | --xulsdk-path="/usr/include/xulrunner -I/usr/include/nspr" | |
5f694ea5 | 176 | |
35738b12 | 177 | %{__make} -j1 \ |
c59004e5 | 178 | BUILD_INSTALL=yes \ |
9c5072f3 | 179 | CXX="%{__cxx} -fPIC" \ |
13701c20 | 180 | libdir=%{_lib} |
5f694ea5 | 181 | |
182 | %install | |
183 | rm -rf $RPM_BUILD_ROOT | |
184 | ||
185 | %{__make} install \ | |
13701c20 JB |
186 | DESTDIR=$RPM_BUILD_ROOT \ |
187 | libdir=%{_lib} \ | |
60486834 | 188 | MOZILLA_DIR=$RPM_BUILD_ROOT%{_browserpluginsdir} |
5f694ea5 | 189 | |
9cf5dcbc JB |
190 | install -d $RPM_BUILD_ROOT%{_includedir} |
191 | cp -a include/gpac $RPM_BUILD_ROOT%{_includedir}/gpac | |
192 | ||
5f694ea5 | 193 | %clean |
194 | rm -rf $RPM_BUILD_ROOT | |
195 | ||
196 | %post -p /sbin/ldconfig | |
197 | %postun -p /sbin/ldconfig | |
198 | ||
60486834 ER |
199 | %post -n browser-plugin-%{name} |
200 | %update_browser_plugins | |
84d02762 | 201 | |
60486834 ER |
202 | %postun -n browser-plugin-%{name} |
203 | if [ "$1" = 0 ]; then | |
204 | %update_browser_plugins | |
84d02762 | 205 | fi |
206 | ||
5f694ea5 | 207 | %files |
208 | %defattr(644,root,root,755) | |
e51b2790 | 209 | %doc AUTHORS BUGS Changelog README TODO |
13701c20 JB |
210 | %attr(755,root,root) %{_bindir}/MP4Box |
211 | %attr(755,root,root) %{_bindir}/MP4Client | |
212 | %attr(755,root,root) %{_libdir}/libgpac-%{version}.so | |
9cf5dcbc | 213 | %attr(755,root,root) %ghost %{_libdir}/libgpac.so |
4979ec52 | 214 | %dir %{_libdir}/gpac |
13701c20 JB |
215 | %attr(755,root,root) %{_libdir}/gpac/gm_*.so |
216 | %{_datadir}/gpac | |
217 | %{_mandir}/man1/gpac.1* | |
218 | %{_mandir}/man1/mp4box.1* | |
219 | %{_mandir}/man1/mp4client.1* | |
84d02762 | 220 | |
9cf5dcbc JB |
221 | %files devel |
222 | %defattr(644,root,root,755) | |
223 | %{_includedir}/gpac | |
224 | ||
563c3d16 | 225 | %if %{with wx} |
0f42ec7c JB |
226 | %files gui |
227 | %defattr(644,root,root,755) | |
228 | %attr(755,root,root) %{_bindir}/Osmo4 | |
563c3d16 | 229 | %endif |
0f42ec7c | 230 | |
84d02762 | 231 | %files -n browser-plugin-%{name} |
232 | %defattr(644,root,root,755) | |
60486834 ER |
233 | %attr(755,root,root) %{_browserpluginsdir}/nposmozilla.so |
234 | %{_browserpluginsdir}/nposmozilla.xpt |