%bcond_with ffmpeg_flag %define desktop_vendor atrpms %define _pkgbuilddir %{_builddir}/%{name}_%{version} Summary: Graphical video editing tool Name: avidemux Version: 2.5.6 Release: 30%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://fixounet.free.fr/avidemux/ Source0: http://download.berlios.de/%{name}/%{name}_%{version}.tar.gz Source1: %{name}-qt.desktop Patch0: avidemux-2.5.3-pluginlibs.patch Patch1: avidemux-2.5-pulseaudio-default.patch Patch2: avidemux-2.4-qt4.patch Patch3: avidemux-2.5.3-mpeg2enc.patch Patch4: avidemux-2.5.5-gcc46_tmp_fix.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: cmake BuildRequires: gcc-c++, gcc >= 3.0 BuildRequires: glib-devel, gtk2-devel >= 2.8.0, libxml2-devel BuildRequires: qt4-devel >= 4.3.0 BuildRequires: nasm >= 0.98.32, gettext-devel BuildRequires: desktop-file-utils BuildRequires: libxslt # Audio BuildRequires: libmad-devel, lame-devel, libvorbis-devel, faad2-devel BuildRequires: faac-devel, a52dec-devel, libdca-devel # Video BuildRequires: xvidcore-devel, x264-devel # Miscellaneous BuildRequires: freetype-devel, alsa-lib-devel, SDL-devel, libXv-devel BuildRequires: esound-devel, arts-devel BuildRequires: libpng-devel #BuildRequires: js-devel # for config.guess BuildRequires: /bin/arch BuildRequires: jack-audio-connection-kit-devel, libsamplerate-devel, libdca-devel BuildRequires: opencore-amr-devel, aften-devel, yasm Provides: avidemux2 = %{evr} Obsoletes: avidemux2 <= %{eversion} %description Avidemux is a free video editor designed for simple cutting, filtering and encoding tasks. It supports many file types, including AVI, DVD compatible MPEG files, MP4 and ASF, using a variety of codecs. Tasks can be automated using projects, job queue and powerful scripting capabilities. %prep %setup -q -n %{name}_%{version} # change hardcoded libdir paths %ifarch x86_64 ppc64 sed -i.bak 's/startDir="lib";/startDir="lib64";/' avidemux/ADM_core/src/ADM_fileio.cpp sed -i.bak 's/startDir="lib";/startDir="lib64";/' avidemux/main.cpp %endif %patch0 -p1 -b .pluginlibs %patch1 -p1 -b .pulseaudio %patch2 -p1 -b .qt4 %patch3 -p1 -b .mpeg2enc %patch4 -p1 -b .gcc46_tmp_fix %build qt_prefix=`pkg-config --variable=exec_prefix QtCore` || : if [ "$qt_prefix" = "" ]; then qt_prefix=`ls -d %{_libdir}/qt4* 2>/dev/null | tail -n 1` fi if ! echo ${PATH} | /bin/grep -q $qt_prefix/bin ; then PATH=$qt_prefix/bin:${PATH} fi mkdir build && cd build %{?with_ffmpeg_flag:export CXXFLAGS="-D__STDC_CONSTANT_MACROS %{optflags}"} %cmake -DAVIDEMUX_INSTALL_PREFIX=%{_prefix} \ -DAVIDEMUX_SOURCE_DIR="%{_pkgbuilddir}" \ -DAVIDEMUX_CORECONFIG_DIR="%{_pkgbuilddir}/build/config" \ .. make find %{_pkgbuilddir}/build/avidemux -name '*.so*' | \ xargs ln -sft %{_pkgbuilddir}/build/%{_lib} # build plugins mkdir ../build_plugins && cd ../build_plugins %cmake -DAVIDEMUX_INSTALL_PREFIX="%{_pkgbuilddir}/build/" \ -DAVIDEMUX_SOURCE_DIR="%{_pkgbuilddir}" \ -DAVIDEMUX_CORECONFIG_DIR="%{_pkgbuilddir}/build/config" \ ../plugins make %install rm -rf %{buildroot} qt_prefix=`pkg-config --variable=exec_prefix QtCore` || : if [ "$qt_prefix" = "" ]; then qt_prefix=`ls -d %{_libdir}/qt4* 2>/dev/null | tail -n 1` fi if ! echo ${PATH} | /bin/grep -q $qt_prefix/bin ; then PATH=$qt_prefix/bin:${PATH} fi make -C build install DESTDIR=%{buildroot} make -C build_plugins install DESTDIR=%{buildroot} mkdir -p %{buildroot}%{_datadir}/applications ln -s avidemux2_gtk %{buildroot}%{_bindir}/avidemux2 ln -s avidemux2_qt4 %{buildroot}%{_bindir}/avidemux # Install .desktop shortcuts desktop-file-install --vendor %{desktop_vendor} \ --dir %{buildroot}%{_datadir}/applications \ %{SOURCE1} desktop-file-install --vendor %{desktop_vendor} --delete-original \ --dir %{buildroot}%{_datadir}/applications \ %{name}2.desktop mkdir -p %{buildroot}%{_datadir}/pixmaps install -p avidemux_icon.png %{buildroot}%{_datadir}/pixmaps/avidemux.png # Remove Windows-only executables # Must check this for new Linux-relevant files upon new avidemux releases rm -rf %{buildroot}%{_datadir}/ADM_addons %find_lang %{name} %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %clean rm -rf %{buildroot} %files -f %{name}.lang %defattr(-,root,root,-) %doc AUTHORS COPYING README TODO %{_bindir}/avidemux* %{_datadir}/applications/*%{name}*.desktop %{_datadir}/pixmaps/avidemux.png %{_datadir}/avidemux %{_libdir}/libADM*.so* %{_libdir}/ADM_plugins %{_datadir}/ADM_scripts %changelog * Tue Jan 03 2012 Paulo Roma - 2.5.6-30 - Updated to 2.5.6 - Removed deprecated _fix_lav_audio_encoder.patch and x264_i_to_b_open_gop.patch * Mon Aug 22 2011 Paulo Roma - 2.5.5-29 - Updated to 2.5.5 - Removed deprecated audioDevice.patch, and gtk_menu_dont_crash.patch and X264_WEIGHTP_BLIND.patch * Tue Jan 25 2011 Paulo Roma - 2.5.4-27 - X264_WEIGHTP_BLIND has been replaced for X264_WEIGHTP_SIMPLE. * Fri Dec 31 2010 Paulo Roma - 2.5.4-26 - Applied avidemux-2.5.4_audioDevice.patch QT4 version fails setting audio. - Applied avidemux-2.5.4-gtk_menu_dont_crash.patch If an option is selected in qt4 ui that is not available in gtk, the preference menu will crash * Sun Dec 19 2010 Paulo Roma - 2.5.4-25 - Updated to 2.5.4 - Removed windows ADM_addons. - Removed ffmpeg and asm patches. - Added post and postun sections. * Sat Nov 13 2010 Paulo Roma - 2.5.3-24 - Patched for asm movq. * Tue Jun 02 2010 Paulo Roma - 2.5.3-22 - Update to 2.5.3. - Removed locale and applied mpeg2enc patch. * Tue Jun 02 2010 Paulo Roma - 2.5.2-21 - Update to 2.5.2. - Building plugins. * Tue Nov 17 2009 Axel Thimm - 2.5.1-20 - Update to 2.5.1. * Fri Jul 17 2009 Axel Thimm - 2.5.0-19 - Update to 2.5.0. * Fri Jun 19 2009 Paulo Roma - 2.4.4-18 - Patched avidemux/CMakeLists.txt http://bugs.gentoo.org/show_bug.cgi?id=268618 * Sun Mar 1 2009 Axel Thimm - 2.4.4-17 - Update to 2.4.4. * Mon Dec 01 2008 Paulo Roma - 2.4.3-16 - Applied gentoo patch for libx264: http://bugs.gentoo.org/attachment.cgi?id=167706 * Fri Jul 25 2008 Axel Thimm - 2.4.3-15 - Update to 2.4.3. * Thu Jul 24 2008 Axel Thimm - 2.4.2-14 - Update to 2.4.2. * Mon Jun 09 2008 Paulo Roma - 2.4.1-13 - Patched for building in F9. - Removed %%{?_smp_mflags} from make. - Changed in /usr/share/aclocal/po.m4 and /usr/share/aclocal/intl.m4 AM_PROG_MKDIR_P for AC_PROG_MKDIR_P. Otherwise it does not build. - Removed cmake call after configure. * Mon Feb 18 2008 Axel Thimm - 2.4.1-12 - Update to 2.4.1. * Wed Jan 9 2008 Axel Thimm - 2.4-11 - Update to 2.4 final. * Tue Aug 7 2007 Axel Thimm - 2.4-10_preview2 - Update to 2.4_preview2. * Sun Feb 4 2007 Axel Thimm - 2.3.0-9 - Update to 2.3.0. * Mon Mar 27 2006 Axel Thimm - Update to 2.1.2. * Tue Jul 5 2005 Axel Thimm - Update to 2.0.42. * Mon Dec 27 2004 Axel Thimm - Update to 2.0.34-test2. * Tue Sep 21 2004 Axel Thimm - cosmetic fixes. * Tue Sep 21 2004 Gavin Hurlbut - 2.0.28-2 - Rebuilt for inclusion in atrpms repository * Fri Aug 13 2004 Dag Wieers - 2.0.28-1 - Updated to release 2.0.28. * Fri Jul 23 2004 Dag Wieers - 2.0.26-1 - Updated to release 2.0.26. * Tue May 11 2004 Dag Wieers - 2.0.24-1 - Updated to release 2.0.24. * Sat Feb 28 2004 Dag Wieers - 2.0.22-0 - Updated to release 2.0.22. * Mon Dec 22 2003 Dag Wieers - 2.0.20-0 - Updated to release 2.0.20. * Sun Nov 02 2003 Dag Wieers - 2.0.18-0 - Updated to release 2.0.18. * Sun Sep 27 2003 Dag Wieers - 2.0.16-0 - Updated to release 2.0.16. * Sat Aug 23 2003 Dag Wieers - 2.0.14-1 - Rebuild against xvidcore-0.9.2. * Sun Aug 17 2003 Dag Wieers - 2.0.14-0 - Updated to release 2.0.14. * Sun Aug 03 2003 Dag Wieers - 2.0.12-0 - Updated to release 2.0.12. * Sat Jun 28 2003 Dag Wieers - 2.0.8-0 - Updated to release 2.0.8. * Sun Jun 01 2003 Dag Wieers - 2.0.6-0 - Updated to release 2.0.6. - Updated to release 2.0.4. * Mon Apr 21 2003 Dag Wieers - 0.9-0 - Updated to release 0.9. * Sun Mar 23 2003 Dag Wieers - 0.8.93-0 - Updated to release 0.9rc3. * Sun Mar 09 2003 Dag Wieers - 0.8.92-0 - Updated to release 0.9rc2. * Fri Feb 28 2003 Dag Wieers - 0.8.91-0 - Updated to release 0.9rc1. * Sat Feb 08 2003 Dag Wieers - 0.9pre32 - Initial package. (using DAR)