recipe 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. # Recipe file for mpv.
  2. #
  3. # Maintainers: (C) 2017 Mateus P. Rodrigues, mprodrigues@dragora.org.
  4. #
  5. # Under the terms of the GNU General Public License.
  6. program=mpv
  7. version=0.26.0
  8. release=1
  9. description="
  10. Video player based on MPlayer/mplayer2.
  11. "
  12. homepage=https://mpv.io
  13. license=GPLv2
  14. tarname=${program}-${version}.tar.gz
  15. # Remote source(s)
  16. fetch="https://github.com/mpv-player/mpv/archive/v0.26.0.tar.gz"
  17. # Parallel jobs for the compiler
  18. jobs=1
  19. # Source documentation
  20. docs="Copyright LICENSE README.md RELEASE_NOTES"
  21. build() {
  22. unpack "${tardir}/$tarname"
  23. cd "$srcdir"
  24. python2.7 bootstrap.py
  25. ./waf configure \
  26. --prefix=/usr \
  27. --mandir=/usr/man \
  28. --libdir=/usr/lib${SUFARCH} \
  29. --disable-wayland
  30. ./waf install \
  31. --destdir=$PKG \
  32. # Compress manual pages
  33. if [ -d "${destdir}/$mandir" ] ; then
  34. (
  35. cd "${destdir}/$mandir"
  36. find . -type f -exec lzip -9 '{}' +
  37. find . -type l | while read -r file
  38. do
  39. ln -sf "$(readlink -- "$file").lz" "${file}.lz"
  40. rm -- "$file"
  41. done
  42. )
  43. fi
  44. # Copy documentation
  45. mkdir -p "${destdir}/usr/local/share/doc/${program}-${version}"
  46. cp -p $docs "${destdir}/usr/local/share/doc/${program}-${version}/"
  47. }