%define dvd_slideshow dvd-slideshow_0.7.1 %define _prefix /usr # determine what platform we are building on %define fedora 0 %define suse 0 %define mdk 0 %define build_templates 0 %{?build_templ:%define build_templates 1} %if %{_vendor} == redhat %define fedora 1 %define _dist %(cat /etc/redhat-release) %endif %if %{_vendor} == suse %define suse 1 %define _dist %(grep -i SuSE /etc/SuSE-release) %endif %if %{_vendor} == Mandriva %define mdk 1 %define _dist %(grep Mand /etc/mandrake-release) %endif %if ! %{fedora} && ! %{suse} && ! %{mdk} %{error: Unknown platform. Please examine the spec file.} exit 1 %endif # manual define for 64 bit %define amd64 0 %{?build_amd64:%define amd64 1} # media backend selection - default to mplayer %define xine_support 0 %define mplayer_support 0 %{?build_xine:%define xine_support 1} %{?build_mplayer:%define mplayer_support 1} %if ! %{xine_support} && ! %{mplayer_support} %define mplayer_support 1 %endif %if %{xine_support} %define configure_opts --with-xine-support %define media_backend Xine %endif %if %{mplayer_support} %define configure_opts --with-mplayer-support %define media_backend MPlayer %endif Summary: QDVDAuthor, the GUI frontend for dvdauthor and other related tools. Name: qdvdauthor Version: 0.1.5 Release: 0.cvs20061123 Group: Applications/Multimedia License: GPL v2 Distribution: %{_dist} Source0: %{name}-%{version}.tar.gz Source1: %{dvd_slideshow}.tar.gz %if %{build_templates} Source2: %{name}-templates-%{version}.tar.gz %endif #Patch0: %{name}-%{version}.patch Patch1: %{dvd_slideshow}.patch BuildRoot: %{_tmppath}/%{name}-root URL: http://qdvdauthor.sourceforge.net/ Packager: D. Scott Barninger %define qdvdauthor_dir %{name}-%{version} %define qdvdauthor_templates_dir %{name}-templates-%{version} BuildRequires: dvdauthor >= 0.6.10 %if %{fedora} && %{mplayer_support} BuildRequires: mplayer %endif %if %{suse} && %{mplayer_support} BuildRequires: MPlayer %endif %if %{mdk} && %{mplayer_support} BuildRequires: mplayer %endif %if %{fedora} && %{xine_support} BuildRequires: xine-lib-devel %endif %if %{suse} && %{xine_support} BuildRequires: libxine1-devel %endif %if %{mdk} && %{xine_support} BuildRequires: libxine1-devel %endif %if %{fedora} BuildRequires: bzip2-devel %endif %if %{suse} BuildRequires: bzip2 %endif %if %{mdk} BuildRequires: libbzip2-devel %endif %if %{fedora} BuildRequires: qt-devel %endif %if %{suse} BuildRequires: qt3-devel %endif %if %{mdk} BuildRequires: libqt3-devel %endif BuildRequires: glibc-devel %if %{fedora} BuildRequires: freetype-devel %endif %if %{suse} || %{mdk} BuildRequires: freetype2-devel %endif %if %{fedora} || %{mdk} BuildRequires: libjpeg-devel %endif %if %{suse} BuildRequires: libjpeg %endif BuildRequires: libpng-devel %if %{fedora} || %{mdk} BuildRequires: libtiff-devel %endif %if %{suse} BuildRequires: libtiff %endif BuildRequires: libxml2-devel >= 2.6 BuildRequires: zlib-devel Requires: bzip2 Requires: dvdauthor >= 0.6.10 Requires: mjpegtools %if %{fedora} Requires: qt %endif %if %{suse} Requires: qt3 %endif %if %{mdk} Requires: libqt3 %endif Requires: glibc Requires: libgcc %if %{fedora} Requires: freetype %endif %if %{suse} || %{mdk} Requires: freetype2 %endif Requires: libjpeg Requires: libpng Requires: libtiff Requires: libxml2 >= 2.6 Requires: zlib Requires: sox %if %{mdk} && %{xine_support} Requires: libxine1 %endif %if %{suse} && %{xine_support} Requires: libxine1 %endif %if %{fedora} && %{xine_support} Requires: xine-lib %endif %if %{mdk} && %{mplayer_support} Requires: mplayer %endif %if %{suse} && %{mplayer_support} Requires: MPlayer %endif %if %{fedora} && %{mplayer_support} Requires: mplayer %endif %if %{suse} || %{mdk} Requires: netpbm %endif %if %{fedora} Requires: netpbm-progs %endif Conflicts: dvd-slideshow %description QDVDAuthor is a gui frontend for using dvdauthor and dvd-slideshow scripts to easily build DVD menus and assemble the DVD VOB files. This package includes %{dvd_slideshow} in the installation and requires %{media_backend}. %if %{build_templates} %package templates Summary: QDVDAuthor, the GUI frontend for dvdauthor and other related tools. Group: Applications/Multimedia %description templates Optional menu templates for use with qdvdauthor. %endif %prep %setup -b 1 %if %{build_templates} %setup -T -D -b 2 %endif #%patch -p1 # patch dvd-slideshow script cd ../%{dvd_slideshow} patch -p1 dvd-slideshow %PATCH1 cd ../%{qdvdauthor_dir} %build %if %{amd64} && %{suse} # This is the usual path and environment for AMD64 with SuSE 9.0 export LDFLAGS=-L/usr/X11/lib64 export QMAKESPEC=linux-g++-64 %endif ./configure --prefix=%{_prefix} --build-qplayer --build-qslideshow %{configure_opts} # No call to make is necessary because it is done by the configure script %install [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT" mkdir -p $RPM_BUILD_ROOT%{_prefix}/bin mkdir -p $RPM_BUILD_ROOT%{_prefix}/man/man1 mkdir -p $RPM_BUILD_ROOT%{_prefix}/share/pixmaps mkdir -p $RPM_BUILD_ROOT%{_prefix}/share/applications mkdir -p $RPM_BUILD_ROOT%{_prefix}/share/qdvdauthor/i18n mkdir -p $RPM_BUILD_ROOT%{_prefix}/share/qdvdauthor/html/en install -m 0755 $RPM_BUILD_DIR/%{qdvdauthor_dir}/bin/qdvdauthor \ $RPM_BUILD_ROOT%{_prefix}/bin install -m 0755 $RPM_BUILD_DIR/%{qdvdauthor_dir}/bin/qslideshow \ $RPM_BUILD_ROOT%{_prefix}/bin install -m 0755 $RPM_BUILD_DIR/%{qdvdauthor_dir}/bin/qplayer \ $RPM_BUILD_ROOT%{_prefix}/bin install -m 0755 $RPM_BUILD_DIR/%{dvd_slideshow}/dvd-slideshow \ $RPM_BUILD_ROOT%{_prefix}/bin install -m 0755 $RPM_BUILD_DIR/%{dvd_slideshow}/dvd-menu \ $RPM_BUILD_ROOT%{_prefix}/bin install -m 0755 $RPM_BUILD_DIR/%{dvd_slideshow}/gallery2slideshow \ $RPM_BUILD_ROOT%{_prefix}/bin install -m 0755 $RPM_BUILD_DIR/%{dvd_slideshow}/jigl2slideshow \ $RPM_BUILD_ROOT%{_prefix}/bin install -m 0755 $RPM_BUILD_DIR/%{dvd_slideshow}/dir2slideshow \ $RPM_BUILD_ROOT%{_prefix}/bin install -m 0644 $RPM_BUILD_DIR/%{dvd_slideshow}/man/dvd-slideshow.1 \ $RPM_BUILD_ROOT%{_prefix}/man/man1 install -m 0644 $RPM_BUILD_DIR/%{dvd_slideshow}/man/dvd-menu.1 \ $RPM_BUILD_ROOT%{_prefix}/man/man1 install -m 0644 $RPM_BUILD_DIR/%{dvd_slideshow}/man/dir2slideshow.1 \ $RPM_BUILD_ROOT%{_prefix}/man/man1 install -m 0644 $RPM_BUILD_DIR/%{dvd_slideshow}/man/gallery2slideshow.1 \ $RPM_BUILD_ROOT%{_prefix}/man/man1 install -m 0644 $RPM_BUILD_DIR/%{dvd_slideshow}/man/jigl2slideshow.1 \ $RPM_BUILD_ROOT%{_prefix}/man/man1 install -m 0644 $RPM_BUILD_DIR/%{qdvdauthor_dir}/qdvdauthor.png \ $RPM_BUILD_ROOT%{_prefix}/share/pixmaps install -m 0644 $RPM_BUILD_DIR/%{qdvdauthor_dir}/qdvdauthor.desktop \ $RPM_BUILD_ROOT%{_prefix}/share/applications install -m 0644 $RPM_BUILD_DIR/%{qdvdauthor_dir}/doc/html/en/*.html \ $RPM_BUILD_ROOT%{_prefix}/share/qdvdauthor/html/en %if %{build_templates} cp -R -p $RPM_BUILD_DIR/%{qdvdauthor_templates_dir}/* \ $RPM_BUILD_ROOT%{_prefix}/share/qdvdauthor/ %endif cp -p $RPM_BUILD_DIR/%{qdvdauthor_dir}/qdvdauthor/i18n/*.qm \ $RPM_BUILD_ROOT%{_prefix}/share/qdvdauthor/i18n/ %clean [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT" %files %defattr(-,root,root) %{_prefix}/bin/qdvdauthor %{_prefix}/bin/qslideshow %{_prefix}/bin/qplayer %{_prefix}/bin/dvd-slideshow %{_prefix}/bin/dvd-menu %{_prefix}/bin/gallery2slideshow %{_prefix}/bin/jigl2slideshow %{_prefix}/bin/dir2slideshow %{_prefix}/man/man1/* %{_prefix}/share/pixmaps/qdvdauthor.png %{_prefix}/share/applications/qdvdauthor.desktop %{_prefix}/share/qdvdauthor/i18n %{_prefix}/share/qdvdauthor/html/en %doc README TODO COPYING CHANGELOG %if %{build_templates} %files templates %defattr(-,root,root) %{_prefix}/share/qdvdauthor/animated %{_prefix}/share/qdvdauthor/static %{_prefix}/share/qdvdauthor/transition %endif %changelog * Thu Nov 23 2006 D. Scott Barninger - add html help files - add build requires for dvdauthor and mplayer as configure now barfs if missing * Sun Oct 08 2006 D. Scott Barninger - 0.1.3 release - add i18n translation files - add build switch for templates package * Sun Aug 27 2006 D. Scott Barninger - 0.1.2 release - add templates package * Sat Jul 08 2006 D. Scott Barninger - 0.1.1 release - change mandrake grep string to cover mandriva * Mon Jun 26 2006 D. Scott Barninger - change Copyright tag to License * Sun Jan 22 2006 D. Scott Barninger - add -i to grep of SuSE-release * Sun Jan 01 2006 D. Scott Barninger - 0.1.0 release - patch dvd-slideshow script * Sun Feb 13 2005 D. Scott Barninger - fix redhat detection * Sun Feb 06 2005 D. Scott Barninger - 0.0.9 release - add command line switch for media backend * Sat Feb 05 2005 D. Scott Barninger - 0.0.9 release - add platform detection - add xine/mplayer build options * Mon Jan 24 2005 D. Scott Barninger - 0.0.9 release - remove manual configuration and go with configure script - add _prefix variable * Sun Nov 07 2004 D. Scott Barninger - 0.0.8 release - remove ImageMagick Build dependancy - add Mandrake build support - updated dvd-slideshow to 0.6.0 - dvd-slideshow now has rpms on sourceforge so add a Conflict - remove rh9 build and replace with fedora (for all RedHat builds) - add qplayer application * Sun May 16 2004 D. Scott Barninger - update requires for 0.0.6 (xine) - add build define for AMD 64 bit support * Sat Apr 03 2004 D. Scott Barninger - now require dvdauthor >= 0.6.10 and libxml2 >= 2.6 * Tue Mar 09 2004 D. Scott Barninger - updated dvd-slideshow to 0.5.4 - add dir2slideshow script & man page - add gallery2slideshow man page - add jigl2slideshow man page - added sox to prerequisites (required by dvd-slideshow) - removed redundant permissions attributes in files section (also bad form per Michael K. Johnson) - added additional clean of build_root to top of install section - removed clean of build_dir * Tue Feb 17 2004 D. Scott Barninger - changed qt requirement to 3.1 - fixed location of description section; dependencies weren't working * Sun Feb 15 2004 D. Scott Barninger - initial spec file