507d1d28da
Autobuild scripts prevent block patches not mentioned in the spec file. Trying to workaround this here. OBS-URL: https://build.opensuse.org/request/show/926875 OBS-URL: https://build.opensuse.org/package/show/server:monitoring/grafana?expand=0&rev=61
36 lines
997 B
Makefile
36 lines
997 B
Makefile
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 )
|
|
|
|
clean:
|
|
rm -f $(NAME)-*.tar $(NAME)-*.tar.gz
|
|
|
|
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 && \
|
|
gunzip ../$$tar.gz && \
|
|
tar -xf ../$$tar && \
|
|
# recreate tarball explicitly in a format that handles long filenames \
|
|
tar --format=posix -cf ../$$tar $$basename && \
|
|
cd $$basename && \
|
|
# Patches for the JS frontend go after here \
|
|
patch -p1 -i ../../add-source-code-reference && \
|
|
# End patches section \
|
|
yarn install --pure-lockfile && \
|
|
yarn run build && \
|
|
cd .. && \
|
|
echo "Updating $$basename/public in tarball..." && \
|
|
tar -rf ../$$tar $$basename/public && \
|
|
cd .. && \
|
|
gzip $$tar && \
|
|
rm -rf $$tmpdir
|