2019-12-05 16:43:17 +01:00
|
|
|
NAME = grafana
|
|
|
|
SPEC = $(NAME).spec
|
|
|
|
|
|
|
|
default: verify-deps clean tar
|
|
|
|
|
|
|
|
verify-deps:
|
|
|
|
@which yarn >/dev/null 2>&1 || ( echo "yarn not found; run \`sudo npm install -g yarn\`" && false )
|
|
|
|
@which grunt >/dev/null 2>&1 || ( echo "grunt not found; run \`sudo npm install -g grunt-cli\`" && false )
|
|
|
|
|
|
|
|
clean:
|
2020-03-19 09:58:44 +01:00
|
|
|
rm -f $(NAME)-*.tar $(NAME)-*.tar.gz
|
2019-12-05 16:43:17 +01:00
|
|
|
|
|
|
|
tar:
|
|
|
|
osc service disabledrun
|
|
|
|
@version=$$( awk '/^Version:/ {print $$2}' $(SPEC) ) && \
|
|
|
|
echo "Package version is $$version" && \
|
|
|
|
basename=$(NAME)-$$version && \
|
|
|
|
tar=$$basename.tar && \
|
|
|
|
tmpdir=$$(mktemp -d -p .) && \
|
|
|
|
cd $$tmpdir && \
|
2020-03-19 09:58:44 +01:00
|
|
|
gunzip ../$$tar.gz && \
|
2019-12-05 16:43:17 +01:00
|
|
|
tar -xf ../$$tar && \
|
|
|
|
cd $$basename && \
|
2020-06-04 01:19:01 +02:00
|
|
|
# Patches for the JS frontend go after here \
|
|
|
|
# No patches currently needed \
|
|
|
|
# End patches section \
|
2019-12-05 16:43:17 +01:00
|
|
|
yarn install --pure-lockfile && \
|
|
|
|
grunt release && \
|
|
|
|
cp -pr tmp/public . && \
|
|
|
|
cp -pr tmp/tools . && \
|
|
|
|
cd .. && \
|
|
|
|
echo "Updating $$basename/tools $$basename/public in tarball..." && \
|
|
|
|
tar -rf ../$$tar $$basename/tools $$basename/public && \
|
|
|
|
cd .. && \
|
2020-03-19 09:58:44 +01:00
|
|
|
gzip $$tar && \
|
2019-12-05 16:43:17 +01:00
|
|
|
rm -rf $$tmpdir
|