From f577968c69c48699341fa22dae34e3ab0fbc1847 Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Fri, 18 Nov 2016 16:42:38 +0100 Subject: [PATCH] ffmpeg: Fix installation to image directory MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently, files are saved in the wrong directory, and the image/destination directory is ignored. Building FFmpeg as a normal user shows this problem. ``` […] [BEE] make -j install PREFIX=/usr EPREFIX=/usr BINDIR=/usr/bin SBINDIR=/usr/sbin LIBEXECDIR=/usr/libexec SYSCONFDIR=/etc SHAREDSTATEDIR=/var LOCALSTATEDIR=/var LIBDIR=/usr/lib INCLUDEDIR=/usr/include DATAROOTDIR=/usr/share DATADIR=/usr/share INFODIR=/usr/share/info LOCALEDIR=/usr/share/locale MANDIR=/usr/share/man DOCDIR=/usr/share/doc/ffmpeg DESTDIR=/dev/shm/bee-root/ffmpeg/ffmpeg-3.1.4-0/image […] INSTALL doc/libavfilter.3 install: cannot remove ‘/usr/share/man/man1/ffmpeg.1’: Permission denied install: cannot create regular file ‘/usr/share/man/man1/ffplay.1’: Permission denied install: cannot remove ‘/usr/share/man/man1/ffprobe.1’: Permission denied install: cannot remove ‘/usr/share/man/man1/ffserver.1’: Permission denied install: cannot remove ‘/usr/share/man/man1/ffmpeg-all.1’: Permission denied install: cannot create regular file ‘/usr/share/man/man1/ffplay-all.1’: Permission denied install: cannot remove ‘/usr/share/man/man1/ffprobe-all.1’: Permission denied install: cannot remove ‘/usr/share/man/man1/ffserver-all.1’: Permission denied install: cannot remove ‘/usr/share/man/man1/ffmpeg-utils.1’: Permission denied install: cannot remove ‘/usr/share/man/man1/ffmpeg-scaler.1’: Permission denied install: cannot remove ‘/usr/share/man/man1/ffmpeg-resampler.1’: Permission denied install: cannot remove ‘/usr/share/man/man1/ffmpeg-codecs.1’: Permission denied install: cannot remove ‘/usr/share/man/man1/ffmpeg-bitstream-filters.1’: Permission denied install: cannot remove ‘/usr/share/man/man1/ffmpeg-formats.1’: Permission denied install: cannot remove ‘/usr/share/man/man1/ffmpeg-protocols.1’: Permission denied install: cannot remove ‘/usr/share/man/man1/ffmpeg-devices.1’: Permission denied install: cannot remove ‘/usr/share/man/man1/ffmpeg-filters.1’: Permission denied doc/Makefile:152: recipe for target 'install-man' failed make: *** [install-man] Error 1 make: *** Waiting for unfinished jobs.... INSTALL libavdevice/libavdevice.so […] ``` FFmpeg saves the environment variables into `config.mak`, and directly puts the destination directory in there. ``` prefix=/usr LIBDIR=$(DESTDIR)${prefix}/lib SHLIBDIR=$(DESTDIR)${prefix}/lib INCDIR=$(DESTDIR)${prefix}/include BINDIR=$(DESTDIR)${prefix}/bin DATADIR=$(DESTDIR)${prefix}/share/ffmpeg DOCDIR=$(DESTDIR)/usr/share/doc/ffmpeg MANDIR=$(DESTDIR)${prefix}/share/man PKGCONFIGDIR=$(DESTDIR)${prefix}/lib/pkgconfig ``` That doesn’t work with the way `bee_install` does it, which is known from GNU Autotools. It sets these without `DESTDIR`, and the Makefile takes care of that. Therefore, don’t use `bee_install`. Also remove the unnecessary manual operations to install the binaries. --- ffmpeg.be0 | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ffmpeg.be0 b/ffmpeg.be0 index a3b9026e6..f5862c4f5 100755 --- a/ffmpeg.be0 +++ b/ffmpeg.be0 @@ -57,11 +57,9 @@ mee_build() { } mee_install() { - bee_install + start_cmd make install DESTDIR=${D} install -v -m755 -d ${D}/${BINDIR} - install -v -m755 ${B}/{tools/qt-faststart,ffmpeg,ffplay,ffprobe,ffserver} ${D}/${BINDIR} - install -v -m755 -d ${D}${DOCDIR} - install -v -m644 ${B}/doc/*.txt ${D}${DOCDIR} + install -v -m755 ${B}/tools/qt-faststart ${D}/${BINDIR} } ## by default this may be 'make install DESTDIR="${D}"'