# TODO:
-# - create aften.spec (aften.sf.net) and use it
+# - create aften.spec (aften.sf.net) and use it -D USE_AFTEN=1
+# - amr bcond - -D USE_AMR_NB=1
# - the bconds don't work with cmake, all gets enabled if BR found -- needs some cmake magican to fixup the bconds
# - use external seamonkey (cmake fix needed): Checking for SpiderMonkey -- Skipping check and using bundled version.
# - uses patched ffmpeg
# - Could not find Gettext -- libintl not required for gettext support
# - don't force -O3 optimization
# - look for lrelease from qt4-linguist, not qt-linguist
+# - fix libx264 detection: Could not find x264_encoder_open in /usr/lib64/libx264.so
#
# Conditional build:
%bcond_without esd # disable EsounD sound support
%bcond_without arts # without arts audio output
-%bcond_with amr # enable 3GPP Adaptive Multi Rate (AMR) speech codec support
+%bcond_without amr # enable Adaptive Multi Rate (AMR) speech codec support
%bcond_without qt4 # build qt4 interface
%bcond_without gtk # build gtk interface
%bcond_with ssse3 # use SSSE3 instructions
Patch0: gcc44.patch
Patch1: types.patch
Patch2: qtlocale.patch
-Patch3: link-libs.patch
-Patch4: libdir.patch
+Patch3: libdir.patch
#Patch1: %{name}-dts_internal.patch
#Patch2: %{name}-sparc64.patch
URL: http://fixounet.free.fr/avidemux/
BuildRequires: SDL-devel
BuildRequires: a52dec-libs-devel
BuildRequires: alsa-lib-devel >= 1.0
-%{?with_amr:BuildRequires: amrnb-devel}
%{?with_arts:BuildRequires: artsc-devel}
BuildRequires: cmake >= 2.6.2
%{?with_esd:BuildRequires: esound-devel}
BuildRequires: libxml2-devel
%{?with_qt4:BuildRequires: libxslt-progs}
BuildRequires: nasm >= 0.98.32
+%{?with_amr:BuildRequires: opencore-amr-devel}
BuildRequires: pkgconfig
BuildRequires: pulseaudio-devel
%{?with_qt4:BuildRequires: qt-linguist}
%patch1 -p1
%patch2 -p1
%patch3 -p1
-%patch4 -p1
echo 'pt_BR' >> po/LINGUAS
%build
TOP=$PWD
# main
-install -d build plugin-build
+install -d build/lib plugins/build
cd build
%cmake \
-DCMAKE_BUILD_TYPE=%{?debug:Debug}%{!?debug:Release} \
%endif
..
%{__make}
-cd ..
+
+# plugin build expects libraries to be already installed; we fake a prefix
+# in build/ by symlinking all libraries to build/lib/
+cd lib
+find ../avidemux -name '*.so*' | xargs ln -sft .
+cd ../..
# plugins
-cd plugin-build
+cd plugins/build
%cmake \
-DCMAKE_BUILD_TYPE=%{?debug:Debug}%{!?debug:Release} \
-DCMAKE_INSTALL_PREFIX=%{_prefix} \
- -DAVIDEMUX_INSTALL_PREFIX=%{_prefix} \
+ -DAVIDEMUX_INSTALL_PREFIX=$TOP/build \
-DAVIDEMUX_SOURCE_DIR=$TOP/ \
-DAVIDEMUX_CORECONFIG_DIR=$TOP/build/config \
%{!?with_gtk:-DNO_GTK=1 -DADM_UI_GTK=0} \
%if "%{_lib}" == "lib64"
-DLIB_SUFFIX=64 \
%endif
- ../plugins
+ ..
+
+%{__make}
%install
rm -rf $RPM_BUILD_ROOT
%{__make} -C build install \
DESTDIR=$RPM_BUILD_ROOT
-%{__make} -C plugin-build install \
+%{__make} -C plugins/build install \
DESTDIR=$RPM_BUILD_ROOT
chmod +x $RPM_BUILD_ROOT%{_libdir}/lib*.so*
%attr(755,root,root) %{_libdir}/ADM_plugins/audioDecoder/libADM_ad_Mad.so
%attr(755,root,root) %{_libdir}/ADM_plugins/audioDecoder/libADM_ad_a52.so
%attr(755,root,root) %{_libdir}/ADM_plugins/audioDecoder/libADM_ad_faad.so
+%if %{with amr}
+%attr(755,root,root) %{_libdir}/ADM_plugins/audioDecoder/libADM_ad_opencore_amrnb.so
+%attr(755,root,root) %{_libdir}/ADM_plugins/audioDecoder/libADM_ad_opencore_amrwb.so
+%endif
%attr(755,root,root) %{_libdir}/ADM_plugins/audioDevices/libADM_av_alsa.so
%attr(755,root,root) %{_libdir}/ADM_plugins/audioDevices/libADM_av_arts.so