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.

41 lines
1.7KB

  1. SHELL:=/bin/bash
  2. ubuntu2004:
  3. git clone --branch v2.5.2 https://github.com/AcademySoftwareFoundation/openexr || true
  4. bash ../ubuntu2004.sh make impl
  5. make package-ubuntu2004
  6. bash ../ubuntu2004.sh chown $$(id -u):$$(id -g) . -R # fix permissions
  7. impl:
  8. update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-10 40
  9. update-alternatives --install /usr/bin/cc cc /usr/bin/clang-10 40
  10. update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-10 40
  11. update-alternatives --install /usr/bin/clang clang /usr/bin/clang-10 40
  12. update-alternatives --install /usr/bin/ld ld /usr/bin/ld.lld-10 40
  13. apt-get update && apt-get install libz-dev -y && \
  14. pushd openexr && \
  15. mkdir build && pushd build && \
  16. CXX=$$(which c++) cmake -DBUILD_SHARED_LIBS=off -DCMAKE_INSTALL_PREFIX=$$PWD/openexr_out .. && \
  17. make -j $$(nproc) && \
  18. make install && \
  19. popd && \
  20. mkdir build2 && pushd build2 && \
  21. CXX=$$(which c++) cmake -DBUILD_SHARED_LIBS=on -DCMAKE_INSTALL_PREFIX=$$PWD/openexr_out .. && \
  22. make -j $$(nproc) && \
  23. make install
  24. package-ubuntu2004:
  25. rm -rf out
  26. mkdir -p out/opt/cppse/build/openexr
  27. cp -prv openexr/build/openexr_out/* out/opt/cppse/build/openexr/
  28. cp -prv openexr/build2/openexr_out/lib/* out/opt/cppse/build/openexr/lib/
  29. rm -rf cppseopenexr_*_amd64.deb
  30. docker run -v "$$(pwd):/src/" rayburgemeestre/fpm-ubuntu:20.04 fpm -v 1.1 -s dir -t deb -n cppseopenexr --license MPL2 --maintainer "Ray Burgemeestre <ray@cppse.nl>" --description "openexr - build dependency" --url "https://github.com/AcademySoftwareFoundation/openexr" --deb-generate-changes -C /src/out
  31. clean:
  32. rm -rf openexr
  33. rm -rf out
  34. shell:
  35. FLAGS="-i --privileged" bash ../ubuntu2004.sh /bin/bash