#Maintainer: Iwan Timmer 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' '79d5c363041bedac16547033ea0abb1ae15edf0eb1e96779cbb3747666cf1b0cdaaa603fb76b8cb6324a17e6f36239173afda3def3eee47433dec74a72bd8a90' '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" }