]> git.pld-linux.org Git - SPECS.git/blob - gpac.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / gpac.spec
1 # TODO:
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)
5 #
6 # Conditional build:
7 %bcond_with     amr             # AMR-NB and AMR-WB (floating-point) support
8 %bcond_without  avcap           # AVCap module
9 %bcond_without  directfb        # DirectFB support
10 %bcond_without  faad            # AAC decoding support
11 %bcond_without  ffmpeg          # ffmpeg support
12 %bcond_without  freenect        # freenect (MS Kinect driver) module
13 %bcond_without  freetype        # freetype support
14 %bcond_without  jpeg            # JPEG support
15 %bcond_with     js              # JavaScript support in Osmo4 and modules
16 %bcond_without  mad             # MP3 support
17 %bcond_without  png             # PNG support
18 %bcond_without  xvid            # xvid support
19 %bcond_without  wx              # wxWidgets support
20 %bcond_with     mozilla         # Mozilla (xulrunner/firefox/iceweasel, NPAPI+XPCOM based) plugin
21 #
22 %ifarch x32
23 %undefine       with_mozilla
24 %endif
25 #
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.8.0
30 Release:        3
31 License:        LGPL v2+
32 Group:          Applications/Multimedia
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
36 Patch0:         %{name}-install.patch
37 Patch1:         %{name}-cxx.patch
38
39 Patch3:         %{name}-install-is-not-clean.patch
40 Patch4:         %{name}-flags.patch
41 Patch5:         wxWidgets3.patch
42
43 Patch7:         %{name}-apps.patch
44 Patch8:         ffmpeg3.patch
45 Patch11:        dont-err-build-on-uknown-system.patch
46 URL:            http://www.gpac.io/
47 %{?with_directfb:BuildRequires: DirectFB-devel}
48 BuildRequires:  OpenGL-GLU-devel
49 BuildRequires:  SDL-devel
50 BuildRequires:  a52dec-libs-devel
51 %{?with_avcap:BuildRequires:    avcap-devel}
52 BuildRequires:  alsa-lib-devel >= 0.9
53 %{?with_amr:BuildRequires:      amrnb-devel}
54 %{?with_amr:BuildRequires:      amrwb-devel}
55 %{?with_faad:BuildRequires:     faad2-devel}
56 %{?with_ffmpeg:BuildRequires:   ffmpeg-devel >= 0.6}
57 %{?with_freetype:BuildRequires: freetype-devel}
58 %{?with_wx:BuildRequires:       gtk+2-devel >= 2:2.20.1}
59 BuildRequires:  jack-audio-connection-kit-devel
60 %{?with_js:BuildRequires:       js-devel < 2:1.8.5}
61 %{?with_freenect:BuildRequires: libfreenect-devel}
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 >= 1.5
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_mozilla:BuildRequires:  xulrunner-devel >= 2:9.0.0}
81 %{?with_xvid:BuildRequires:     xvid-devel}
82 BuildRequires:  xz-devel
83 BuildRequires:  zlib-devel
84 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
85
86 %description
87 GPAC is an implementation of the MPEG-4 Systems standard (ISO/IEC
88 14496-1) developed from scratch in ANSI C.
89
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.
100
101 %description -l pl.UTF-8
102 GPAC to implementacja standardu MPEG-4 Systems (ISO/IEC 14496-1)
103 stworzona od zera w ANSI C.
104
105 Głównym celem tworzenia jej jest dostarczenie czystej (tzn. czytelnej
106 dla jak największej liczby ludzi), małej i elastycznej alternatywy dla
107 wzorcowego oprogramowania MPEG-4 Systems (znanego jako IM1 i
108 rozprowadzanego w ISO/IEC 14496-5). Wzorcowe oprogramowanie MPEG-4
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.
115
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
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
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
152 %package -n browser-plugin-%{name}
153 Summary:        GPAC browser plugin
154 Summary(pl.UTF-8):      Wtyczka GPAC do przegląderek WWW
155 Group:          X11/Libraries
156 Requires:       %{name} = %{version}-%{release}
157 Requires:       browser-plugins >= 2.0
158 Requires:       browser-plugins(%{_target_base_arch})
159
160 %description -n browser-plugin-%{name}
161 GPAC plugin for Netscape-compatible WWW browsers.
162
163 %description -n browser-plugin-%{name} -l pl.UTF-8
164 Wtyczka GPAC dla przeglądarek WWW zgodnych z Netscape.
165
166 %prep
167 %setup -q
168 %patch0 -p1
169 %patch1 -p1
170
171 %patch3 -p1
172 %patch4 -p1
173 %patch5 -p1
174
175 %patch7 -p1
176 %patch8 -p1
177 %patch11 -p1
178
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
183 chmod a+x configure
184
185 %build
186 # not autoconf configure
187 ./configure \
188         --verbose \
189         --prefix=%{_prefix} \
190         --libdir=%{_lib} \
191         --mandir=%{_mandir} \
192         --X11-path=/usr \
193         --cc="%{__cc}" \
194         --cxx="%{__cxx}" \
195         --disable-opt \
196         %{!?with_wx:--disable-wx} \
197         %{?with_amr:--enable-amr} \
198         --enable-pic \
199         --extra-cflags="%{rpmcflags} -I/usr/include/openjpeg-1.5" \
200         --extra-ldflags="%{rpmldflags}" \
201         %{?with_mozilla:--mozdir=%{_browserpluginsdir}} \
202         %{?with_mozilla:--xulsdk-path="/usr/include/xulrunner -I/usr/include/nspr"} \
203         %{!?with_faad:--use-faad=no} \
204         %{!?with_ffmpeg:--use-ffmpeg=no} \
205         %{!?with_freenect:--use-freenect=no} \
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} \
212         --enable-joystick
213
214 %{!?with_directfb: sed -i 's/CONFIG_DIRECTFB.*/CONFIG_DIRECTFB=no/' config.mak}
215
216 %{__make} -j1
217
218 %install
219 rm -rf $RPM_BUILD_ROOT
220 install -d $RPM_BUILD_ROOT%{_pkgconfigdir}
221
222 %{__make} -j1 install install-lib \
223         DESTDIR=$RPM_BUILD_ROOT
224
225 %{__make} -j1 -C applications install \
226         DESTDIR=$RPM_BUILD_ROOT \
227         MOZILLA_DIR=$RPM_BUILD_ROOT%{_browserpluginsdir}
228
229 # needless
230 %{__rm} -r $RPM_BUILD_ROOT%{_includedir}/{win32,wince}
231
232 %clean
233 rm -rf $RPM_BUILD_ROOT
234
235 %post   -p /sbin/ldconfig
236 %postun -p /sbin/ldconfig
237
238 %post -n browser-plugin-%{name}
239 %update_browser_plugins
240
241 %postun -n browser-plugin-%{name}
242 if [ "$1" = 0 ]; then
243         %update_browser_plugins
244 fi
245
246 %files
247 %defattr(644,root,root,755)
248 %doc AUTHORS BUGS Changelog README.md TODO
249 %attr(755,root,root) %{_bindir}/MP42TS
250 %attr(755,root,root) %{_bindir}/MP4Box
251 %attr(755,root,root) %{_bindir}/MP4Client
252 %attr(755,root,root) %{_libdir}/libgpac.so.*.*.*
253 %attr(755,root,root) %ghost %{_libdir}/libgpac.so.8
254 %dir %{_libdir}/gpac
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*
260
261 %files devel
262 %defattr(644,root,root,755)
263 %attr(755,root,root) %{_libdir}/libgpac.so
264 %{_includedir}/gpac
265 %{_pkgconfigdir}/gpac.pc
266
267 %files static
268 %defattr(644,root,root,755)
269 %{_libdir}/libgpac_static.a
270
271 %if %{with wx}
272 %files gui
273 %defattr(644,root,root,755)
274 %attr(755,root,root) %{_bindir}/DashCast
275 %attr(755,root,root) %{_bindir}/Osmo4
276 %endif
277
278 %if %{with mozilla}
279 %files -n browser-plugin-%{name}
280 %defattr(644,root,root,755)
281 %attr(755,root,root) %{_browserpluginsdir}/nposmozilla.so
282 %{_browserpluginsdir}/nposmozilla.xpt
283 %endif
This page took 0.600172 seconds and 3 git commands to generate.