rebuilt below */ffmpeg4 to allow -devel cohexistence with mainstream ffmpeg [release 4.4.1-3mamba;Mon May 30 2022]

This commit is contained in:
Silvan Calarco 2024-01-05 22:16:18 +01:00
parent d5009d3fcb
commit cf88a07129

View File

@ -1,15 +1,11 @@
%define enable_gpl 1 %define enable_gpl 1
%define enable_non_free 1 %define enable_non_free 1
#% define buildyear %(echo %{version} | cut -b 7-10)
#% define buildmonth %(echo %{version} | cut -b 11-12)
#% define buildday %(echo %{version} | cut -b 13-14)
%define buildver %{version} %define buildver %{version}
#% define buildver export-%{buildyear}-%{buildmonth}-%{buildday}
Name: ffmpeg4 Name: ffmpeg4
Epoch: 1 Epoch: 1
Version: 4.4.1 Version: 4.4.1
Release: 2mamba Release: 3mamba
Summary: Hyper fast MPEG1/MPEG4/H263/RV and AC3/MPEG audio encoder Summary: Hyper fast MPEG1/MPEG4/H263/RV and AC3/MPEG audio encoder
Group: System/Libraries Group: System/Libraries
Vendor: openmamba Vendor: openmamba
@ -229,6 +225,8 @@ This package contains only ffmpeg's postproc post-processing headers and static
%package -n libavresample-ffmpeg4 %package -n libavresample-ffmpeg4
Summary: ffmpeg resample library Summary: ffmpeg resample library
Group: System/Libraries Group: System/Libraries
Provides: libavresample-ffmpeg
Obsoletes: libavresample-ffmpeg < 1:4.4.1-3mamba
%description -n libavresample-ffmpeg4 %description -n libavresample-ffmpeg4
FFmpeg resample library. FFmpeg resample library.
@ -237,6 +235,8 @@ FFmpeg resample library.
Summary: Shared header files and static libraries part of ffmpeg libavresample Summary: Shared header files and static libraries part of ffmpeg libavresample
Group: System/Libraries Group: System/Libraries
Requires: libavresample-ffmpeg4 = %{?epoch:%epoch:}%{version}-%{release} Requires: libavresample-ffmpeg4 = %{?epoch:%epoch:}%{version}-%{release}
Provides: libavresample-ffmpeg-devel
Obsoletes: libavresample-ffmpeg-devel < 1:4.4.1-3mamba
%description -n libavresample-ffmpeg4-devel %description -n libavresample-ffmpeg4-devel
FFmpeg resample library. FFmpeg resample library.
@ -261,16 +261,20 @@ This is a virtual package that contains the dependencies necessary for installin
%prep %prep
%setup -q -n ffmpeg-%{buildver} %setup -q -n ffmpeg-%{buildver}
#-D -T
#:<< _EOF
%patch4 -p1 %patch4 -p1
%build %build
#:<< _EOF
# configure not generated by autoconf # configure not generated by autoconf
# -D__LINUX_USER__ is required by crystalhd # -D__LINUX_USER__ is required by crystalhd
export CFLAGS="%{optflags} -fno-unit-at-a-time -D__LINUX_USER__" export CFLAGS="%{optflags} -fno-unit-at-a-time -D__LINUX_USER__"
./configure \ ./configure \
--prefix="%{_prefix}" \ --prefix="%{_prefix}" \
--libdir="%{_libdir}" \ --libdir="%{_libdir}/ffmpeg4" \
--shlibdir="%{_libdir}" \ --shlibdir="%{_libdir}/ffmpeg4" \
--incdir="%{_includedir}/ffmpeg4" \
--mandir="%{_mandir}" \ --mandir="%{_mandir}" \
--enable-libmp3lame \ --enable-libmp3lame \
--enable-libvorbis \ --enable-libvorbis \
@ -313,35 +317,8 @@ export CFLAGS="%{optflags} -fno-unit-at-a-time -D__LINUX_USER__"
%if %enable_non_free %if %enable_non_free
--enable-nonfree \ --enable-nonfree \
%endif %endif
%endif %endif
# --enable-libx264 \
# --enable-dxva2 \
# --enable-libschroedinger \
# --enable-x11grab \
# --enable-libfaac \
# --enable-libx265 \
# --enable-libfaad \
# --enable-avfilter-lavf \
# --enable-libfaadbin \
# --cpu=%{_target_cpu} \
# --enable-swscale \
## --incdir="%{_includedir}/ffmpeg" \
# FIXME:
# software scaler enabled no
# Sun medialib support no
# AVISynth enabled no
# liba52 dlopened no
# enable non free (libamrnb, libamrwb) License: unredistributable
# libamr-nb support no
# libamr-wb support no
# libgsm enabled no
# libnut enabled no
%make %make
%install %install
@ -349,41 +326,19 @@ export CFLAGS="%{optflags} -fno-unit-at-a-time -D__LINUX_USER__"
%makeinstall \ %makeinstall \
shlibdir="%{buildroot}%{_libdir}" \ shlibdir="%{buildroot}%{_libdir}" \
libdir="%{buildroot}%{_libdir}" libdir="%{buildroot}%{_libdir}"
#\
# incdir="%{buildroot}%{_includedir}/ffmpeg" \
# shlibdir="%{buildroot}%{_libdir}" \
# libdir="%{buildroot}%{_libdir}"
# Remove unwanted files from the included docs
#%{__cp} -a doc _docs
#%{__rm} -rf _docs/{Makefile,*.texi,*.pl}
# make installlib is broken, so we do it by hand # Move libs to %{_libdir}, except the .so symlinks
#install -m 644 libavcodec/libavcodec.a %{buildroot}%{_libdir} (cd %{buildroot}
#install -m 644 libavformat/libavformat.a %{buildroot}%{_libdir} for f in usr/%{_lib}/ffmpeg4/*; do
if [[ $f == *.so ]]; then
ln -sf ../$(basename $(readlink $f)) $f
elif [[ ! -d $f && ! $f == *.a ]]; then
mv $f usr/%{_lib}
fi
done
)
# create compat symlink rm -rf %{buildroot}%{_datadir}
install -d %{buildroot}%{_libdir}/libavcodec
ln -s ../libavcodec.a %{buildroot}%{_libdir}/libavcodec/libavcodec.a
#install -d %{buildroot}%{_includedir}/ffmpeg
#cp -a %{buildroot}%{_includedir}/libavcodec/*.h \
# %{buildroot}%{_includedir}/libavdevice/*.h \
# %{buildroot}%{_includedir}/libavformat/*.h \
# %{buildroot}%{_includedir}/libavutil/*.h \
# %{buildroot}%{_includedir}/libswscale/*.h \
# %{buildroot}%{_includedir}/ffmpeg
#install -d %{buildroot}%{_includedir}/postproc
#cp -a %{buildroot}%{_includedir}/libpostproc/*.h \
# %{buildroot}%{_includedir}/postproc
# The <postproc/postprocess.h> is now at <ffmpeg/postprocess.h>, so provide
# a compatibility symlink
#%{__mkdir_p} %{buildroot}%{_includedir}/postproc/
#%{__mkdir_p} %{buildroot}%{_includedir}/libswscale/
#%{__ln_s} ../ffmpeg/postprocess.h \
# %{buildroot}%{_includedir}/postproc/postprocess.h
#%{__ln_s} ../ffmpeg/rgb2rgb.h\
# %{buildroot}%{_includedir}/libswscale/rgb2rgb.h
%clean %clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" [ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
@ -420,53 +375,19 @@ ln -s ../libavcodec.a %{buildroot}%{_libdir}/libavcodec/libavcodec.a
%{_bindir}/ffmpeg %{_bindir}/ffmpeg
%{_bindir}/ffplay %{_bindir}/ffplay
%{_bindir}/ffprobe %{_bindir}/ffprobe
#%{_bindir}/ffserver
%{_datadir}/ffmpeg/ffprobe.xsd
%{_mandir}/man1/ffmpeg.1*
%{_mandir}/man1/ffplay.1*
%{_mandir}/man1/ffprobe.1*
#%{_mandir}/man1/ffserver.1*
%{_mandir}/man1/ffmpeg-all.1*
%{_mandir}/man1/ffplay-all.1*
%{_mandir}/man1/ffprobe-all.1*
#%{_mandir}/man1/ffserver-all.1*
%{_mandir}/man1/ffmpeg-bitstream-filters.1*
%{_mandir}/man1/ffmpeg-codecs.1*
%{_mandir}/man1/ffmpeg-devices.1*
%{_mandir}/man1/ffmpeg-filters.1*
%{_mandir}/man1/ffmpeg-formats.1*
%{_mandir}/man1/ffmpeg-protocols.1*
%{_mandir}/man1/ffmpeg-resampler.1*
%{_mandir}/man1/ffmpeg-scaler.1*
%{_mandir}/man1/ffmpeg-utils.1*
%doc CREDITS %doc CREDITS
%files examples
%defattr(-,root,root)
%dir %{_datadir}/ffmpeg/examples
%{_datadir}/ffmpeg/examples/Makefile
%{_datadir}/ffmpeg/examples/*.c
%files presets
%defattr(-,root,root)
%dir %{_datadir}/ffmpeg
#%{_datadir}/ffmpeg/libx264-*.ffpreset
%{_datadir}/ffmpeg/libvpx-*.ffpreset
%files -n libavcodec-ffmpeg4 %files -n libavcodec-ffmpeg4
%defattr(-,root,root) %defattr(-,root,root)
%{_libdir}/libavcodec.so.* %{_libdir}/libavcodec.so.*
%files -n libavcodec-ffmpeg4-devel %files -n libavcodec-ffmpeg4-devel
%defattr(-,root,root) %defattr(-,root,root)
%dir %{_includedir}/libavcodec %dir %{_includedir}/ffmpeg4/libavcodec
%{_includedir}/libavcodec/* %{_includedir}/ffmpeg4/libavcodec/*
%dir %{_libdir}/libavcodec %{_libdir}/ffmpeg4/libavcodec.a
%{_libdir}/libavcodec/libavcodec.a %{_libdir}/ffmpeg4/libavcodec.so
%{_libdir}/libavcodec.a %{_libdir}/ffmpeg4/pkgconfig/libavcodec.pc
%{_libdir}/libavcodec.so
%{_libdir}/pkgconfig/libavcodec.pc
%{_mandir}/man3/libavcodec.3.gz
%files -n libavdevice-ffmpeg4 %files -n libavdevice-ffmpeg4
%defattr(-,root,root) %defattr(-,root,root)
@ -474,13 +395,11 @@ ln -s ../libavcodec.a %{buildroot}%{_libdir}/libavcodec/libavcodec.a
%files -n libavdevice-ffmpeg4-devel %files -n libavdevice-ffmpeg4-devel
%defattr(-,root,root) %defattr(-,root,root)
%dir %{_includedir}/libavdevice %dir %{_includedir}/ffmpeg4/libavdevice
%{_includedir}/libavdevice/avdevice.h %{_includedir}/ffmpeg4/libavdevice/*.h
%{_includedir}/libavdevice/version.h %{_libdir}/ffmpeg4/libavdevice.a
%{_libdir}/libavdevice.a %{_libdir}/ffmpeg4/libavdevice.so
%{_libdir}/libavdevice.so %{_libdir}/ffmpeg4/pkgconfig/libavdevice.pc
%{_libdir}/pkgconfig/libavdevice.pc
%{_mandir}/man3/libavdevice.3.gz
%files -n libavfilter-ffmpeg4 %files -n libavfilter-ffmpeg4
%defattr(-,root,root) %defattr(-,root,root)
@ -488,12 +407,11 @@ ln -s ../libavcodec.a %{buildroot}%{_libdir}/libavcodec/libavcodec.a
%files -n libavfilter-ffmpeg4-devel %files -n libavfilter-ffmpeg4-devel
%defattr(-,root,root) %defattr(-,root,root)
%dir %{_includedir}/libavfilter %dir %{_includedir}/ffmpeg4/libavfilter
%{_includedir}/libavfilter/*.h %{_includedir}/ffmpeg4/libavfilter/*.h
%{_libdir}/libavfilter.a %{_libdir}/ffmpeg4/libavfilter.a
%{_libdir}/libavfilter.so %{_libdir}/ffmpeg4/libavfilter.so
%{_libdir}/pkgconfig/libavfilter.pc %{_libdir}/ffmpeg4/pkgconfig/libavfilter.pc
%{_mandir}/man3/libavfilter.3.gz
%files -n libavformat-ffmpeg4 %files -n libavformat-ffmpeg4
%defattr(-,root,root) %defattr(-,root,root)
@ -501,12 +419,11 @@ ln -s ../libavcodec.a %{buildroot}%{_libdir}/libavcodec/libavcodec.a
%files -n libavformat-ffmpeg4-devel %files -n libavformat-ffmpeg4-devel
%defattr(-,root,root) %defattr(-,root,root)
%dir %{_includedir}/libavformat %dir %{_includedir}/ffmpeg4/libavformat
%{_includedir}/libavformat/*.h %{_includedir}/ffmpeg4/libavformat/*.h
%{_libdir}/libavformat.a %{_libdir}/ffmpeg4/libavformat.a
%{_libdir}/libavformat.so %{_libdir}/ffmpeg4/libavformat.so
%{_libdir}/pkgconfig/libavformat.pc %{_libdir}/ffmpeg4/pkgconfig/libavformat.pc
%{_mandir}/man3/libavformat.3.gz
%files -n libavresample-ffmpeg4 %files -n libavresample-ffmpeg4
%defattr(-,root,root) %defattr(-,root,root)
@ -514,12 +431,11 @@ ln -s ../libavcodec.a %{buildroot}%{_libdir}/libavcodec/libavcodec.a
%files -n libavresample-ffmpeg4-devel %files -n libavresample-ffmpeg4-devel
%defattr(-,root,root) %defattr(-,root,root)
%dir %{_includedir}/libavresample %dir %{_includedir}/ffmpeg4/libavresample
%{_includedir}/libavresample/avresample.h %{_includedir}/ffmpeg4/libavresample/*.h
%{_includedir}/libavresample/version.h %{_libdir}/ffmpeg4/libavresample.a
%{_libdir}/libavresample.a %{_libdir}/ffmpeg4/libavresample.so
%{_libdir}/libavresample.so %{_libdir}/ffmpeg4/pkgconfig/libavresample.pc
%{_libdir}/pkgconfig/libavresample.pc
%files -n libavutil-ffmpeg4 %files -n libavutil-ffmpeg4
%defattr(-,root,root) %defattr(-,root,root)
@ -527,12 +443,11 @@ ln -s ../libavcodec.a %{buildroot}%{_libdir}/libavcodec/libavcodec.a
%files -n libavutil-ffmpeg4-devel %files -n libavutil-ffmpeg4-devel
%defattr(-,root,root) %defattr(-,root,root)
%dir %{_includedir}/libavutil %dir %{_includedir}/ffmpeg4/libavutil
%{_includedir}/libavutil/*.h %{_includedir}/ffmpeg4/libavutil/*.h
%{_libdir}/libavutil.a %{_libdir}/ffmpeg4/libavutil.a
%{_libdir}/libavutil.so %{_libdir}/ffmpeg4/libavutil.so
%{_libdir}/pkgconfig/libavutil.pc %{_libdir}/ffmpeg4/pkgconfig/libavutil.pc
%{_mandir}/man3/libavutil.3.gz
%files -n libpostproc-ffmpeg4 %files -n libpostproc-ffmpeg4
%defattr(-,root,root) %defattr(-,root,root)
@ -540,13 +455,11 @@ ln -s ../libavcodec.a %{buildroot}%{_libdir}/libavcodec/libavcodec.a
%files -n libpostproc-ffmpeg4-devel %files -n libpostproc-ffmpeg4-devel
%defattr(-,root,root) %defattr(-,root,root)
%dir %{_includedir}/libpostproc %dir %{_includedir}/ffmpeg4/libpostproc
%{_includedir}/libpostproc/postprocess.h %{_includedir}/ffmpeg4/libpostproc/*.h
%{_includedir}/libpostproc/version.h %{_libdir}/ffmpeg4/libpostproc.a
%{_libdir}/libpostproc.a %{_libdir}/ffmpeg4/libpostproc.so
%{_libdir}/libpostproc.so %{_libdir}/ffmpeg4/pkgconfig/libpostproc.pc
%{_libdir}/pkgconfig/libpostproc.pc
%{_datadir}/ffmpeg/examples/README
%files -n libswscale-ffmpeg4 %files -n libswscale-ffmpeg4
%defattr(-,root,root) %defattr(-,root,root)
@ -554,12 +467,11 @@ ln -s ../libavcodec.a %{buildroot}%{_libdir}/libavcodec/libavcodec.a
%files -n libswscale-ffmpeg4-devel %files -n libswscale-ffmpeg4-devel
%defattr(-,root,root) %defattr(-,root,root)
%dir %{_includedir}/libswscale %dir %{_includedir}/ffmpeg4/libswscale
%{_includedir}/libswscale/*.h %{_includedir}/ffmpeg4/libswscale/*.h
%{_libdir}/libswscale.a %{_libdir}/ffmpeg4/libswscale.a
%{_libdir}/libswscale.so %{_libdir}/ffmpeg4/libswscale.so
%{_libdir}/pkgconfig/libswscale.pc %{_libdir}/ffmpeg4/pkgconfig/libswscale.pc
%{_mandir}/man3/libswscale.3*
%files -n libswresample-ffmpeg4 %files -n libswresample-ffmpeg4
%defattr(-,root,root) %defattr(-,root,root)
@ -567,19 +479,16 @@ ln -s ../libavcodec.a %{buildroot}%{_libdir}/libavcodec/libavcodec.a
%files -n libswresample-ffmpeg4-devel %files -n libswresample-ffmpeg4-devel
%defattr(-,root,root) %defattr(-,root,root)
%dir %{_includedir}/libswresample %dir %{_includedir}/ffmpeg4/libswresample
%{_includedir}/libswresample/*.h %{_includedir}/ffmpeg4/libswresample/*.h
%{_libdir}/libswresample.a %{_libdir}/ffmpeg4/libswresample.a
%{_libdir}/libswresample.so %{_libdir}/ffmpeg4/libswresample.so
%{_libdir}/pkgconfig/libswresample.pc %{_libdir}/ffmpeg4/pkgconfig/libswresample.pc
%{_mandir}/man3/libswresample.3*
%files devel
%defattr(-,root,root)
%dir %{_docdir}/ffmpeg
%{_docdir}/ffmpeg/*
%changelog %changelog
* Mon May 30 2022 Silvan Calarco <silvan.calarco@mambasoft.it> 4.4.1-3mamba
- rebuilt below */ffmpeg4 to allow -devel cohexistence with mainstream ffmpeg
* Sat Jan 29 2022 Silvan Calarco <silvan.calarco@mambasoft.it> 4.4.1-2mamba * Sat Jan 29 2022 Silvan Calarco <silvan.calarco@mambasoft.it> 4.4.1-2mamba
- legacy package - legacy package