Changeset View
Changeset View
Standalone View
Standalone View
www/grafana2/Makefile
- This file was added.
Property | Old Value | New Value |
---|---|---|
svn:eol-style | null | native \ No newline at end of property |
svn:keywords | null | FreeBSD=%H \ No newline at end of property |
svn:mime-type | null | text/plain \ No newline at end of property |
# $FreeBSD$ | |||||
PORTNAME= grafana2 | |||||
PORTVERSION= 2.5.0 | |||||
DISTVERSIONPREFIX= v | |||||
CATEGORIES= www | |||||
MAINTAINER= thomas@bartelmess.io | |||||
COMMENT= Dashboard and graph editor for Graphite, InfluxDB & OpenTSDB | |||||
LICENSE= APACHE20 | |||||
BUILD_DEPENDS= ${LOCALBASE}/bin/go:${PORTSDIR}/lang/go \ | |||||
npm>=0:${PORTSDIR}/www/npm | |||||
ONLY_FOR_ARCHS= i386 amd64 | |||||
USE_RC_SUBR= grafana | |||||
USES= compiler | |||||
USE_GITHUB= yes | |||||
GH_ACCOUNT= grafana BurntSushi:toml Unknwon:unknwon_com,macaron davecgh:go_spew \ | |||||
go-ldap:ldap go-sql-driver:mysql go-xorm:xormcore go-xorm:xorm gosimple:slug \ | |||||
jtolds:gls lib:pq mattn:go_sqlite3 rainycape:unidecode smartystreets:goconvey \ | |||||
streadway:amqp golang:oauth2,net go-asn1-ber:asn1_ber go-bufio:bufio go-ini:ini \ | |||||
go-redis:redis_v2 go-macaron:binding,session,inject \ | |||||
aws:aws_sdk_go jmespath:go_jmespath | |||||
GH_PROJECT= grafana toml:toml com:unknwon_com macaron:macaron \ | |||||
go-spew:go_spew ldap:ldap mysql:mysql core:xormcore xorm:xorm \ | |||||
slug:slug gls:gls pq:pq binding:binding session:session go-sqlite3:go_sqlite3 \ | |||||
unidecode:unidecode goconvey:goconvey amqp:amqp oauth2:oauth2 net:net asn1-ber:asn1_ber \ | |||||
bufio:bufio ini:ini redis:redis_v2 inject:inject aws-sdk-go:aws_sdk_go go-jmespath:go_jmespath | |||||
GH_TAGNAME= v2.5.0 056c9bc:toml 28b053d:unknwon_com 93de4f3:macaron \ | |||||
5215b55:go_spew b4c9518:ldap d512f20:mysql 3e10003:xormcore 8bf4405:xorm ea39c58:slug 9a4a02d:gls \ | |||||
83c4f41:pq 0fbe4b9:binding 31e841d:session 5651a9d:go_sqlite3 cb7f23e:unidecode 530dd3d:goconvey \ | |||||
b4f3cea:amqp c764672:net 3314c49:oauth2 4e86f43:asn1_ber fe7b595:bufio 060d7da:ini e617904:redis_v2 \ | |||||
c5ab7bf:inject c350548:aws_sdk_go 53d4193:go_jmespath | |||||
GRAFANA_USER?= grafana | |||||
GRAFANA_GROUP?= grafana | |||||
USERS= ${GRAFANA_USER} | |||||
GROUPS= ${GRAFANA_GROUP} | |||||
GRAFANAHOMEDIR= ${PREFIX}/share/grafana/ | |||||
GRAFANADATADIR= /var/db/grafana/ | |||||
GRAFANALOGDIR= /var/log/grafana/ | |||||
GRAFANAPIDDIR= /var/run/grafana/ | |||||
SUB_FILES= grafana grafana.conf | |||||
SUB_LIST+= GRAFANA_USER=${GRAFANA_USER} \ | |||||
GRAFANA_GROUP=${GRAFANA_GROUP} \ | |||||
GRAFANADATADIR=${GRAFANADATADIR} \ | |||||
GRAFANALOGDIR=${GRAFANALOGDIR} \ | |||||
GRAFANAPIDDIR=${GRAFANAPIDDIR} \ | |||||
GRAFANAHOMEDIR=${GRAFANAHOMEDIR} | |||||
PLIST_SUB+= GRAFANAHOMEDIR=${GRAFANAHOMEDIR} | |||||
post-fetch: | |||||
echo "Post-fetch" | |||||
post-extract: | |||||
@${MKDIR} ${WRKSRC}/src/github.com/${GH_ACCOUNT}/grafana | |||||
.for src in .bra.toml .jscs.json CHANGELOG.md Gruntfile.js README.md build.go docker main.go pkg tasks \ | |||||
.gitignore .jsfmtrc CONTRIBUTING.md LICENSE.md appveyor.yml circle.yml docs package.json public tests \ | |||||
.hooks .jshintrc Godeps NOTICE.md benchmarks conf latest.json packaging vendor | |||||
@${MV} ${WRKSRC}/${src} \ | |||||
${WRKSRC}/src/github.com/${GH_ACCOUNT}/grafana | |||||
.endfor | |||||
@${MKDIR} ${WRKSRC}/src/github.com/BurntSushi | |||||
@${MKDIR} ${WRKSRC}/src/github.com/Unknwon | |||||
@${MKDIR} ${WRKSRC}/src/github.com/davecgh | |||||
@${MKDIR} ${WRKSRC}/src/github.com/go-ldap | |||||
@${MKDIR} ${WRKSRC}/src/github.com/go-sql-driver | |||||
@${MKDIR} ${WRKSRC}/src/github.com/go-xorm | |||||
@${MKDIR} ${WRKSRC}/src/github.com/gosimple | |||||
@${MKDIR} ${WRKSRC}/src/github.com/jtolds | |||||
@${MKDIR} ${WRKSRC}/src/github.com/lib | |||||
@${MKDIR} ${WRKSRC}/src/github.com/macaron-contrib | |||||
@${MKDIR} ${WRKSRC}/src/github.com/go-macaron | |||||
@${MKDIR} ${WRKSRC}/src/github.com/mattn | |||||
@${MKDIR} ${WRKSRC}/src/github.com/rainycape | |||||
@${MKDIR} ${WRKSRC}/src/github.com/smartystreets | |||||
@${MKDIR} ${WRKSRC}/src/github.com/streadway | |||||
@${MKDIR} ${WRKSRC}/src/github.com/aws | |||||
@${MKDIR} ${WRKSRC}/src/github.com/go-ini | |||||
@${MKDIR} ${WRKSRC}/src/github.com/jmespath | |||||
@${MKDIR} ${WRKSRC}/src/golang.org/x | |||||
@${MKDIR} ${WRKSRC}/src/gopkg.in | |||||
@${MV} ${WRKSRC_toml} ${WRKSRC}/src/github.com/BurntSushi/toml | |||||
@${MV} ${WRKSRC_unknwon_com} ${WRKSRC}/src/github.com/Unknwon/com | |||||
@${MV} ${WRKSRC_macaron} ${WRKSRC}/src/github.com/Unknwon/macaron | |||||
@${MV} ${WRKSRC_go_spew} ${WRKSRC}/src/github.com/davecgh/go-spew | |||||
@${MV} ${WRKSRC_ldap} ${WRKSRC}/src/github.com/go-ldap/ldap | |||||
@${MV} ${WRKSRC_mysql} ${WRKSRC}/src/github.com/go-sql-driver/mysql | |||||
@${MV} ${WRKSRC_xormcore} ${WRKSRC}/src/github.com/go-xorm/core | |||||
@${MV} ${WRKSRC_xorm} ${WRKSRC}/src/github.com/go-xorm/xorm | |||||
@${MV} ${WRKSRC_slug} ${WRKSRC}/src/github.com/gosimple/slug | |||||
@${MV} ${WRKSRC_gls} ${WRKSRC}/src/github.com/jtolds/gls | |||||
@${MV} ${WRKSRC_pq} ${WRKSRC}/src/github.com/lib/pq | |||||
@${MV} ${WRKSRC_binding} ${WRKSRC}/src/github.com/macaron-contrib/binding/ | |||||
@${MV} ${WRKSRC_session} ${WRKSRC}/src/github.com/macaron-contrib/session/ | |||||
@${MV} ${WRKSRC_inject} ${WRKSRC}/src/github.com/go-macaron/inject | |||||
@${MV} ${WRKSRC_go_sqlite3} ${WRKSRC}/src/github.com/mattn/go-sqlite3 | |||||
@${MV} ${WRKSRC_unidecode} ${WRKSRC}/src/github.com/rainycape/unidecode | |||||
@${MV} ${WRKSRC_goconvey} ${WRKSRC}/src/github.com/smartystreets/goconvey | |||||
@${MV} ${WRKSRC_amqp} ${WRKSRC}/src/github.com/streadway/amqp | |||||
@${CP} -R ${WRKSRC_ini} ${WRKSRC}/src/github.com/go-ini/ini/ | |||||
@${MV} ${WRKSRC_aws_sdk_go} ${WRKSRC}/src/github.com/aws/aws-sdk-go | |||||
@${MV} ${WRKSRC_go_jmespath} ${WRKSRC}/src/github.com/jmespath/go-jmespath/ | |||||
@${MV} ${WRKSRC_oauth2} ${WRKSRC}/src/golang.org/x/oauth2 | |||||
@${MV} ${WRKSRC_net} ${WRKSRC}/src/golang.org/x/net | |||||
@${MV} ${WRKSRC_asn1_ber} ${WRKSRC}/src/gopkg.in/asn1-ber.v1 | |||||
@${MV} ${WRKSRC_bufio} ${WRKSRC}/src/gopkg.in/bufio.v1 | |||||
@${MV} ${WRKSRC_ini} ${WRKSRC}/src/gopkg.in/ini.v1 | |||||
@${MV} ${WRKSRC_redis_v2} ${WRKSRC}/src/gopkg.in/redis.v2 | |||||
post-patch: | |||||
@${REINPLACE_CMD} -e 's|master|${PORTVERSION}|g'\ | |||||
${WRKSRC}/src/github.com/${GH_ACCOUNT}/grafana/main.go | |||||
do-build: | |||||
@cd ${WRKSRC}/src/github.com/${GH_ACCOUNT}/grafana; \ | |||||
${SETENV} ${BUILD_ENV} GOPATH=${WRKSRC} go build -o bin/grafana | |||||
@cd ${WRKSRC}/src/github.com/${GH_ACCOUNT}/grafana; npm install | |||||
@cd ${WRKSRC}/src/github.com/${GH_ACCOUNT}/grafana; \ | |||||
${WRKSRC}/src/github.com/${GH_ACCOUNT}/grafana/node_modules/grunt-cli/bin/grunt --force | |||||
do-install: | |||||
${INSTALL_PROGRAM} ${WRKSRC}/src/github.com/${GH_ACCOUNT}/grafana/bin/grafana \ | |||||
${STAGEDIR}${PREFIX}/bin/grafana | |||||
cd ${WRKSRC}/src/github.com/${GH_ACCOUNT}/grafana && \ | |||||
${COPYTREE_SHARE} public ${STAGEDIR}${PREFIX}/share/grafana | |||||
${MKDIR} ${STAGEDIR}${GRAFANAPIDDIR} | |||||
${MKDIR} ${STAGEDIR}${GRAFANALOGDIR} | |||||
${MKDIR} ${STAGEDIR}${GRAFANAHOMEDIR} | |||||
${MKDIR} ${STAGEDIR}${GRAFANADATADIR} | |||||
${MKDIR} ${STAGEDIR}${GRAFANAHOMEDIR}/conf | |||||
${INSTALL_DATA} ${WRKSRC}/src/github.com/${GH_ACCOUNT}/grafana/conf/defaults.ini \ | |||||
${STAGEDIR}${GRAFANAHOMEDIR}/conf/defaults.ini | |||||
${INSTALL_DATA} ${WRKDIR}/grafana.conf ${STAGEDIR}${PREFIX}/etc/grafana.conf | |||||
.include <bsd.port.pre.mk> | |||||
.if ${OPSYS} == FreeBSD && ${OSVERSION} < 900044 && ${ARCH} == i386 | |||||
BROKEN= Does not build | |||||
.endif | |||||
# golang assumes that if clang is in use, it is called "clang" and not "cc". If | |||||
# it's called "cc", go fails. | |||||
.if ${COMPILER_TYPE} == clang | |||||
BUILD_ENV= CC=clang | |||||
.endif | |||||
.include <bsd.port.post.mk> |