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