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.

133 line
5.1KB

  1. SHELL:=/bin/bash
  2. UBUNTU_VERSION ?= 2404
  3. CODENAME ?= noble
  4. VERSION:=7.1
  5. build: $(CODENAME)/cppse-ffmpeg_$(VERSION)_amd64.deb
  6. $(CODENAME)/cppse-ffmpeg_$(VERSION)_amd64.deb:
  7. mkdir -p $(CODENAME)
  8. make ubuntu$(UBUNTU_VERSION)
  9. ubuntu1804:
  10. # sometimes got 404 on videolan/x264
  11. #git clone https://code.videolan.org/videolan/x264
  12. #git clone git://source.ffmpeg.org/ffmpeg.git
  13. # for this reason pushed them to my own github
  14. git clone https://github.com/rayburgemeestre/x264
  15. git clone https://github.com/rayburgemeestre/ffmpeg
  16. bash ../ubuntu1804.sh make ffmpeg_impl
  17. make package-ubuntu1804
  18. ubuntu2004:
  19. # sometimes got 404 on videolan/x264
  20. #git clone https://code.videolan.org/videolan/x264
  21. #git clone git://source.ffmpeg.org/ffmpeg.git
  22. git clone https://github.com/rayburgemeestre/x264
  23. git clone https://github.com/rayburgemeestre/ffmpeg
  24. bash ../ubuntu2004.sh make ffmpeg_impl
  25. make package-ubuntu2004
  26. bash ../ubuntu2004.sh chown $$(id -u):$$(id -g) . -R # fix permissions
  27. ubuntu2204:
  28. # sometimes got 404 on videolan/x264
  29. #git clone https://code.videolan.org/videolan/x264
  30. #git clone git://source.ffmpeg.org/ffmpeg.git
  31. git clone https://github.com/rayburgemeestre/x264
  32. git clone https://github.com/rayburgemeestre/ffmpeg
  33. bash ../ubuntu2204.sh make ffmpeg_impl
  34. make package-ubuntu2204
  35. bash ../ubuntu2204.sh chown $$(id -u):$$(id -g) . -R # fix permissions
  36. ubuntu$(UBUNTU_VERSION):
  37. git clone -b stable https://code.videolan.org/videolan/x264 || true
  38. git clone -b n$(VERSION) https://github.com/FFmpeg/FFmpeg ffmpeg || true
  39. bash ../ubuntu$(UBUNTU_VERSION).sh make ffmpeg_impl
  40. make package-ubuntu$(UBUNTU_VERSION)
  41. bash ../ubuntu$(UBUNTU_VERSION).sh chown $$(id -u):$$(id -g) . -R # fix permissions
  42. ffmpeg_impl:
  43. # see issue https://exerror.com/fatal-detected-dubious-ownership-in-repository/
  44. git config --global --add safe.directory '*'
  45. apt-get update
  46. sudo apt-get install -y yasm
  47. sudo apt-get install -y nasm # apparently x264 switched to this
  48. mkdir -p x264_out
  49. mkdir -p ffmpeg_out
  50. cp -prv 5.1-0004-fix-binutils.patch ffmpeg/
  51. pushd x264 && \
  52. echo pass
  53. pushd x264 && \
  54. ./configure --cxx=$$(which c++) --enable-static --enable-shared --prefix=$$(realpath $$PWD/../x264_out) && \
  55. make -j $$(nproc) && \
  56. make install
  57. pushd x264 && \
  58. ./configure --cxx=$$(which c++) --enable-static --enable-shared && \
  59. make -j $$(nproc) && \
  60. make install
  61. pushd ffmpeg && git checkout n7.1
  62. pushd ffmpeg && \
  63. ./configure --cxx=$$(which c++) --enable-static --enable-shared --enable-libx264 --enable-gpl --enable-swresample --disable-libdrm --prefix=$$(realpath $$PWD/../ffmpeg_out) && \
  64. make -j $$(nproc) && \
  65. make install
  66. package-ubuntu1804:
  67. rm -rf out
  68. mkdir -p out/opt/cppse/build/x264
  69. mkdir -p out/opt/cppse/build/ffmpeg
  70. cp -prv ./x264_out/* out/opt/cppse/build/x264/
  71. cp -prv ./ffmpeg_out/* out/opt/cppse/build/ffmpeg/
  72. rm -rf cppseffmpeg_*_amd64.deb
  73. docker run -v "$$(pwd):/src/" rayburgemeestre/fpm-ubuntu:18.04 fpm -f -v 1.1 -s dir -t deb -n cppseffmpeg --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
  74. package-ubuntu2004:
  75. rm -rf out
  76. mkdir -p out/opt/cppse/build/x264
  77. mkdir -p out/opt/cppse/build/ffmpeg
  78. cp -prv ./x264_out/* out/opt/cppse/build/x264/
  79. cp -prv ./ffmpeg_out/* out/opt/cppse/build/ffmpeg/
  80. rm -rf cppseffmpeg_*_amd64.deb
  81. docker run -v "$$(pwd):/src/" rayburgemeestre/fpm-ubuntu:20.04 fpm -f -v 1.1 -s dir -t deb -n cppseffmpeg --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
  82. package-ubuntu2204:
  83. rm -rf out
  84. mkdir -p out/opt/cppse/build/x264
  85. mkdir -p out/opt/cppse/build/ffmpeg
  86. cp -prv ./x264_out/* out/opt/cppse/build/x264/
  87. cp -prv ./ffmpeg_out/* out/opt/cppse/build/ffmpeg/
  88. rm -rf cppseffmpeg_*_amd64.deb
  89. docker run -v "$$(pwd):/src/" rayburgemeestre/fpm-ubuntu:22.04 fpm -f -v 1.1.1 -s dir -t deb -n cppseffmpeg --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
  90. package-ubuntu$(UBUNTU_VERSION):
  91. rm -rf out
  92. mkdir -p out/opt/cppse/build/x264
  93. mkdir -p out/opt/cppse/build/ffmpeg
  94. cp -prv ./x264_out/* out/opt/cppse/build/x264/
  95. cp -prv ./ffmpeg_out/* out/opt/cppse/build/ffmpeg/
  96. rm -rf $(CODENAME)/cppse-ffmpeg_*_amd64.deb
  97. docker run -v "$$(pwd):/src/" rayburgemeestre/fpm-ubuntu:24.04 fpm -f -v $(VERSION) --iteration $(CODENAME) -s dir -t deb -n cppse-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
  98. cp -prv cppse-ffmpeg_*_amd64.deb $(CODENAME)/
  99. clean:
  100. rm -rf x264
  101. rm -rf ffmpeg
  102. rm -rf out
  103. rm -rf x264_out
  104. rm -rf ffmpeg_out
  105. shell:
  106. FLAGS="-i --privileged" bash ../ubuntu$(UBUNTU_VERSION).sh /bin/bash