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.

74 lines
2.5KB

  1. SHELL:=/bin/bash
  2. VERSION:=1.3.6
  3. build: cppse-redis-plus-plus_$(VERSION)_amd64.deb
  4. cppse-redis-plus-plus_$(VERSION)_amd64.deb:
  5. make ubuntu2404
  6. ubuntu2204:
  7. mkdir -p $$PWD/../out
  8. # check out revision that is master at the time of writing
  9. git clone -b v1.1.0 https://github.com/redis/hiredis || true
  10. bash ../ubuntu2204.sh make hiredis
  11. git clone -b 1.3.6 https://github.com/sewenew/redis-plus-plus || true
  12. bash ../ubuntu2204.sh make redis-plus-plus
  13. make package-ubuntu2204
  14. ubuntu2404:
  15. mkdir -p $$PWD/../out
  16. # check out revision that is master at the time of writing
  17. git clone -b v1.2.0 https://github.com/redis/hiredis || true
  18. bash ../ubuntu2404.sh make hiredis
  19. git clone -b 1.3.13 https://github.com/sewenew/redis-plus-plus || true
  20. bash ../ubuntu2404.sh make redis-plus-plus
  21. make package-ubuntu2404
  22. .PHONY : hiredis
  23. hiredis:
  24. pushd hiredis && \
  25. cmake -DCMAKE_C_FLAGS=-fPIC -DCMAKE_CXX_FLAGS=-fPIC -DCMAKE_INSTALL_PREFIX=$$PWD/../out/hiredis -DENABLE_SSL=off -DBUILD_SHARED_LIBS=OFF . && \
  26. make USE_SSL=0 && \
  27. make PREFIX=$$PWD/../out/hiredis USE_SSL=0 install && \
  28. popd
  29. .PHONY : redis-plus-plus
  30. redis-plus-plus:
  31. pushd redis-plus-plus && \
  32. mkdir -p build && \
  33. pushd build && \
  34. cmake -DCMAKE_PREFIX_PATH=$$PWD/../../out/hiredis -DCMAKE_INSTALL_PREFIX=$$PWD/../../out/redis-plus-plus -DREDIS_PLUS_PLUS_BUILD_STATIC=ON -DREDIS_PLUS_PLUS_USE_TLS=OFF .. && \
  35. make -j 8 && \
  36. make install && \
  37. cd ..
  38. package-ubuntu2204:
  39. rm -rf pkg_out
  40. mkdir -p pkg_out/opt/cppse/build/
  41. rsync -raPv out/ pkg_out/opt/cppse/build/
  42. rm -rf redis-plus-plus*amd64.deb
  43. docker run -v "$$(pwd):/src/" rayburgemeestre/fpm-ubuntu:22.04 fpm -v 1.1 -s dir -t deb -n redis-plus-plus --license MPL2 --maintainer "Ray Burgemeestre <ray@cppse.nl>" --description "redis-plus-plus - build dependency" --url "https://github.com/sewenew/redis-plus-plus" --deb-generate-changes -C /src/pkg_out
  44. package-ubuntu2404:
  45. rm -rf pkg_out
  46. mkdir -p pkg_out/opt/cppse/build/
  47. rsync -raPv out/ pkg_out/opt/cppse/build/
  48. rm -rf redis-plus-plus*amd64.deb
  49. docker run -v "$$(pwd):/src/" rayburgemeestre/fpm-ubuntu:24.04 fpm -v $(VERSION) -s dir -t deb -n cppse-redis-plus-plus --license MPL2 --maintainer "Ray Burgemeestre <ray@cppse.nl>" --description "redis-plus-plus - build dependency" --url "https://github.com/sewenew/redis-plus-plus" --deb-generate-changes -C /src/pkg_out
  50. clean:
  51. sudo rm -rf hiredis
  52. sudo rm -rf redis-plus-plus
  53. sudo rm -rf out
  54. sudo rm -rf pkg_out
  55. shell:
  56. FLAGS="-i --privileged" bash ../ubuntu2404.sh /bin/bash