2 # TODO: soname for libm4systems(?)
3 # - use system mozilla includes
9 %bcond_without freetype
17 Summary: GPAC - an implementation of the MPEG-4 Systems standard (ISO/IEC 14496-1)
18 Summary(pl): GPAC - implementacja standardu MPEG-4 Systems (ISO/IEC 14496-1)
24 Source0: http://dl.sourceforge.net/gpac/%{name}-%{version}.tar.gz
25 # Source0-md5: a8b4b3206cabda946850240f1e7aea93
26 Source1: http://www.3gpp.org/ftp/Specs/archive/26_series/26.073/26073-530.zip
27 # Source1-md5: 705f6993fbf890e92eb7a331e7c716d1
28 Patch0: %{name}-install.patch
29 Patch1: %{name}-wxWidgets.patch
30 URL: http://gpac.sourceforge.net/
31 BuildRequires: SDL-devel
32 %{?with_faad:BuildRequires: faad2-devel}
33 %{?with_ffmpeg:BuildRequires: ffmpeg-devel}
34 %{?with_freetype:BuildRequires: freetype-devel}
35 %{?with_js:BuildRequires: js-devel}
36 %{?with_jpeg:BuildRequires: libjpeg-devel}
37 %{?with_mad:BuildRequires: libmad-devel}
38 %{?with_png:BuildRequires: libpng-devel}
39 BuildRequires: libxml2-devel
40 BuildRequires: rpmbuild(macros) >= 1.236
41 %{?with_wx:BuildRequires: wxGTK2-devel >= 2.5.4}
42 %{?with_xvid:BuildRequires: xvid-devel}
44 %{?with_faad:Requires: faad2}
45 %{?with_ffmpeg:Requires: ffmpeg}
46 %{?with_freetype:Requires: freetype}
47 %{?with_js:Requires: js}
48 %{?with_jpeg:Requires: libjpeg}
49 %{?with_mad:Requires: libmad}
50 %{?with_png:Requires: libpng}
51 %{?with_xvid:Requires: xvid}
52 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
54 %define _noautoreq libm4systems.so
55 %define _plugindir %{_libdir}/browser-plugins
58 GPAC is an implementation of the MPEG-4 Systems standard (ISO/IEC
59 14496-1) developed from scratch in ANSI C.
61 The main development goal is to provide a clean (a.k.a. readable by as
62 many people as possible), small and flexible alternative to the MPEG-4
63 Systems reference software (known as IM1 and distributed in ISO/IEC
64 14496-5). The MPEG-4 Reference software is indeed a very large piece
65 of software, designed to verify the standard rather than provide a
66 small, production-stable software. GPAC is written in ANSI C for
67 portability reasons (embedded platforms and DSPs) with a simple goal:
68 keep the memory footprint as low as possible. The project will at term
69 provide player(s), systems encoders and publishing tools for content
73 GPAC to implementacja standardu MPEG-4 Systems (ISO/IEC 14496-1)
74 stworzona od zera w ANSI C.
76 G³ównym celem tworzenia jej jest dostarczenie czystej (tzn. czytelnej
77 dla jak najwiêkszej liczby ludzi), ma³ej i elastycznej alternatywy dla
78 wzorcowego oprogramowania MPEG-4 Systems (znanego jako IM1 i
79 rozprowadzanego w ISO/IEC 14496-5). Wzorcowe oprogramowanie MPEG-4
80 jest bardzo du¿± porcj± kodu, zaprojektowan± raczej do zweryfikowania
81 standardu ni¿ dostarczenia ma³ej, stabilnej wersji produkcyjnej. GPAC
82 jest pisany w ANSI C ze wzglêdu na przeno¶no¶æ (platformy wbudowane i
83 DSP) z prostym celem: wymagaæ tak ma³o pamiêci, jak to tylko mo¿liwe.
84 Projekt docelowo dostarczy odtwarzacz(e), kodery systemowe i narzêdzia
85 do publikacji w celu dystrybucji materia³ów.
87 %package -n browser-plugin-%{name}
88 Summary: GPAC browser plugin
89 Summary(pl): Wtyczka GPAC do przegl±derek WWW
91 Requires: %{name} = %{version}-%{release}
92 Requires: browser-plugins(%{_target_cpu})
94 %define browsers mozilla, mozilla-firefox
96 %description -n browser-plugin-%{name}
97 GPAC plugin for Netscape-compatible WWW browsers.
99 Supported browsers: %{browsers}.
101 %description -n browser-plugin-%{name} -l pl
102 Wtyczka GPAC dla przegl±darek WWW zgodnych z Netscape.
104 Obs³ugiwane przegl±darki: %{browsers}.
109 %{?with_wx:%patch1 -p1}
111 mkdir -p Plugins/amr_dec/AMR_NB
112 cd Plugins/amr_dec/AMR_NB
114 unzip -j 26073-530_ANSI_C_source_code.zip
119 # files for w32 and Linux were swapped
120 rm -rf applications/osmozilla/nsIOsmozilla.xpt_linux
121 mv applications/osmozilla/nsIOsmozilla.xpt_w32 applications/osmozilla/nsIOsmozilla.xpt_linux
125 --extra-cflags="-fPIC" \
126 --extra-ldflags="-fPIC" \
128 %{?with_amr:--enable-amr-nb} \
129 %{!?with_faad:--disable-faad} \
130 %{!?with_ffmpeg:--disable-ffmpeg} \
131 %{!?with_freetype:--disable-ft} \
132 %{!?with_jpeg:--disable-jpeg} \
133 %{!?with_js:--disable-js} \
134 %{!?with_mad:--disable-mad} \
135 %{!?with_png:--disable-png} \
136 %{!?with_xvid:--disable-xvid}
139 DESTDIR=$RPM_BUILD_ROOT
142 rm -rf $RPM_BUILD_ROOT
145 bindir=$RPM_BUILD_ROOT%{_bindir} \
146 libdir=$RPM_BUILD_ROOT%{_libdir} \
147 mandir=$RPM_BUILD_ROOT%{_mandir} \
148 plugdir=$RPM_BUILD_ROOT%{_libdir}/gpac \
149 real_plugdir=%{_libdir}/gpac \
150 prefix=$RPM_BUILD_ROOT%{_prefix} \
151 MOZILLA_DIR=$RPM_BUILD_ROOT%{_plugindir}
154 rm -rf $RPM_BUILD_ROOT
156 %post -p /sbin/ldconfig
157 %postun -p /sbin/ldconfig
159 %triggerin -n browser-plugin-%{name} -- mozilla-firefox
160 %nsplugin_install -d %{_libdir}/mozilla-firefox/plugins nposmozilla.so nposmozilla.xpt
162 %triggerun -n browser-plugin-%{name} -- mozilla-firefox
163 %nsplugin_uninstall -d %{_libdir}/mozilla-firefox/plugins nposmozilla.so nposmozilla.xpt
165 %triggerin -n browser-plugin-%{name} -- mozilla
166 %nsplugin_install -d %{_libdir}/mozilla/plugins nposmozilla.so nposmozilla.xpt
167 if [ -d /usr/%{_lib}/mozilla ]; then
169 rm -f /usr/%{_lib}/mozilla/components/{compreg,xpti}.dat
170 if [ -x /usr/bin/regxpcom ]; then
171 MOZILLA_FIVE_HOME=/usr/%{_lib}/mozilla /usr/bin/regxpcom
175 %triggerun -n browser-plugin-%{name} -- mozilla
176 %nsplugin_uninstall -d %{_libdir}/mozilla/plugins nposmozilla.so nposmozilla.xpt
177 if [ -d /usr/%{_lib}/mozilla ]; then
179 rm -f /usr/%{_lib}/mozilla/components/{compreg,xpti}.dat
180 if [ -x /usr/bin/regxpcom ]; then
181 MOZILLA_FIVE_HOME=/usr/%{_lib}/mozilla /usr/bin/regxpcom
186 %defattr(644,root,root,755)
187 %doc AUTHORS BUGS Changelog README TODO
188 %attr(755,root,root) %{_bindir}/*
189 %attr(755,root,root) %{_libdir}/lib*.so
191 %attr(755,root,root) %{_libdir}/gpac/*.so
194 %files -n browser-plugin-%{name}
195 %defattr(644,root,root,755)
196 %attr(755,root,root) %{_plugindir}/nposmozilla.so
197 %{_plugindir}/nposmozilla.xpt