2023-03-02 12:51:02 +01:00
|
|
|
NAME = prometheus
|
|
|
|
SPEC = golang-github-prometheus-prometheus.spec
|
|
|
|
|
|
|
|
default: clean tar
|
|
|
|
|
|
|
|
clean:
|
2023-08-01 17:25:05 +02:00
|
|
|
rm -f $(NAME)-*.tar $(NAME)-*.tar.gz web-ui-*.tar.gz npm_licenses.tar.bz2 vendor.tar.gz
|
2023-03-02 12:51:02 +01:00
|
|
|
|
|
|
|
tar:
|
2023-09-19 17:02:38 +02:00
|
|
|
osc service manualrun
|
2023-03-02 12:51:02 +01:00
|
|
|
@version=$$( awk '/^Version:/ {print $$2;exit;}' $(SPEC) ) && \
|
|
|
|
echo "Package version is $$version" && \
|
|
|
|
basename=$(NAME)-$$version && \
|
|
|
|
tar=$$basename.tar && \
|
|
|
|
web_ui=web-ui-$$version.tar && \
|
|
|
|
wd=$$(pwd) && \
|
|
|
|
tmpdir=$$(mktemp -d -p /tmp) && \
|
|
|
|
cd $$tmpdir && \
|
|
|
|
tar -zxf $$wd/$$tar.gz && \
|
|
|
|
cd $$basename && \
|
|
|
|
make assets npm_licenses assets-compress && \
|
|
|
|
tar -cf $$wd/$$web_ui web/ui/static/react && \
|
|
|
|
find web/ui/static -type f -name '*.gz' -exec tar -rf $$wd/$$web_ui "{}" \; && \
|
|
|
|
tar -rf $$wd/$$web_ui web/ui/embed.go && \
|
|
|
|
cd .. && \
|
|
|
|
echo "Creating web assets tarball" && \
|
|
|
|
mv $$basename/npm_licenses.tar.bz2 $$wd && \
|
|
|
|
cd $$wd && \
|
|
|
|
gzip -f $$web_ui && \
|
|
|
|
rm -rf $$tmpdir
|