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