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