File qdvdauthor.spec of Package qdvdauthor
%global debug_package %{nil}
%define tar_version 2.3.1-015
%define tar_version2 2.3.1
%define srcdir /usr
Name: qdvdauthor
Summary: GUI frontend for dvdauthor
#License: GPL v2
License: GPL-2.0
Group: Productivity/Multimedia/Video/Editors and Convertors
URL: https://sourceforge.net/projects/qdvd
Version: 2.3.1
Release: 15.snr.0
Source: https://ffmpeg.org/releases/ffmpeg-0.6.7.tar.bz2
Source1: %{name}-%{tar_version}.tar.gz
Patch0: mathops_fix.patch
#Vendor:
BuildRoot: %{_builddir}/%{name}-ROOT
#BuildRoot: {_tmppath}/{name}-root
#BuildRequires: cmake libkde4-devel libqt4-devel
%if 0%{?suse_version} >= 1500
#BuildRequires: cmake gcc-c++ libxine-devel vlc-devel libQt5Core-devel libQt5Gui-devel libQt5Widgets-devel libQt5Xml-devel libQt5Network-devel libQt5PrintSupport-devel update-desktop-files ffmpeg067-libs ffmpeg067-devel
BuildRequires: cmake gcc-c++ libxine-devel vlc-devel libQt5Core-devel libQt5Gui-devel libQt5Widgets-devel libQt5Xml-devel libQt5Network-devel libQt5PrintSupport-devel update-desktop-files nasm
#Requires: ffmpeg067-libs
%endif
#if {fedora}
%if 0%{?fedora_version} >= 41
#BuildRequires: cmake extra-cmake-modules xine-lib-devel vlc-devel PackageKit-Qt5-devel ffmpeg063-libs ffmpeg063-devel
BuildRequires: cmake extra-cmake-modules xine-lib-devel vlc-devel PackageKit-Qt5-devel libXext-devel libavutil-free libavcodec-free libvpl ocl-icd
#BuildRequires: cmake extra-cmake-modules PackageKit-Qt5-devel libavutil-free libavcodec-free
#Requires: ffmpeg063-libs
%endif
#if 0{?redhat}
%if 0%{?rhel_version} == 700
#BuildRequires: cmake qt-devel perl(Digest::MD5) ffmpeg063-libs ffmpeg063-devel
BuildRequires: cmake qt-devel perl-Digest-MD5 ffmpeg063-libs ffmpeg063-devel
Requires: ffmpeg063-libs
%endif
%if 0%{?centos}
BuildRequires: cmake qt5-qtbase-devel vlc-devel xine-lib-devel ffmpeg063-libs ffmpeg063-devel
Requires: ffmpeg063-libs
%endif
%if 0%{?univention}
BuildRequires: cmake qt5-default qtbase5-devel libvlc-dev libxine2-dev ffmpeg063-libs ffmpeg063-devel
Requires: ffmpeg063-libs
%endif
%if 0%{?mageia}
%ifarch i586
BuildRequires: cmake gcc-c++ libxine1.2-devel libvlc-devel libqt5core-devel libqt5gui-devel libqt5widgets-devel libqt5xml-devel libqt5network-devel libqt5printsupport-devel ffmpeg063-libs ffmpeg063-devel libopenssl-devel libproxy-pacrunner libproxy-webkit libjack-devel libxext-devel
Requires: ffmpeg063-libs
%endif
%ifarch x86_64
BuildRequires: cmake gcc-c++ lib64xine1.2-devel lib64vlc-devel lib64qt5core-devel lib64qt5gui-devel lib64qt5widgets-devel lib64qt5xml-devel lib64qt5network-devel lib64qt5printsupport-devel ffmpeg063-libs ffmpeg063-devel lib64openssl-devel libproxy-pacrunner lib64proxy-webkit lib64jack-devel lib64xext-devel
Requires: ffmpeg063-libs
%endif
%endif
%description
QDVDAuthor is a GUI frontend for dvdauthor written in qt5
%prep
pwd
%setup -T -D -b 1
%setup -qn ffmpeg-0.6.7
#patch0 -p1
%patch -P 0 -p1
#patch -P 0
#patch -d ffmpeg-0.6.7 -p1 -i "${srcdir}/mathops_fix.patch"
#patch -d ffmpeg-0.6.7 -p1 -i "%{_builddir}/mathops_fix.patch"
pwd
cd ..
pwd
#setup -qn %{name}-%{tar_version2}
pwd
#setup -T -D -b 1
pwd
%if 0%{?fedora_version} >= 28
cd qdvdauthor-2.3.1
pwd
#cat CMakeLists.txt | sed -e 's|define XINE_SUPPORT 1|define XINE_SUPPORT 0|g' > CMakeLists_new.txt
#cat CMakeLists_new.txt | sed -e 's|define VLC_SUPPORT 1|define VLC_SUPPORT 0|g' > CMakeLists_new2.txt
cat CMakeLists.txt | sed -e 's|define VLC_SUPPORT 1|define VLC_SUPPORT 0|g' > CMakeLists_new.txt
cat CMakeLists_new.txt | sed -e 's|PkgConfig::FFMPEG ${XINE_INCLUDE_DIR} ${VLC_INCLUDE_DIR}|PkgConfig::FFMPEG ${XINE_INCLUDE_DIR}|g' > CMakeLists_new2.txt
mv CMakeLists_new2.txt CMakeLists.txt
rm CMakeLists_new.txt
cat CMakeLists.txt
cd ..
%endif
%build
#QTDIR=/usr/local/Trolltech/Qt-4.4.0/bin
#PATH=/usr/local/Trolltech/Qt-4.4.0/bin:$PATH
#PATH=/usr/local/include/ffmpeg067:$PATH
#export PATH
cd ..
pwd
cd ffmpeg-0.6.7
#CFLAGS="%{build_cflags} -Wno-implicit-function-declaration" \
CFLAGS="-Wno-incompatible-pointer-types -Wno-implicit-function-declaration" \
./configure \
--prefix="%{_builddir}/qdvdauthor-%{tar_version2}/qrender/ffmpeg-0.6.7" \
--disable-ffmpeg \
--disable-ffplay \
--disable-ffprobe \
--disable-ffserver \
--disable-doc \
--enable-static \
--enable-shared
make %{?_smp_mflags}
make install
cd ..
export PKG_CONFIG_LIBDIR="%{_builddir}/qdvdauthor-%{tar_version2}/qrender/ffmpeg-0.6.7/lib/pkgconfig"
export PKG_CONFIG_PATH="${PKG_CONFIG_LIBDIR}:/usr/lib/pkgconfig:/usr/share/pkgconfig"
#echo ${PKG_CONFIG_LIBDIR}
#LD_LIBRARY_PATH=$LD_LIBRARY_PATH:"%{_builddir}/qdvdauthor-%{tar_version2}/qrender/ffmpeg-0.6.7/lib/pkgconfig"
#export LD_LIBRARY_PATH
#cd qdvdauthor-2.3.1
cmake -S "qdvdauthor-%{tar_version2}" -B build -DCMAKE_INSTALL_PREFIX=/usr -DFFMPEG_DIRS="%{_builddir}/qdvdauthor-%{tar_version2}/qrender/ffmpeg-0.6.7"
#cmake . -DCMAKE_INSTALL_PREFIX=/usr -DFFMPEG_DIRS="%{_sourcedir}/fakeroot"
cmake --build build
#make {?_smp_mflags}
%install
cd ..
#make DESTDIR=%{buildroot} install
#DESTDIR="${pkgdir}" cmake --install build
pwd
DESTDIR=%{buildroot} cmake --install build
#DESTDIR={_pkgdir} cmake --install build
%if 0%{?suse_version} >= 1110
#suse_update_desktop_file -r -n QTrans Office Dictionary
#suse_update_desktop_file -r -n qdvdauthor AudioVideo
#suse_update_desktop_file -r {name} Utility AudioVideo AudioVideoEditing
%suse_update_desktop_file -r %{name} AudioVideo AudioVideoEditing
#suse_update_desktop_file -u -r -G 'OCR Suite' {name} Office Graphics Scanning OCR
%endif
%clean
rm -rf %{buildroot}
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
/usr
%changelog