added cadvisor aur package files
This commit is contained in:
parent
7cf8cbf63a
commit
28594c470f
|
@ -0,0 +1,42 @@
|
||||||
|
#Maintainer: Iwan Timmer <irtimmer@gmail.com>
|
||||||
|
|
||||||
|
pkgname=cadvisor
|
||||||
|
pkgver=0.21.0
|
||||||
|
_pkgver=0.21.0
|
||||||
|
pkgrel=1
|
||||||
|
pkgdesc="Analyzes resource usage and performance characteristics of running containers."
|
||||||
|
depends=('glibc' 'bash')
|
||||||
|
makedepends=('go' 'rsync' 'godep')
|
||||||
|
arch=('x86_64' 'i686')
|
||||||
|
source=("https://github.com/google/cadvisor/archive/v$_pkgver.tar.gz"
|
||||||
|
"cadvisor.service"
|
||||||
|
"cadvisor.install")
|
||||||
|
url="https://github.com/google/cadvisor"
|
||||||
|
license=("APACHE")
|
||||||
|
install=cadvisor.install
|
||||||
|
|
||||||
|
sha512sums=('846d31d84970680f73337219caf0e71491e837c1c967a5ebd2db759805a153dc27cd9f9ce46657b8b9ba95d9e639cfac70f2a5304883e7a6a301609de9b066d2'
|
||||||
|
'14845b27151c1741e32c4d7cf87ef1474dbec50ad173cdc4c3053f91c3e80aa5ca98be490658dd60aeec66905cb4fa16405614b298767159df4262fbf1c48850'
|
||||||
|
'c55320053e34b10b2d94627cec62242e58fcee72c8cc7eb6efa083b1bc26bedf4ce79efe3fa49bf9e1648c3a1a7b8e9d7bcfce08aa002dc7bfd6c719ad73b5b0')
|
||||||
|
|
||||||
|
build() {
|
||||||
|
cd $srcdir/cadvisor-$_pkgver
|
||||||
|
|
||||||
|
mkdir -p Godeps/_workspace/src/github.com/google
|
||||||
|
ln -sfT ../../../../../ Godeps/_workspace/src/github.com/google/cadvisor
|
||||||
|
|
||||||
|
godep go build -o ${pkgname} .
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
cd $srcdir/cadvisor-$_pkgver
|
||||||
|
_build_path="${srcdir}/${pkgname}-${pkgver}"
|
||||||
|
|
||||||
|
mkdir -p "${pkgdir}/usr/bin"
|
||||||
|
|
||||||
|
install -pm 755 "${_build_path}/cadvisor" "${pkgdir}/usr/bin/cadvisor"
|
||||||
|
|
||||||
|
mkdir -p "${pkgdir}/usr/lib/systemd/system/"
|
||||||
|
|
||||||
|
install -pm 644 "${srcdir}/cadvisor.service" "${pkgdir}/usr/lib/systemd/system/cadvisor.service"
|
||||||
|
}
|
|
@ -0,0 +1,11 @@
|
||||||
|
post_install() {
|
||||||
|
systemctl daemon-reload
|
||||||
|
}
|
||||||
|
|
||||||
|
post_upgrade() {
|
||||||
|
post_install
|
||||||
|
}
|
||||||
|
|
||||||
|
post_remove() {
|
||||||
|
systemctl daemon-reload
|
||||||
|
}
|
|
@ -0,0 +1,31 @@
|
||||||
|
# Copyright 2014 Joukou Ltd
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
[Unit]
|
||||||
|
Description=cAdvisor
|
||||||
|
Documentation=https://github.com/google/cadvisor
|
||||||
|
After=network.target
|
||||||
|
After=machines.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
User=nobody
|
||||||
|
Group=nobody
|
||||||
|
Type=simple
|
||||||
|
|
||||||
|
Restart=on-failure
|
||||||
|
RestartSec=10s
|
||||||
|
|
||||||
|
ExecStart=/usr/bin/cadvisor -logtostderr
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
Loading…
Reference in New Issue