--- rpms/libdlna/contribs9/libdlna.spec 2017/08/18 16:25:49 1.2 +++ rpms/libdlna/contribs9/libdlna.spec 2018/03/18 09:39:30 1.3 @@ -17,6 +17,7 @@ Source: http://libdlna.geexbox.org/relea BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: ffmpeg-devel +BuildRequires: ffmpeg-compat-devel %description libdlna aims at being the reference open-source implementation of DLNA @@ -36,20 +37,35 @@ you will need to install %{name}-devel. %prep %setup - -%if %{!?_without_ffmpeg05:1}0 +#remove test + %{__perl} -pi.orig -e ' + s|check_lib ffmpeg/avformat.h av_register_all -lavformat|echo "ok"|; + s|check_lib ffmpeg/avcodec.h avcodec_register_all -lavcodec|echo "ok"|; + ' configure src/*.c src/*.h %{__perl} -pi.orig -e ' - s|ffmpeg/avformat.h|libavformat/avformat.h|; - s|ffmpeg/avcodec.h|libavcodec/avcodec.h|; + s|ffmpeg/avformat.h|ffmpeg-compat/libavformat/avformat.h|; + s|ffmpeg/avcodec.h|ffmpeg-compat/libavcodec/avcodec.h|; ' configure src/*.c src/*.h -%endif + +#check_lib ffmpeg/libavformat/avformat.h av_register_all -lavformat || die "Error, can't find libavformat !" +#echolog "Checking for libavcodec ..." +#check_lib ffmpeg/libavcodec/avcodec.h avcodec_register_all -lavcodec || die "Error, can't find libavcodec !" + +# %if %{!?_without_ffmpeg05:1}0 +# %{__perl} -pi.orig -e ' +# s|ffmpeg/avformat.h|libavformat/avformat.h|; +# s|ffmpeg/avcodec.h|libavcodec/avcodec.h|; +# ' configure src/*.c src/*.h +# %endif + %build export CFLAGS="%{optflags}" ./configure \ --disable-static \ --libdir="%{_libdir}" \ - --prefix="%{_prefix}" + --prefix="%{_prefix}" \ + --log=/dev/stdout %{__make} %{?_smp_mflags} || : %install