+# TODO:
+# - Platinum UPnP: http://www.plutinosoft.com/platinum
+# - AVCap: http://libavcap.sourceforge.net/
+# - OpenSVCDecoder: http://opensvcdecoder.sourceforge.net/
+# - libfreenect: http://openkinect.org/wiki/Main_Page
#
# Conditional build:
%bcond_with amr # AMR-NB and AMR-WB (floating-point) support
+%bcond_without directfb # DirectFB support
%bcond_without faad # AAC decoding support
%bcond_without ffmpeg # ffmpeg support
%bcond_without freetype # freetype support
%bcond_without jpeg # JPEG support
-%bcond_without js # JavaScript support
+%bcond_with js # JavaScript support
%bcond_without mad # MP3 support
%bcond_without png # PNG support
%bcond_without xvid # xvid support
Summary: GPAC - an implementation of the MPEG-4 Systems standard (ISO/IEC 14496-1)
Summary(pl.UTF-8): GPAC - implementacja standardu MPEG-4 Systems (ISO/IEC 14496-1)
Name: gpac
-Version: 0.4.5
-Release: 1
+Version: 0.5.0
+Release: 13
License: LGPL v2+
Group: Applications/Multimedia
Source0: http://downloads.sourceforge.net/gpac/%{name}-%{version}.tar.gz
-# Source0-md5: 755e8c438a48ebdb13525dd491f5b0d1
+# Source0-md5: 19f7bb7c16913c22bdd453db1e653ca0
Patch0: %{name}-install.patch
-Patch1: %{name}-libpng.patch
-Patch2: %{name}-pic.patch
-Patch3: %{name}-xulrunner.patch
-Patch4: %{name}-amr.patch
-Patch5: %{name}-ffmpeg.patch
-Patch6: %{name}-install-is-not-clean.patch
-Patch7: %{name}-flags.patch
+Patch1: %{name}-xulrunner.patch
+Patch2: %{name}-amr.patch
+Patch3: %{name}-install-is-not-clean.patch
+Patch4: %{name}-flags.patch
+Patch5: %{name}-idl_uuid.patch
+Patch6: %{name}-js.patch
+Patch7: %{name}-apps.patch
+Patch8: %{name}-export.patch
+Patch9: %{name}-ffmpeg2.patch
+Patch10: wxWidgets3.patch
URL: http://gpac.sourceforge.net/
+%{?with_directfb:BuildRequires: DirectFB-devel}
+BuildRequires: OpenGL-GLU-devel
BuildRequires: SDL-devel
BuildRequires: a52dec-libs-devel
BuildRequires: alsa-lib-devel >= 0.9
%{?with_faad:BuildRequires: faad2-devel}
%{?with_ffmpeg:BuildRequires: ffmpeg-devel >= 0.6}
%{?with_freetype:BuildRequires: freetype-devel}
+%{?with_wx:BuildRequires: gtk+2-devel >= 2:2.20.1}
BuildRequires: jack-audio-connection-kit-devel
-%{?with_js:BuildRequires: js-devel}
+%{?with_js:BuildRequires: js-devel < 2:1.8.5}
%{?with_jpeg:BuildRequires: libjpeg-devel}
%{?with_mad:BuildRequires: libmad-devel}
BuildRequires: libogg-devel
BuildRequires: libvorbis-devel
BuildRequires: libxml2-devel
BuildRequires: openjpeg-devel
+BuildRequires: openssl-devel
+BuildRequires: pkgconfig
BuildRequires: pulseaudio-devel
BuildRequires: rpmbuild(macros) >= 1.357
BuildRequires: sed >= 4.0
BuildRequires: unzip
-%{?with_wx:BuildRequires: wxGTK2-devel >= 2.6.0}
+%{?with_wx:BuildRequires: wxGTK2-unicode-devel >= 2.6.0}
BuildRequires: xmlrpc-c-server-devel
BuildRequires: xorg-lib-libXext-devel
BuildRequires: xorg-lib-libXv-devel
-BuildRequires: xulrunner-devel >= 1.9.1
+BuildRequires: xulrunner-devel >= 2:9.0.0
%{?with_xvid:BuildRequires: xvid-devel}
+BuildRequires: zlib-devel
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
Projekt docelowo dostarczy odtwarzacz(e), kodery systemowe i narzędzia
do publikacji w celu dystrybucji materiałów.
+%package devel
+Summary: Header files for GPAC library
+Summary(pl.UTF-8): Pliki nagłówkowe biblioteki GPAC
+Group: Development/Libraries
+Requires: %{name} = %{version}-%{release}
+
+%description devel
+Header files for GPAC library.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki GPAC.
+
+%package static
+Summary: Static GPAC library
+Summary(pl.UTF-8): Statyczna biblioteka GPAC
+Group: Development/Libraries
+Requires: %{name}-devel = %{version}-%{release}
+
+%description static
+Static GPAC library.
+
+%description static -l pl.UTF-8
+Statyczna biblioteka GPAC.
+
%package gui
Summary: wxWidgets-based GUI for GPAC
Summary(pl.UTF-8): Oparty na wxWidgets graficzny interfejs do GPAC
%patch5 -p1
%patch6 -p1
%patch7 -p1
+%patch8 -p1
+%patch9 -p0
+%patch10 -p1
-%if %{with amr}
-sed -i -e 's/amr_\([nw]b\)_ft/amr\1/' modules/amr_float_dec/amr_float_dec.c
-%endif
sed -i -e 's/wx-config/wx-gtk2-unicode-config/' configure
chmod a+x configure
%build
-cd applications/osmozilla
-xpidl -m header -I /usr/share/idl/xulrunner nsIOsmozilla.idl
-xpidl -m typelib -I /usr/share/idl/xulrunner nsIOsmozilla.idl
-cp -f nsIOsmozilla.xpt nsIOsmozilla.xpt_linux
-cd ../..
-%configure \
+# not autoconf configure
+./configure \
+ --prefix=%{_prefix} \
+ --libdir=%{_lib} \
+ --mandir=%{_mandir} \
--X11-path=/usr \
--cc="%{__cc}" \
+ --cpp="%{__cxx}" \
--disable-opt \
%{!?with_wx:--disable-wx} \
%{?with_amr:--enable-amr} \
%{!?with_xvid:--use-xvid=no} \
--xulsdk-path="/usr/include/xulrunner -I/usr/include/nspr"
-%{__make} -j1 \
- BUILD_INSTALL=yes \
- CXX="%{__cxx}" \
- libdir=%{_lib}
+%{!?with_directfb: sed -i 's/CONFIG_DIRECTFB.*/CONFIG_DIRECTFB=no/' config.mak}
+
+%{__make} -j1
%install
rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT%{_pkgconfigdir}
-%{__make} install \
+%{__make} -j1 install install-lib \
+ DESTDIR=$RPM_BUILD_ROOT
+
+%{__make} -j1 -C applications install \
DESTDIR=$RPM_BUILD_ROOT \
- libdir=%{_lib} \
MOZILLA_DIR=$RPM_BUILD_ROOT%{_browserpluginsdir}
%clean
%doc AUTHORS BUGS Changelog README TODO
%attr(755,root,root) %{_bindir}/MP4Box
%attr(755,root,root) %{_bindir}/MP4Client
-%attr(755,root,root) %{_libdir}/libgpac-%{version}.so
-%attr(755,root,root) %{_libdir}/libgpac.so
+%attr(755,root,root) %{_libdir}/libgpac.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libgpac.so.2
%dir %{_libdir}/gpac
%attr(755,root,root) %{_libdir}/gpac/gm_*.so
%{_datadir}/gpac
%{_mandir}/man1/mp4box.1*
%{_mandir}/man1/mp4client.1*
+%files devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libgpac.so
+%{_includedir}/gpac
+%{_pkgconfigdir}/gpac.pc
+
+%files static
+%defattr(644,root,root,755)
+%{_libdir}/libgpac_static.a
+
+%if %{with wx}
%files gui
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/Osmo4
+%endif
%files -n browser-plugin-%{name}
%defattr(644,root,root,755)