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