You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

69 line
2.2KB

  1. SHELL:=/bin/bash
  2. test:
  3. touch fake.deb
  4. ffmpeg:
  5. # git clone git://git.videolan.org/x264.git
  6. #git clone https://github.com/rayburgemeestre/x264
  7. git clone https://code.videolan.org/videolan/x264
  8. git clone git://source.ffmpeg.org/ffmpeg.git
  9. bash ../ubuntu1804.sh make ffmpeg_impl
  10. bash ../ubuntu1804.sh make package
  11. ffmpeg_impl:
  12. apt-get update
  13. sudo apt-get install -y yasm
  14. sudo apt-get install -y nasm # apparently x264 switched to this
  15. mkdir x264_out
  16. mkdir ffmpeg_out
  17. pushd x264 && \
  18. git checkout 2451a7282463f68e532f2eee090a70ab139bb3e7
  19. # ^ parent of 71ed44c7312438fac7c5c5301e45522e57127db4, which is where they dropped support for:
  20. # libavcodec/libx264.c:282:9: error: 'x264_bit_depth' undeclared (first use in this function); did you mean 'x264_picture_t'?
  21. # if (x264_bit_depth > 8)
  22. # ^~~~~~~~~~~~~~
  23. pushd x264 && \
  24. ./configure --cxx=$$(which c++) --enable-static --enable-shared --prefix=$$(realpath $$PWD/../x264_out) && \
  25. make -j $$(nproc) && \
  26. make install
  27. pushd x264 && \
  28. ./configure --cxx=$$(which c++) --enable-static --enable-shared && \
  29. make -j $$(nproc) && \
  30. make install
  31. pushd ffmpeg && git checkout n3.1
  32. #git checkout 71052d85c16bd65fa1e3e01d9040f9a3925efd7a # or my muxing code won't work, they've modified the example since fba1592f35501bff0f28d7885f4128dfc7b82777
  33. pushd ffmpeg && \
  34. ./configure --cxx=$$(which c++) --enable-static --enable-shared --enable-libx264 --enable-gpl --prefix=$$(realpath $$PWD/../ffmpeg_out) && \
  35. make -j $$(nproc) && \
  36. make install
  37. package:
  38. rm -rf out
  39. mkdir -p out/opt/cppse/build/x264
  40. mkdir -p out/opt/cppse/build/ffmpeg
  41. cp -prv ./x264_out/* out/opt/cppse/build/x264/
  42. cp -prv ./ffmpeg_out/* out/opt/cppse/build/ffmpeg/
  43. rm -rf ffmpeg_1.0_amd64.deb
  44. docker run -v "$$(pwd):/src/" rayburgemeestre/fpm-ubuntu:18.04 fpm -s dir -t deb -n ffmpeg --license MPL2 --maintainer "Ray Burgemeestre <ray@cppse.nl>" --description "ffmpeg - build dependency" --url "https://gitea.cppse.nl/rayburgemeestre/build-config/src/branch/master/ffmpeg" --deb-generate-changes -C /src/out
  45. clean:
  46. rm -rf x264
  47. rm -rf ffmpeg
  48. rm -rf out
  49. rm -rf x264_out
  50. rm -rf ffmpeg_out
  51. shell:
  52. FLAGS="-i --privileged" bash ../ubuntu1804.sh /bin/bash