File qdvdauthor.spec of Package qdvd
%global debug_package %{nil}
%define tar_version 2.4.1-002
%define tar_version2 2.4.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.4.1
Release: 2.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} >= 1560 && 0{?sle_version} >= 150600
#if 0{?suse_version} >= 1550 && 0{?sle_version} >= 150500
#if 0{?suse_version} || 0{?sles_version}
#if 0{?suse_version} && 0{?suse_version} < 1600
#if 0{?suse_version} && 0{?suse_version} >= 1550
#if 0{?suse_version} && 0{?sle_version} >= 150500
%if 0%{?sle_version} >= 150400 && 0%{?is_opensuse}
#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 qt6-core-devel qt6-gui-devel qt6-widgets-devel qt6-xml-devel qt6-network-devel qt6-printsupport-devel update-desktop-files nasm libstdc++-devel
#Requires: ffmpeg067-libs
%endif
#if 0{?sle_version} || 0{?suse_version} <= 1600
#if "_repository" == "openSUSE_Tumbleweed"
#BuildRequires: cmake gcc-c++ libxine-devel vlc-devel qt6-core-devel qt6-gui-devel qt6-widgets-devel qt6-xml-devel qt6-network-devel qt6-printsupport-devel update-desktop-files nasm
#endif
#if {fedora}
%if 0%{?fedora_version} == 39
#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 PackageKit-Qt5-devel libXext-devel
#BuildRequires: cmake extra-cmake-modules PackageKit-Qt5-devel libavutil-free libavcodec-free
#Requires: ffmpeg063-libs
%endif
%if 0%{?fedora_version} >= 40
#BuildRequires: cmake extra-cmake-modules xine-lib-devel vlc-devel PackageKit-Qt6-devel ffmpeg063-libs ffmpeg063-devel
BuildRequires: cmake extra-cmake-modules xine-lib-devel vlc-devel qt6-qtwebengine-devel libXext-devel libavutil-free libavcodec-free libvpl
%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} >= 9
%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
BuildRequires: cmake gcc-c++ libxine1.2-devel libvlc-devel libqt6core-devel libqt6gui-devel libqt6widgets-devel libqt6xml-devel libqt6network-devel libqt6printsupport-devel libopenssl-devel libjack-devel libxext-devel libavutil57 libavfilter8 libopencl1 libstdc++-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
BuildRequires: cmake gcc-c++ lib64xine1.2-devel lib64vlc-devel lib64qt6core-devel lib64qt6gui-devel lib64qt6widgets-devel lib64qt6xml-devel lib64qt6network-devel lib64qt6printsupport-devel lib64openssl-devel lib64jack-devel lib64xext-devel lib64avutil57 lib64avfilter8 libstdc++-devel
#Requires: ffmpeg063-libs
#lib64rocm-opencl-runtime5.7
%endif
%endif
%description
QDVDAuthor is a GUI frontend for dvdauthor written in qt6
%prep
#ls /usr/lib/gcc/x86_64-mageia-linux/14/libstdc++fs*
#ls /usr/lib/gcc/x86_64-mageia-linux/12/libstdc++*
#ls /usr/lib64/gcc/x86_64-linux-gnu/
#ls /usr/lib/gcc/x86_64-linux-gnu/7/
#ls /usr/bin/gcc*
#ls /usr/bin/cmake
pwd
%setup -T -D -b 1
%setup -qn ffmpeg-0.6.7
#if 0%{?is_opensuse}
#patch0 -p1
%patch -P 0 -p1
#%endif
#patch -P 0
#patch -p0
#patch 0 -p1
#if 0%{?fedora_version}
#patch 0 -p1
#endif
#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
ls
#setup -qn %{name}-%{tar_version2}
ls
#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
pwd
cd ..
pwd
ls
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.4.1
cmake -S "qdvdauthor-%{tar_version2}" -B "qdvdauthor-%{tar_version2}"/build -DCMAKE_INSTALL_PREFIX=/usr -DFFMPEG_DIRS="%{_builddir}/qdvdauthor-%{tar_version2}/qrender/ffmpeg-0.6.7" -DCMAKE_CXX_COMPILER=g++-7
#if 0{?sle_version} == 150400
#-DCMAKE_CXX_COMPILER=g++-11
#endif
#if 0{?sle_version} == 150500
#-DCMAKE_CXX_COMPILER=g++-9
#endif
#if 0%{?suse_version} && 0{?suse_version} < 1600
#-DCMAKE_CXX_COMPILER=g++-11
#endif
#if 0{?sle_version} == 1600
#-DCMAKE_CXX_COMPILER=g++-13
#endif
#cmake . -DCMAKE_INSTALL_PREFIX=/usr -DFFMPEG_DIRS="{_sourcedir}/fakeroot"
cmake --build "qdvdauthor-%{tar_version2}"/build
#make {?_smp_mflags}
%install
cd ..
#make DESTDIR=%{buildroot} install
#DESTDIR="${pkgdir}" cmake --install build
pwd
DESTDIR=%{buildroot} cmake --install "qdvdauthor-%{tar_version2}"/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