]> git.pld-linux.org Git - packages/gpac.git/blobdiff - gpac.spec
- lets try to fix amd64
[packages/gpac.git] / gpac.spec
index 80c933a39445ac063afa8e798dc8651c541389dd..203dd736cbec5cf53d75208cead70b45ee4058d8 100644 (file)
--- a/gpac.spec
+++ b/gpac.spec
@@ -1,4 +1,7 @@
 #
+# TODO: soname for libm4systems(?)
+# - use system mozilla includes
+#
 # Conditional build:
 %bcond_with    amr
 %bcond_without faad
 %bcond_without mad
 %bcond_without png
 %bcond_without xvid
+%bcond_with    wx
 #
 Summary:       GPAC - an implementation of the MPEG-4 Systems standard (ISO/IEC 14496-1)
 Summary(pl):   GPAC - implementacja standardu MPEG-4 Systems (ISO/IEC 14496-1)
 Name:          gpac
-Version:       0.2.1
+Version:       0.4.0
 Release:       1
-License:       GPL
+License:       LGPL
 Group:         Applications
 Source0:       http://dl.sourceforge.net/gpac/%{name}-%{version}.tar.gz
-# Source0-md5: 3a3e193e805ab177f44514ca3289b461
+# Source0-md5: a8b4b3206cabda946850240f1e7aea93
 Source1:       http://www.3gpp.org/ftp/Specs/archive/26_series/26.073/26073-530.zip
 # Source1-md5: 705f6993fbf890e92eb7a331e7c716d1
+Patch0:                %{name}-install.patch
+Patch1:                %{name}-wxWidgets.patch
+Patch2:                %{name}-amd64.patch
 URL:           http://gpac.sourceforge.net/
-BuildRequires:         SDL-devel
-#BuildRequires:        wxWidgets-devel
+BuildRequires: SDL-devel
 %{?with_faad:BuildRequires:    faad2-devel}
 %{?with_ffmpeg:BuildRequires:  ffmpeg-devel}
 %{?with_freetype:BuildRequires:        freetype-devel}
@@ -31,19 +37,24 @@ BuildRequires:      SDL-devel
 %{?with_jpeg:BuildRequires:    libjpeg-devel}
 %{?with_mad:BuildRequires:     libmad-devel}
 %{?with_png:BuildRequires:     libpng-devel}
+BuildRequires: libxml2-devel
+BuildRequires: rpmbuild(macros) >= 1.236
+%{?with_wx:BuildRequires:      wxGTK2-devel >= 2.5.4}
 %{?with_xvid:BuildRequires:    xvid-devel}
 Requires:      SDL
-#Requires:     wxWidgets
 %{?with_faad:Requires: faad2}
 %{?with_ffmpeg:Requires:       ffmpeg}
 %{?with_freetype:Requires:     freetype}
 %{?with_js:Requires:   js}
-%{?with_jpeg:Requires: libjpeg-6b}
-%{?with_png:Requires:  libpng}
+%{?with_jpeg:Requires: libjpeg}
 %{?with_mad:Requires:  libmad}
+%{?with_png:Requires:  libpng}
 %{?with_xvid:Requires: xvid}
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
+%define         _noautoreq   libm4systems.so
+%define         _plugindir      %{_libdir}/browser-plugins
+
 %description
 GPAC is an implementation of the MPEG-4 Systems standard (ISO/IEC
 14496-1) developed from scratch in ANSI C.
@@ -59,11 +70,6 @@ keep the memory footprint as low as possible. The project will at term
 provide player(s), systems encoders and publishing tools for content
 distribution.
 
-The current GPAC release (0.2.1) is far from being complete but
-already covers a very large part of the standard, and can probably be
-seen as the most advanced and robust 2D MPEG-4 Player available
-worldwide (its 3D side is not to be neglected though).
-
 %description -l pl
 GPAC to implementacja standardu MPEG-4 Systems (ISO/IEC 14496-1)
 stworzona od zera w ANSI C.
@@ -79,34 +85,57 @@ DSP) z prostym celem: wymaga
 Projekt docelowo dostarczy odtwarzacz(e), kodery systemowe i narzêdzia
 do publikacji w celu dystrybucji materia³ów.
 
-Aktualne wydanie GPAC (0.2.1) jest dalekie od ukoñczenia, ale ju¿
-pokrywa bardzo du¿± czê¶æ standardu i prawdopodobnie mo¿na je
-traktowaæ jako najbardziej zaawansowany i bogaty dwuwymiarowy
-odtwarzacz MPEG-4 (aspekt trójwymiarowy jednak nie ma pozostaæ
-zlekcewa¿ony).
+%package -n browser-plugin-%{name}
+Summary:       GPAC browser plugin
+Summary(pl):   Wtyczka GPAC do przegl±derek WWW
+Group:         X11/Libraries
+Requires:      %{name} = %{version}-%{release}
+Requires:      browser-plugins(%{_target_cpu})
+
+%define browsers mozilla, mozilla-firefox
+
+%description -n browser-plugin-%{name}
+GPAC plugin for Netscape-compatible WWW browsers.
+
+Supported browsers: %{browsers}.
+
+%description -n browser-plugin-%{name} -l pl
+Wtyczka GPAC dla przegl±darek WWW zgodnych z Netscape.
+
+Obs³ugiwane przegl±darki: %{browsers}.
 
 %prep
-%setup -q -n gpac
+%setup -q -n %{name}
+%patch0 -p1
+%{?with_wx:%patch1 -p1}
+%patch2 -p1
 %if %{with amr}
 mkdir -p Plugins/amr_dec/AMR_NB
 cd Plugins/amr_dec/AMR_NB
-# XXX: (conditional?) SourceN?
-unzip -j %{_sourcedir}/26073-530.zip
+unzip -j %{SOURCE1}
 unzip -j 26073-530_ANSI_C_source_code.zip
+cd ../../..
 %endif
+chmod a+x configure
+
+# files for w32 and Linux were swapped
+rm -rf applications/osmozilla/nsIOsmozilla.xpt_linux
+mv applications/osmozilla/nsIOsmozilla.xpt_w32 applications/osmozilla/nsIOsmozilla.xpt_linux
 
 %build
 %configure \
+       --extra-cflags="-fPIC" \
+       --extra-ldflags="-fPIC" \
        --enable-oss-audio \
-       %{?with_amr: --enable-amr-nb} \
-       %{!?with_faad: --disable-faad} \
-       %{!?with_ffmpeg: --disable-ffmpeg} \
-       %{!?with_freetype: --disable-ft} \
-       %{!?with_jpeg: --disable-jpeg} \
-       %{!?with_js: --disable-js} \
-       %{!?with_mad: --disable-mad} \
-       %{!?with_png: --disable-png} \
-       %{!?with_xvid: --disable-xvid}
+       %{?with_amr:--enable-amr-nb} \
+       %{!?with_faad:--disable-faad} \
+       %{!?with_ffmpeg:--disable-ffmpeg} \
+       %{!?with_freetype:--disable-ft} \
+       %{!?with_jpeg:--disable-jpeg} \
+       %{!?with_js:--disable-js} \
+       %{!?with_mad:--disable-mad} \
+       %{!?with_png:--disable-png} \
+       %{!?with_xvid:--disable-xvid}
 
 %{__make} \
        DESTDIR=$RPM_BUILD_ROOT
@@ -117,7 +146,11 @@ rm -rf $RPM_BUILD_ROOT
 %{__make} install \
        bindir=$RPM_BUILD_ROOT%{_bindir} \
        libdir=$RPM_BUILD_ROOT%{_libdir} \
-       mandir=$RPM_BUILD_ROOT%{_mandir}
+       mandir=$RPM_BUILD_ROOT%{_mandir} \
+       plugdir=$RPM_BUILD_ROOT%{_libdir}/gpac \
+       real_plugdir=%{_libdir}/gpac \
+       prefix=$RPM_BUILD_ROOT%{_prefix} \
+       MOZILLA_DIR=$RPM_BUILD_ROOT%{_plugindir}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -125,9 +158,42 @@ rm -rf $RPM_BUILD_ROOT
 %post  -p /sbin/ldconfig
 %postun -p /sbin/ldconfig
 
+%triggerin -n browser-plugin-%{name} -- mozilla-firefox
+%nsplugin_install -d %{_libdir}/mozilla-firefox/plugins nposmozilla.so nposmozilla.xpt
+
+%triggerun -n browser-plugin-%{name} -- mozilla-firefox
+%nsplugin_uninstall -d %{_libdir}/mozilla-firefox/plugins nposmozilla.so nposmozilla.xpt
+
+%triggerin -n browser-plugin-%{name} -- mozilla
+%nsplugin_install -d %{_libdir}/mozilla/plugins nposmozilla.so nposmozilla.xpt
+if [ -d /usr/%{_lib}/mozilla ]; then
+       umask 022
+       rm -f /usr/%{_lib}/mozilla/components/{compreg,xpti}.dat
+       if [ -x /usr/bin/regxpcom ]; then
+               MOZILLA_FIVE_HOME=/usr/%{_lib}/mozilla /usr/bin/regxpcom
+       fi
+fi
+
+%triggerun -n browser-plugin-%{name} -- mozilla
+%nsplugin_uninstall -d %{_libdir}/mozilla/plugins nposmozilla.so nposmozilla.xpt
+if [ -d /usr/%{_lib}/mozilla ]; then
+       umask 022
+       rm -f /usr/%{_lib}/mozilla/components/{compreg,xpti}.dat
+       if [ -x /usr/bin/regxpcom ]; then
+               MOZILLA_FIVE_HOME=/usr/%{_lib}/mozilla /usr/bin/regxpcom
+       fi
+fi
+
 %files
 %defattr(644,root,root,755)
-%doc AUTHORS BUGS Changelog COPYING README TODO
+%doc AUTHORS BUGS Changelog README TODO
 %attr(755,root,root) %{_bindir}/*
-%attr(755,root,root) %{_libdir}/*
+%attr(755,root,root) %{_libdir}/lib*.so
+%dir %{_libdir}/gpac
+%attr(755,root,root) %{_libdir}/gpac/*.so
 %{_mandir}/man1/*
+
+%files -n browser-plugin-%{name}
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_plugindir}/nposmozilla.so
+%{_plugindir}/nposmozilla.xpt
This page took 0.059503 seconds and 4 git commands to generate.