summaryrefslogtreecommitdiff
path: root/prometheus/Pkgfile
blob: 3095d90a2ab41835e30d4a3b132134ec55bf6df1 (plain)
    1 # Description: an open-source systems monitoring and alerting toolkit
    2 # URL: https://prometheus.io
    3 # Maintainer: Tim Biermann, tbier at posteo dot de
    4 # Depends on: go typescript yamllint yarn
    5 
    6 name=prometheus
    7 version=2.40.4
    8 release=1
    9 source=(https://github.com/prometheus/prometheus/archive/v$version/$name-$version.tar.gz
   10   prometheus.conf prometheus.service)
   11 
   12 build() {
   13   # setup build env {{{
   14   ## Node Setup
   15   export NPM_CONFIG_PREFIX="$SRC/npm"
   16   export PATH+=":$NPM_CONFIG_PREFIX/bin"
   17 
   18   ## Go Setup
   19   export CGO_LDFLAGS="${LDFLAGS}"
   20   export CGO_CPPFLAGS="${CPPFLAGS}"
   21   export CGO_CFLAGS="${CFLAGS}"
   22   export CGO_CXXFLAGS="${CXXFLAGS}"
   23   export GOFLAGS="-buildmode=pie -trimpath -modcacherw"
   24 
   25   mkdir "$PKGMK_SOURCE_DIR/gopath" || true
   26   export GOPATH="$PKGMK_SOURCE_DIR/gopath"
   27 
   28   LDFLAGS="-X github.com/prometheus/common/version.Version=$version \
   29     -X github.com/prometheus/common/version.Revision=CRUX \
   30     -X github.com/prometheus/common/version.Branch=master \
   31     -X github.com/prometheus/common/version.BuildUser=$USER@$HOSTNAME \
   32     -X github.com/prometheus/common/version.BuildDate=$(date -u +%Y%m%d-%H:%M:%S)"
   33   # }}}
   34   cd $name-$version
   35 
   36   make build -j1
   37 
   38   install -Dm755 -t $PKG/usr/bin prometheus promtool
   39   install -Dm640 -g prometheus -t $PKG/etc/prometheus documentation/examples/prometheus.yml
   40   install -dm750 -o prometheus -g prometheus $PKG/var/lib/prometheus
   41   install -dm755 $PKG/usr/share/prometheus/web/ui
   42   cp -R web/ui/static $PKG/usr/share/prometheus/web/ui/
   43 
   44   install -Dm644 $SRC/prometheus.conf $PKG/etc/conf.d/prometheus
   45   install -Dm 755 $SRC/prometheus.service $PKG/etc/rc.d/prometheus
   46 }
   47 
   48 # vim: foldmethod=marker foldlevelstart=1

Generated by cgit