]> git.pld-linux.org Git - packages/avidemux.git/blobdiff - avidemux.spec
- simplify plugins building (idea from archlinux), no need for -L patch anymore
[packages/avidemux.git] / avidemux.spec
index b102121d08422bbdf7ec3fdda89b533047bcc652..bfddcb484e591e81e480179c45f73544cb779cc2 100644 (file)
@@ -1,16 +1,18 @@
 # 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
@@ -35,8 +37,7 @@ Source2:      %{name}-qt4.desktop
 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/
@@ -44,7 +45,6 @@ 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}
@@ -70,6 +70,7 @@ BuildRequires:        libx264-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}
@@ -114,7 +115,6 @@ find '(' -name '*.js' -o -name '*.cpp' -o -name '*.h' -o -name '*.cmake' -o -nam
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
-%patch4 -p1
 
 echo 'pt_BR' >> po/LINGUAS
 
@@ -126,7 +126,7 @@ sed -i -e's,"lib","%{_lib}",' avidemux/main.cpp avidemux/ADM_core/src/ADM_fileio
 %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} \
@@ -139,14 +139,19 @@ cd build
 %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} \
@@ -154,7 +159,9 @@ cd plugin-build
 %if "%{_lib}" == "lib64"
        -DLIB_SUFFIX=64 \
 %endif
-       ../plugins
+       ..
+
+%{__make}
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -163,7 +170,7 @@ install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir},%{_bindir},%{_mandir}/m
 %{__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*
@@ -206,6 +213,10 @@ rm -rf $RPM_BUILD_ROOT
 %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
This page took 0.303316 seconds and 4 git commands to generate.