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.

53 lines
2.5KB

  1. SHELL:=/bin/bash
  2. allegro5:
  3. git clone https://github.com/liballeg/allegro5.git
  4. pushd allegro5 && git checkout 5.2.5.0
  5. bash ../ubuntu1804.sh make impl
  6. make package
  7. impl:
  8. apt-get update
  9. apt-get install -y freeglut3-dev libgl1-mesa-dev libglu1-mesa-dev mesa-common-dev \
  10. libxcursor-dev libavfilter-dev \
  11. libpng-dev libjpeg-dev libfreetype6-dev \
  12. libxrandr-dev libxinerama-dev libxi-dev \
  13. libgtk2.0-dev
  14. update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-7 40
  15. update-alternatives --install /usr/bin/cc cc /usr/bin/clang-7 40
  16. update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-7 40
  17. update-alternatives --install /usr/bin/clang clang /usr/bin/clang-7 40
  18. update-alternatives --install /usr/bin/ld ld /usr/bin/ld.lld-7 40
  19. # static build
  20. pushd allegro5 && \
  21. cmake -DCMAKE_BUILD_TYPE=release -DCMAKE_INSTALL_PREFIX=$$PWD/allegro5_static -DSHARED=off -DSTATIC=on -DWANT_FFMPEG=off -DWANT_TTF=on . && \
  22. make -j $$(nproc) && \
  23. make install && \
  24. cp -prv lib/pkgconfig/allegro* /usr/share/pkgconfig/
  25. ## shared build
  26. #pushd allegro5 && \
  27. #cmake -DCMAKE_BUILD_TYPE=release -DCMAKE_INSTALL_PREFIX=$$PWD/allegro5_shared -DSHARED=on -DSTATIC=on -DWANT_FFMPEG=off -DWANT_TTF=on . && \
  28. #make -j $$(nproc) && \
  29. #sudo make install && \
  30. #sudo cp -prv lib/pkgconfig/allegro* /usr/share/pkgconfig/
  31. package:
  32. rm -rf out
  33. mkdir -p out/opt/cppse/build/allegro5/
  34. cp -prv allegro5/allegro5_static/* out/opt/cppse/build/allegro5/
  35. # with one exception I'm relying on internals of allegro5 for one file..
  36. cp -prv allegro5/include/allegro5/internal/aintern_bitmap.h out/opt/cppse/build/allegro5/include/allegro5/internal/aintern_bitmap.h
  37. # since above file also includes others, let's just sync the entire internal dir
  38. cp -prv allegro5/include/allegro5/internal/* out/opt/cppse/build/allegro5/include/allegro5/internal/
  39. # somewhere also platform became needed, let's pull those in as well
  40. cp -prv allegro5/include/allegro5/platform/* out/opt/cppse/build/allegro5/include/allegro5/platform/
  41. rm -rf allegro5_1.0_amd64.deb
  42. docker run -v "$$(pwd):/src/" rayburgemeestre/fpm-ubuntu:18.04 fpm -s dir -t deb -n allegro5 --license MPL2 --maintainer "Ray Burgemeestre <ray@cppse.nl>" --description "allegro5 - build dependency" --url "https://github.com/liballeg/allegro5.git" --deb-generate-changes -C /src/out
  43. clean:
  44. rm -rf allegro5
  45. rm -rf out
  46. shell:
  47. FLAGS="-i --privileged" bash ../ubuntu1804.sh /bin/bash