Skip to content

Commit

Permalink
app-admin/mtail: add package
Browse files Browse the repository at this point in the history
Package-Manager: portage-2.3.2
  • Loading branch information
zmedico committed Nov 29, 2016
1 parent acc27f8 commit eac7a87
Show file tree
Hide file tree
Showing 3 changed files with 113 additions and 0 deletions.
8 changes: 8 additions & 0 deletions app-admin/mtail/Manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
DIST afero-06b7e5f50606ecd49148a01a6008942d9b669217.tar.gz 40613 SHA256 180f45eb539726a14f04d9ce7d8ceebd782d20ff92d722df565bc4bc2bd92716 SHA512 eb97a0983ba2c8c063ce0f1e8f907095b10b5c2a06730acfe54a9835f8eacba2e5e1db3a1a9438d907c67b507c5a66056a6de22d86405d6b294c51b2543ba355 WHIRLPOOL f46931900bd3631c218e638e8512a249c0ae29f89bfd9637677de6afd8bcd95366c02e64865f4046f2238cc2663d1d2e35282f1845de14d6f460cb9a09b28414
DIST go-fsnotify-1.4.2.tar.gz 29552 SHA256 4a1fd9beeb0496b9cf6084ac83654ece19188e9b2ffa041652d1071d4b225415 SHA512 fe76ac5f0fac2075a5436a726628ed9abf9a8668482c3b599977cf6167fc1334af738a907ce5bd627fa6b5ff4c4f4ac7dd7515b5f2892e74f32869b2a6c79944 WHIRLPOOL 99f79328c495702d3695a807aa59205eecc821f9f87d4fd2749c138aed9edcaec51f3d6178db0e731c9185b8b4d88796b3f049d6faebadacccc66ddbfe1577d1
DIST go-glog-23def4e6c14b4da8ac2ed8007337bc5eb5007998.tar.gz 19688 SHA256 ef225f77e38c3f071656a5bc529d7a66585e2ebc2b6149fa2bd4de1fb1ddacd6 SHA512 e9e70cf2a2d74ca813d0cadc23d213a1112ca4d1167abb63d8e0929585fca90c3a5bab1f49db20095c48bf1fe03b4424353c33728d09a201334eb65770888dc5 WHIRLPOOL a37d452661d3bcb35ceda79c1361a61a57ffa009a710f178f3ca1e57f99bd6255af70807a110f5a51cb50aced14519d1ca158fbfef92e582ffae2dfaab2e0e54
DIST go-sys-30237cf4eefd639b184d1f2cb77a581ea0be8947.tar.gz 623731 SHA256 ad7d8aada5ae87a3cfbadb53aa61a1f02ad38d4bf4c3b85c6d68bee7570baab3 SHA512 a2cc30c19e05fa16e800679da933d842cc49e770e642ae8e49939a660fefe795069b5136a4d2b5fd4c094fd660e90f73a98d17c86503218c4f2f5c76fddf6722 WHIRLPOOL 057927a62e9c2bd7f859d78e9b586721927b17e224a22e36a725e6d32b497df3c4c1fa66f6094dbd6b46e2f19ca08117cd8bc6fdda6a0570204acc8a08645810
DIST go-text-b01949dc0793a9af5e4cb3fce4d42999e76e8ca1.tar.gz 4521690 SHA256 7fe75acc63adb4ed62d8282ea0330efdece30630ecc1b9db14835c69bbf23136 SHA512 ac03833a836a4443a0f27a3bdb8701ca97bfed9a158b7f0a8fd78cf99325a10155cef0426c7a722abd739768a1a15e7e82f96690469aeb887743b5fcf37c3854 WHIRLPOOL f1edd92ab5be57dafa8c25b512863144f3b1c1014fa5a388e537e2f60f0abc467072524943ac2f37dffd3cd0f8f09ed484a089c08b172357e3a1e577a008887c
DIST go-tools-76b6c242fbd3fa734fbfe26a653f14fd495cb03a.tar.gz 2195990 SHA256 9dbf9a4ea96b6d1c998bf2c3f088edf58b52aae19fda703c7da97454f1e29540 SHA512 397fcf06e4cedaa16de5009ba6b4a29cf2eeaacf3490e04fad265610ddf2159310e8cfd0661b3d75fc34ad1252c165cf490e61164de5dfd9ecd3cdd4e058f40a WHIRLPOOL 864fb2897681f89f4850ac4ae08528fbea0ac8fa00c2dc1402bb72937a855304e530bb8206aca3588317b156df7900abaaeae1e064bbaa41a9ef1a43067586e3
DIST godebug-d99083b96f422f8fd5a93bc02040acec769e178f.tar.gz 14683 SHA256 9945619cab949985701146582a58c929cb83dc4bf4de1192546f4f571b45f343 SHA512 8eb131c6aecf7d5691b2d35c53acd08b842735b029b6115bccc0e96a7a7441328603d618f810d1fe740254c71a1f01fcd3e7b2e85fbbb2c3eb9ec3ec9177bb1d WHIRLPOOL 8e87d36428eacdc89cce4f250c21e0ccd5df8b0d13e75b24386ea0b566501a83d82682d29894e73affee95bebe794a7781b0d1bb8c8545f63e02b4571943cd1d
DIST mtail-0_pre20161108.tar.gz 382393 SHA256 ad2af0b87ec94be80c4d2291efa95c992f9464afb26dc759943ee494f0d7f47b SHA512 5eb60f57bf267730ec01a07d8bac1abb4b9454610ce52c8ab2acc59a04e36442cc4b570778f9a0eb249d3a85f21cacdc70cce203b28e57f84ab2ef533a5bc2df WHIRLPOOL 87f6bff48916ea9e289a144967ba8daff75a29fa8a1290b564df7d58c30735bdb9f7588fdcb22ad3fc3ab32b8129625270734dcb77876569119185c68daf5636
10 changes: 10 additions & 0 deletions app-admin/mtail/metadata.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>[email protected]</email>
</maintainer>
<upstream>
<remote-id type="github">google/mtail</remote-id>
</upstream>
</pkgmetadata>
95 changes: 95 additions & 0 deletions app-admin/mtail/mtail-0_pre20161108.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

EAPI=6

KEYWORDS="~amd64"
EGO_PN=github.com/google/mtail
EGIT_COMMIT=a780a6342bd70a8fb8ffe187ef988d5417d43a96
SRC_URI="https://${EGO_PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz
https://github.com/spf13/afero/archive/06b7e5f50606ecd49148a01a6008942d9b669217.tar.gz -> afero-06b7e5f50606ecd49148a01a6008942d9b669217.tar.gz
https://github.com/golang/glog/archive/23def4e6c14b4da8ac2ed8007337bc5eb5007998.tar.gz -> go-glog-23def4e6c14b4da8ac2ed8007337bc5eb5007998.tar.gz
https://github.com/fsnotify/fsnotify/archive/v1.4.2.tar.gz -> go-fsnotify-1.4.2.tar.gz
https://github.com/golang/tools/archive/76b6c242fbd3fa734fbfe26a653f14fd495cb03a.tar.gz -> go-tools-76b6c242fbd3fa734fbfe26a653f14fd495cb03a.tar.gz
https://github.com/golang/sys/archive/30237cf4eefd639b184d1f2cb77a581ea0be8947.tar.gz -> go-sys-30237cf4eefd639b184d1f2cb77a581ea0be8947.tar.gz
https://github.com/golang/text/archive/b01949dc0793a9af5e4cb3fce4d42999e76e8ca1.tar.gz -> go-text-b01949dc0793a9af5e4cb3fce4d42999e76e8ca1.tar.gz
test? (
https://github.com/kylelemons/godebug/archive/d99083b96f422f8fd5a93bc02040acec769e178f.tar.gz -> godebug-d99083b96f422f8fd5a93bc02040acec769e178f.tar.gz
)"
DESCRIPTION="A tool for extracting metrics from application logs"
HOMEPAGE="https://${EGO_PN}/"
LICENSE="Apache-2.0"
SLOT="0"
IUSE="test"
DEPEND=">=dev-lang/go-1.6:="
RDEPEND=""

get_archive_go_package() {
local archive=${1} uri x
for x in ${SRC_URI}; do
if [[ ${x} == http* ]]; then
uri=${x}
elif [[ ${x} == ${archive} ]]; then
break
fi
done
uri=${uri#https://}
uri=${uri%/archive/*}
case ${uri} in
github.com/fsnotify/fsnotify)
echo "gopkg.in/fsnotify.v1|fsnotify-*"
;;
github.com/golang/glog)
echo "${uri}|${uri##*/}-*"
;;
github.com/golang/*)
echo "golang.org/x/${uri##*/}|${uri##*/}-*"
;;
*)
echo "${uri}|${uri##*/}-*"
;;
esac
}

unpack_go_packages() {
local go_package x
# Unpack packages to appropriate locations for GOPATH
for x in ${A}; do
unpack ${x}
if [[ ${x} == *.tar.gz ]]; then
go_package=$(get_archive_go_package ${x})
x=${go_package#*|}
go_package=${go_package%|*}
mkdir -p src/${go_package%/*}
mv ${x} src/${go_package} || die
fi
done
}

src_unpack() {
mkdir "${S}" || die
cd "${S}" || die
unpack_go_packages
}

src_prepare() {
default
sed '/^[[:space:]]*go get .*/d' -i "${S}/src/${EGO_PN}/Makefile" || die
}

src_compile() {
export GOPATH="${S}"
go install -v -work -x ${EGO_BUILD_FLAGS} "golang.org/x/tools/cmd/goyacc" || die
PATH=${S}/bin:${PATH} emake -C "${S}/src/${EGO_PN}"
}

src_test() {
cd "${S}/src/${EGO_PN}" || die
default
}

src_install() {
dobin bin/mtail
dodoc "${S}/src/${EGO_PN}/"{CONTRIBUTING.md,README.md,TODO}
}

0 comments on commit eac7a87

Please sign in to comment.