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.

77 line
2.7KB

  1. SHELL:=/bin/bash
  2. UBUNTU_VERSION ?= 2404
  3. CODENAME ?= noble
  4. VERSION:=1.20.0
  5. build: $(CODENAME)/cppse-opentelemetry_$(VERSION)_amd64.deb
  6. $(CODENAME)/cppse-opentelemetry_$(VERSION)_amd64.deb:
  7. mkdir -p $(CODENAME)
  8. make ubuntu$(UBUNTU_VERSION)
  9. ubuntu2204:
  10. git clone --recurse-submodules https://github.com/open-telemetry/opentelemetry-cpp || true
  11. mkdir -p out
  12. bash ../ubuntu2204.sh make opentelem
  13. make package-ubuntu2204
  14. ubuntu$(UBUNTU_VERSION):
  15. git clone --recurse-submodules https://github.com/open-telemetry/opentelemetry-cpp || true
  16. git checkout v$(VERSION) || true
  17. mkdir -p out
  18. bash ../ubuntu$(UBUNTU_VERSION).sh make opentelem
  19. make package-ubuntu$(UBUNTU_VERSION)
  20. .PHONY : opentelem
  21. opentelem:
  22. pushd opentelemetry-cpp && \
  23. set -ex && \
  24. git config --global --add safe.directory $$PWD && \
  25. git checkout v1.8.3 && \
  26. mkdir -p build && \
  27. cd build && \
  28. sudo apt update && \
  29. sudo apt install libcurl4-openssl-dev libprotobuf-dev -y && \
  30. cmake -DBUILD_PACKAGE:BOOL=on -DBUILD_TESTING=off -DWITH_OTLP_HTTP=on -DWITH_OTLP_HTTP=on -DWITH_EXAMPLES=off .. && \
  31. cmake --build . --target all && \
  32. echo cpack -G DEB && \
  33. popd
  34. #
  35. # for some reason this whole package build stuff doesn't work..
  36. # and ditto for the --install target.. ffs.
  37. #
  38. #cmake -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_INSTALL_PREFIX=$$PWD/../out/ -DBUILD_TESTING=off -DBUILD_PACKAGE=ON .. && \
  39. #cmake --build . --target all && \
  40. #cmake --version && \
  41. #cmake --install . --prefix $$PWD/../../out/ -v && \
  42. #cpack -C debug && \
  43. package-ubuntu2204:
  44. rm -rf pkg_out
  45. mkdir -p pkg_out/opt/cppse/build/
  46. rsync -raPv out/ pkg_out/opt/cppse/build/
  47. rm -rf redis-plus-plus*amd64.deb
  48. docker run -v "$$(pwd):/src/" rayburgemeestre/fpm-ubuntu:22.04 fpm -f -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
  49. package-ubuntu$(UBUNTU_VERSION):
  50. rm -rf pkg_out
  51. mkdir -p pkg_out/opt/cppse/build/
  52. rsync -raPv out/ pkg_out/opt/cppse/build/
  53. rm -rf $(CODENAME)/cppse-opentelemetry_*_amd64.deb
  54. docker run -v "$$(pwd):/src/" rayburgemeestre/fpm-ubuntu:24.04 fpm -f -v $(VERSION) --iteration $(CODENAME) -s dir -t deb -n cppse-opentelemetry --license MPL2 --maintainer "Ray Burgemeestre <ray@cppse.nl>" --description "opentelemetry - build dependency" --url "https://github.com/open-telemetry/opentelemetry-cpp" --deb-generate-changes -C /src/pkg_out
  55. cp -prv cppse-opentelemetry_*_amd64.deb $(CODENAME)/
  56. clean:
  57. sudo rm -rf opentelemetry-cpp
  58. sudo rm -rf out
  59. sudo rm -rf pkg_out
  60. shell:
  61. FLAGS="-i --privileged" bash ../ubuntu$(UBUNTU_VERSION).sh /bin/bash