forked from ports/contrib
[notify] grafana: 8.1.7 -> 8.2.0; new dependencies: git and yarn
This commit is contained in:
parent
b414fc71f4
commit
3daeb7ed1e
1108
grafana/.footprint
1108
grafana/.footprint
File diff suppressed because it is too large
Load Diff
@ -1,8 +1,8 @@
|
||||
untrusted comment: verify with /etc/ports/contrib.pub
|
||||
RWSagIOpLGJF3y+kj4LJw3Rdm5nKiGBoO+EhOMetLagL5K3j453Gj424GBf/u6CKR52Rmw0B6fO4Ordo94wjEgxvQ/C0Se66LgU=
|
||||
SHA256 (Pkgfile) = 5b7df2f1146a87242d6f50df3f3d9b21c1972b6750ff20af63e6fd0745fadc06
|
||||
SHA256 (.footprint) = 49f5ed106c3a7511a308fedb13dd5f7bc44e6e8fe70c96d9a2ec195690615aad
|
||||
SHA256 (grafana-8.1.7.tar.gz) = 08179d4cc19d689ee8e2ca2d903f26f768fe2092d7145912ead46c3335c8d90d
|
||||
SHA256 (grafana-8.1.7.linux-amd64.tar.gz) = 05aaa2874b152d252966a3dc70b0a53948ae627ba5a6b29fe60ec14d1a8ccbf3
|
||||
RWSagIOpLGJF3xHg+OzO6WKWRRviCur0gCiH8kE7gFjkDjnUPdiiOXdbuGCEgXgOaEZEH/m8GdKx5yDx05WVbiME6wzMQ7q2Cw8=
|
||||
SHA256 (Pkgfile) = 939998a053b989bd4f9202c3c935bc8be44f5b6e19509560be99b0638c235e18
|
||||
SHA256 (.footprint) = 7df93065865a8b766047e0da03e3cc4903bed592f5f5ee5d18af3ccbc59db79e
|
||||
SHA256 (grafana-8.2.0.tar.gz) = b285cb110e1ff7d2e1ce2583a061d8b2c801ccd6b7eefbc03533f1a20eb165bb
|
||||
SHA256 (grafana-8.2.0.linux-amd64.tar.gz) = 0c76cc731988704d7b5dc6a7fb808767126f3fdc6e294ba2c4e367451adf0828
|
||||
SHA256 (grafana.confd) = 302e0281dea67cde2edd1e7d06bd7abf6a8b335595c050ffa874cb1c1bd19036
|
||||
SHA256 (grafana.service) = ee5ed6ff04600dcd2ecc432c7f915d9caf17f3f00c60e516636a38f4e5d282aa
|
||||
SHA256 (grafana.service) = 3b652a54c5f26d19197955854483687d7c761a2299788a182200acd5d1ffbb47
|
||||
|
@ -1,30 +1,57 @@
|
||||
# Description: The analytics platform for all your metrics
|
||||
# URL: https://grafana.com/
|
||||
# Maintainer: Tim Biermann, tbier at posteo dot de
|
||||
# Depends on: fontconfig go npm
|
||||
# Depends on: fontconfig go git npm yarn
|
||||
|
||||
name=grafana
|
||||
version=8.1.7
|
||||
version=8.2.0
|
||||
release=1
|
||||
source=(https://github.com/grafana/grafana/archive/v$version/$name-$version.tar.gz
|
||||
https://dl.grafana.com/oss/release/grafana-$version.linux-amd64.tar.gz
|
||||
grafana.confd grafana.service)
|
||||
|
||||
build() {
|
||||
cd $name-$version
|
||||
|
||||
sed -ri 's,^(\s*data\s*=).*,\1 /var/lib/grafana,' conf/defaults.ini
|
||||
sed -ri 's,^(\s*plugins\s*=).*,\1 /var/lib/grafana/plugins,' conf/defaults.ini
|
||||
sed -ri 's,^(\s*provisioning\s*=).*,\1 /var/lib/grafana/conf/provisioning,' conf/defaults.ini
|
||||
sed -ri 's,^(\s*logs\s*=).*,\1 /var/log/grafana,' conf/defaults.ini
|
||||
# setup build env {{{
|
||||
export LC_ALL=C
|
||||
export NODE_ENV=production
|
||||
[ ! -d $PKGMK_SOURCE_DIR/yarn_cache ] && mkdir $PKGMK_SOURCE_DIR/yarn_cache
|
||||
export YARN_CACHE_FOLDER=$PKGMK_SOURCE_DIR/yarn_cache
|
||||
[ ! -d $PKGMK_SOURCE_DIR/npm_cache ] && mkdir $PKGMK_SOURCE_DIR/npm_cache
|
||||
export npm_config_cache=$PKGMK_SOURCE_DIR/npm_cache
|
||||
export NPM_CONFIG_PREFIX="$SRC/npm"
|
||||
export PATH+=":$NPM_CONFIG_PREFIX/bin"
|
||||
|
||||
export GOPATH="$SRC/gopath"
|
||||
export PATH+=":$GOPATH/bin"
|
||||
mkdir -p "$GOPATH/src/github.com/grafana/"
|
||||
ln -fsrT "$SRC/grafana-$version/" "$GOPATH/src/github.com/grafana/grafana"
|
||||
export CGO_LDFLAGS="${LDFLAGS}"
|
||||
export CGO_CPPFLAGS="${CPPFLAGS}"
|
||||
export CGO_CFLAGS="${CFLAGS}"
|
||||
export CGO_CXXFLAGS="${CXXFLAGS}"
|
||||
export GOFLAGS="-buildmode=pie -trimpath -modcacherw"
|
||||
local ldflags="-X main.version=$version -X main.commit=$version -X main.buildstamp=1607529777"
|
||||
go build -ldflags "$ldflags" -v github.com/grafana/grafana/pkg/cmd/grafana-server
|
||||
go build -ldflags "$ldflags" -v github.com/grafana/grafana/pkg/cmd/grafana-cli
|
||||
# }}}
|
||||
# setup default paths {{{
|
||||
sed -ri 's,^(\s*data\s*=).*,\1 /var/lib/grafana,' $name-$version/conf/defaults.ini
|
||||
sed -ri 's,^(\s*plugins\s*=).*,\1 /var/lib/grafana/plugins,' $name-$version/conf/defaults.ini
|
||||
sed -ri 's,^(\s*provisioning\s*=).*,\1 /var/lib/grafana/conf/provisioning,' $name-$version/conf/defaults.ini
|
||||
sed -ri 's,^(\s*logs\s*=).*,\1 /var/log/grafana,' $name-$version/conf/defaults.ini
|
||||
# }}}
|
||||
# build backend {{{
|
||||
cd "$GOPATH/src/github.com/grafana/grafana"
|
||||
#go run build.go setup
|
||||
#go run build.go build
|
||||
make build-go
|
||||
# }}}
|
||||
# build frontend {{{
|
||||
yarn install --frozen-lockfile --no-progress --production
|
||||
# }}}
|
||||
|
||||
cd $SRC/$name-$version
|
||||
install -Dm644 $SRC/$name.confd $PKG/etc/conf.d/$name
|
||||
install -Dm755 $name-server $PKG/usr/sbin/$name-server
|
||||
install -Dm755 $name-cli $PKG/usr/bin/$name-cli
|
||||
install -Dsm755 bin/linux-amd64/grafana-server $PKG/usr/bin/grafana-server
|
||||
install -Dsm755 bin/linux-amd64/grafana-cli $PKG/usr/bin/grafana-cli
|
||||
install -Dm644 conf/sample.ini $PKG/etc/grafana.ini
|
||||
install -dm755 $PKG/usr/share/grafana
|
||||
cp -r conf public $PKG/usr/share/$name/
|
||||
@ -32,3 +59,5 @@ build() {
|
||||
## install rc file
|
||||
install -Dm 755 $SRC/grafana.service $PKG/etc/rc.d/grafana
|
||||
}
|
||||
|
||||
# vim: foldmethod=marker foldlevelstart=1
|
||||
|
@ -4,32 +4,32 @@
|
||||
#
|
||||
|
||||
SSD=/sbin/start-stop-daemon
|
||||
PROG=/usr/sbin/grafana-server
|
||||
PROG=/usr/bin/grafana-server
|
||||
OPTS="--homepath /usr/share/grafana"
|
||||
|
||||
case $1 in
|
||||
start)
|
||||
$SSD --start -b --exec $PROG -- $OPTS
|
||||
;;
|
||||
stop)
|
||||
$SSD --stop --retry 10 --exec $PROG
|
||||
;;
|
||||
restart)
|
||||
$0 stop
|
||||
$0 start
|
||||
;;
|
||||
status)
|
||||
$SSD --status --exec $PROG
|
||||
case $? in
|
||||
0) echo "$PROG is running with pid $(pidof $PROG)" ;;
|
||||
1) echo "$PROG is not running but the pid file $PID exists" ;;
|
||||
3) echo "$PROG is not running" ;;
|
||||
4) echo "Unable to determine the program status" ;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
echo "usage: $0 [start|stop|restart|status]"
|
||||
;;
|
||||
start)
|
||||
$SSD --start -b --exec $PROG -- $OPTS
|
||||
;;
|
||||
stop)
|
||||
$SSD --stop --retry 10 --exec $PROG
|
||||
;;
|
||||
restart)
|
||||
$0 stop
|
||||
$0 start
|
||||
;;
|
||||
status)
|
||||
$SSD --status --exec $PROG
|
||||
case $? in
|
||||
0) echo "$PROG is running with pid $(pidof $PROG)" ;;
|
||||
1) echo "$PROG is not running but the pid file $PID exists" ;;
|
||||
3) echo "$PROG is not running" ;;
|
||||
4) echo "Unable to determine the program status" ;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
echo "usage: $0 [start|stop|restart|status]"
|
||||
;;
|
||||
esac
|
||||
|
||||
# End of file
|
||||
|
Loading…
x
Reference in New Issue
Block a user