|
| 1 | +#!/usr/bin/env make |
| 2 | + |
| 3 | +.PHONY: clean all |
| 4 | + |
| 5 | +clean: |
| 6 | + rm -rf artifacts || true |
| 7 | + rm -rf artifacts-verification || true |
| 8 | + rm -rf distfiles || true |
| 9 | + rm .docker_image || true |
| 10 | + |
| 11 | +all: distfiles artifacts/packages.checksum |
| 12 | + |
| 13 | +distfiles: .docker_image |
| 14 | + docker run --rm -it \ |
| 15 | + -v $(shell pwd)/distfiles:/var/src/distfiles \ |
| 16 | + xmrwallet_build /bin/bash /usr/local/bin/build-artifacts.sh \ |
| 17 | + download |
| 18 | + |
| 19 | +artifacts/openssl: distfiles |
| 20 | + mkdir -p artifacts/openssl |
| 21 | + docker run --rm -it \ |
| 22 | + -v $(shell pwd)/artifacts:/var/src/artifacts \ |
| 23 | + -v $(shell pwd)/distfiles:/var/src/distfiles:ro \ |
| 24 | + xmrwallet_build /bin/bash /usr/local/bin/build-artifacts.sh \ |
| 25 | + openssl |
| 26 | + |
| 27 | +artifacts/boost: distfiles |
| 28 | + mkdir -p artifacts/boost |
| 29 | + docker run --rm -it \ |
| 30 | + -v $(shell pwd)/artifacts:/var/src/artifacts \ |
| 31 | + -v $(shell pwd)/distfiles:/var/src/distfiles:ro \ |
| 32 | + xmrwallet_build /bin/bash /usr/local/bin/build-artifacts.sh \ |
| 33 | + boost |
| 34 | + |
| 35 | +artifacts/monero: artifacts/boost artifacts/openssl |
| 36 | + mkdir -p artifacts/monero |
| 37 | + docker run --rm -it \ |
| 38 | + -v $(shell pwd)/artifacts:/var/src/artifacts \ |
| 39 | + -v $(shell pwd)/distfiles:/var/src/distfiles:ro \ |
| 40 | + xmrwallet_build /bin/bash /usr/local/bin/build-artifacts.sh \ |
| 41 | + monero |
| 42 | + |
| 43 | +artifacts/apk: artifacts/monero |
| 44 | + mkdir -p artifacts/apk |
| 45 | + docker run --rm -it \ |
| 46 | + -v $(shell pwd)/artifacts:/var/src/artifacts \ |
| 47 | + -v $(shell pwd)/distfiles:/var/src/distfiles:ro \ |
| 48 | + xmrwallet_build /bin/bash /usr/local/bin/build-artifacts.sh \ |
| 49 | + apk |
| 50 | + |
| 51 | +artifacts/packages.checksum: artifacts/apk |
| 52 | + docker run --rm -it \ |
| 53 | + -v $(shell pwd)/artifacts:/var/src/artifacts \ |
| 54 | + -v $(shell pwd)/distfiles:/var/src/distfiles:ro \ |
| 55 | + xmrwallet_build /bin/bash /usr/local/bin/build-artifacts.sh \ |
| 56 | + checksum |
| 57 | + |
| 58 | +artifactsd: distfiles |
| 59 | + @echo "debugable build - enters the container and requires you to execute the commands" |
| 60 | + mkdir -p artifacts |
| 61 | + mkdir -p distfiles |
| 62 | + docker run --rm -it \ |
| 63 | + -v $(shell pwd)/artifacts:/var/src/artifacts \ |
| 64 | + -v $(shell pwd)/artifacts-verification:/var/src/artifacts-verification \ |
| 65 | + -v $(shell pwd)/distfiles:/var/src/distfiles \ |
| 66 | + -v $(shell pwd)/build-artifacts.sh:/usr/local/bin/build-artifacts.sh \ |
| 67 | + --entrypoint /bin/bash \ |
| 68 | + xmrwallet_build |
| 69 | + |
| 70 | +artifacts-verification: distfiles artifacts/packages.checksum |
| 71 | + @echo "running a verification build that compares with a previous artifacts build" |
| 72 | + mkdir -p artifacts-verification |
| 73 | + mkdir -p distfiles |
| 74 | + docker run --rm -it \ |
| 75 | + -v $(shell pwd)/artifacts-verification:/var/src/artifacts \ |
| 76 | + -v $(shell pwd)/distfiles:/var/src/distfiles:ro \ |
| 77 | + xmrwallet_build /bin/bash /usr/local/bin/build-artifacts.sh \ |
| 78 | + openssl boost monero apk checksum |
| 79 | + |
| 80 | + docker run --rm -it \ |
| 81 | + -v $(shell pwd)/artifacts-verification:/var/src/artifacts-verification:ro \ |
| 82 | + -v $(shell pwd)/artifacts:/var/src/artifacts:ro \ |
| 83 | + xmrwallet_build /bin/bash /usr/local/bin/build-artifacts.sh \ |
| 84 | + verify |
| 85 | + |
| 86 | +.docker_image: build-artifacts.sh |
| 87 | + docker build . -t xmrwallet_build |
| 88 | + touch .docker_image |
0 commit comments