Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

62 linhas
2.0KB

  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. ubuntu$(UBUNTU_VERSION):
  10. git clone --recurse-submodules https://github.com/open-telemetry/opentelemetry-cpp || true
  11. git checkout v$(VERSION) || true
  12. mkdir -p out
  13. bash ../ubuntu$(UBUNTU_VERSION).sh make opentelem
  14. make package-ubuntu$(UBUNTU_VERSION)
  15. .PHONY : opentelem
  16. opentelem:
  17. pushd opentelemetry-cpp && \
  18. set -ex && \
  19. git config --global --add safe.directory $$PWD && \
  20. git checkout v1.8.3 && \
  21. mkdir -p build && \
  22. cd build && \
  23. sudo apt update && \
  24. sudo apt install libcurl4-openssl-dev libprotobuf-dev -y && \
  25. cmake -DBUILD_PACKAGE:BOOL=on -DBUILD_TESTING=off -DWITH_OTLP_HTTP=on -DWITH_OTLP_HTTP=on -DWITH_EXAMPLES=off .. && \
  26. cmake --build . --target all && \
  27. echo cpack -G DEB && \
  28. popd
  29. #
  30. # for some reason this whole package build stuff doesn't work..
  31. # and ditto for the --install target.. ffs.
  32. #
  33. #cmake -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_INSTALL_PREFIX=$$PWD/../out/ -DBUILD_TESTING=off -DBUILD_PACKAGE=ON .. && \
  34. #cmake --build . --target all && \
  35. #cmake --version && \
  36. #cmake --install . --prefix $$PWD/../../out/ -v && \
  37. #cpack -C debug && \
  38. package-ubuntu$(UBUNTU_VERSION):
  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 $(CODENAME)/cppse-opentelemetry_*_amd64.deb
  43. 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
  44. cp -prv cppse-opentelemetry_*_amd64.deb $(CODENAME)/
  45. clean:
  46. sudo rm -rf opentelemetry-cpp
  47. sudo rm -rf out
  48. sudo rm -rf pkg_out
  49. shell:
  50. FLAGS="-i --privileged" bash ../ubuntu$(UBUNTU_VERSION).sh /bin/bash