Skip to content

Commit

Permalink
ffmpeg: Fix installation to image directory
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
pmenzel committed Nov 18, 2016
1 parent 78dd960 commit f577968
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions ffmpeg.be0
Original file line number Diff line number Diff line change
Expand Up @@ -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}"'

0 comments on commit f577968

Please sign in to comment.