mirror of
https://github.com/gentoo-mirror/guru.git
synced 2025-04-10 12:08:43 -04:00
sys-apps/colortail: new package, add 0.3.3, 9999
Signed-off-by: Aidan Harris <me@aidanharr.is>
This commit is contained in:
parent
552083bce5
commit
528ff4dd27
1
sys-apps/colortail/Manifest
Normal file
1
sys-apps/colortail/Manifest
Normal file
@ -0,0 +1 @@
|
||||
DIST colortail-0.3.3.tar.gz 97399 BLAKE2B 1aa0f69b56226c1a7966704d3fbe9c7bb1affde78b6926e2c8e69f76e54c1b3a412e5e03d0375c37ce10e6e2042f4ee73f20d9ad38be5e6b1965a059f830ce41 SHA512 0fc8b9001562e4080110fdfb2b3b2ef269618445314a816d8a020b7a6380843644a988ab45cf375856015b4b9e09b873b5b7f0540b25f7fa61008efbd5e1fe9b
|
39
sys-apps/colortail/colortail-0.3.3.ebuild
Normal file
39
sys-apps/colortail/colortail-0.3.3.ebuild
Normal file
@ -0,0 +1,39 @@
|
||||
# Copyright 2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
DESCRIPTION="tail command with colors"
|
||||
HOMEPAGE="https://github.com/joakim666/colortail"
|
||||
|
||||
SRC_URI="https://github.com/joakim666/colortail/releases/download/${PV}/${P}.tar.gz"
|
||||
|
||||
inherit autotools
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/01_colorize_default.patch
|
||||
"${FILESDIR}"/02_adding_option.patch
|
||||
)
|
||||
|
||||
DOCS=(TODO README ChangeLog BUGS AUTHORS example-conf/conf.{daemon,kernel,messages,secure,xferlog} )
|
||||
|
||||
src_prepare() {
|
||||
eautoreconf
|
||||
default
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake install DESTDIR="${ED}" || die
|
||||
doman "${FILESDIR}/${PN}.1"
|
||||
dodoc ${DOCS[@]}
|
||||
insinto /etc/colortail
|
||||
newins example-conf/conf.messages conf.colortail
|
||||
}
|
38
sys-apps/colortail/colortail-9999.ebuild
Normal file
38
sys-apps/colortail/colortail-9999.ebuild
Normal file
@ -0,0 +1,38 @@
|
||||
# Copyright 2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
DESCRIPTION="tail command with colors"
|
||||
HOMEPAGE="https://github.com/joakim666/colortail"
|
||||
|
||||
EGIT_REPO_URI="https://github.com/joakim666/colortail.git"
|
||||
|
||||
inherit git-r3 autotools
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS=""
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/02_adding_option.patch
|
||||
)
|
||||
|
||||
DOCS=(TODO README ChangeLog BUGS AUTHORS example-conf/conf.{daemon,kernel,messages,secure,xferlog} )
|
||||
|
||||
src_prepare() {
|
||||
eautoreconf
|
||||
default
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake install DESTDIR="${ED}" || die
|
||||
doman "${FILESDIR}/${PN}.1"
|
||||
dodoc ${DOCS[@]}
|
||||
insinto /etc/colortail
|
||||
newins example-conf/conf.messages conf.colortail
|
||||
}
|
46
sys-apps/colortail/files/01_colorize_default.patch
Normal file
46
sys-apps/colortail/files/01_colorize_default.patch
Normal file
@ -0,0 +1,46 @@
|
||||
Patch to use /etc/colortail/conf.colortail by default to colorizer
|
||||
without the option -k
|
||||
Index: colortail-0.3.2/ColorTail.cc
|
||||
===================================================================
|
||||
--- colortail-0.3.2.orig/ColorTail.cc 2010-01-02 13:13:03.000000000 -0500
|
||||
+++ colortail-0.3.2/ColorTail.cc 2010-01-02 13:17:31.000000000 -0500
|
||||
@@ -20,6 +20,8 @@
|
||||
#include <iostream>
|
||||
#include <assert.h>
|
||||
#include <unistd.h>
|
||||
+#include <string.h>
|
||||
+#include <stdio.h>
|
||||
|
||||
#include "ColorTail.h"
|
||||
#include "TailFile.h"
|
||||
@@ -102,9 +104,14 @@
|
||||
{
|
||||
// no config file
|
||||
// print error
|
||||
- cout << "colortail: Couldn't open global color config file. Skipping colors for the " << argv[i] << " file." << endl;
|
||||
+ //cout << "colortail: Couldn't open global color config file. Skipping colors for the " << argv[i] << " file." << endl;
|
||||
// open the tailfile without colorizer
|
||||
- new_tailfile->open(argv[i], NULL);
|
||||
+ //new_tailfile->open(argv[i], NULL);
|
||||
+ string cade = "/etc/colortail/conf.colortail";
|
||||
+ char* ccade = new char[cade.length()+1];
|
||||
+ strcpy(ccade, cade.c_str());
|
||||
+ colorizer = new Colorizer(ccade);
|
||||
+ new_tailfile->open(argv[i], colorizer);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -126,7 +133,12 @@
|
||||
// no config file
|
||||
// no error message because it can be cfgfile1,,cfgfile2
|
||||
// open the tailfile without colorizer
|
||||
- new_tailfile->open(argv[i], NULL);
|
||||
+ //new_tailfile->open(argv[i], NULL);
|
||||
+ string cade = "/etc/colortail/conf.colortail";
|
||||
+ char* ccade = new char[cade.length()+1];
|
||||
+ strcpy(ccade, cade.c_str());
|
||||
+ colorizer = new Colorizer(ccade);
|
||||
+ new_tailfile->open(argv[i], colorizer);
|
||||
}
|
||||
}
|
||||
}
|
13
sys-apps/colortail/files/02_adding_option.patch
Normal file
13
sys-apps/colortail/files/02_adding_option.patch
Normal file
@ -0,0 +1,13 @@
|
||||
Patch to show the option -l to display without colors.
|
||||
Index: colortail-0.3.2/Usage.cc
|
||||
===================================================================
|
||||
--- colortail-0.3.2.orig/Usage.cc 2010-01-02 13:22:27.000000000 -0500
|
||||
+++ colortail-0.3.2/Usage.cc 2010-01-02 13:24:43.000000000 -0500
|
||||
@@ -46,6 +46,7 @@
|
||||
cout << "\t\t\t\tIf only one config file it's global otherwise" << endl;
|
||||
cout << "\t\t\t\tone config file for each tail file" << endl;
|
||||
cout << " -n, --lines=N\t\t\toutput the last N lines, instead of last 10" << endl;
|
||||
+ cout << " -l \t\t\t\tdisplay without colors" << endl;
|
||||
cout << " -q, --quiet, --silent\t\tnever output headers giving file names" << endl;
|
||||
cout << " -v, --version\t\t\toutput version information and exit" << endl;
|
||||
cout << endl;
|
64
sys-apps/colortail/files/colortail.1
Normal file
64
sys-apps/colortail/files/colortail.1
Normal file
@ -0,0 +1,64 @@
|
||||
.\" Hey, EMACS: -*- nroff -*-
|
||||
.\" First parameter, NAME, should be all caps
|
||||
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
|
||||
.\" other parameters are allowed: see man(7), man(1)
|
||||
.TH COLORTAIL 1 "January 2, 2010"
|
||||
.\" Please adjust this date whenever revising the manpage.
|
||||
.\"
|
||||
.\" Some roff macros, for reference:
|
||||
.\" .nh disable hyphenation
|
||||
.\" .hy enable hyphenation
|
||||
.\" .ad l left justify
|
||||
.\" .ad b justify to both left and right margins
|
||||
.\" .nf disable filling
|
||||
.\" .fi enable filling
|
||||
.\" .br insert line break
|
||||
.\" .sp <n> insert n+1 empty lines
|
||||
.\" for manpage-specific macros, see man(7)
|
||||
.SH NAME
|
||||
colortail \- log colorizer that makes log checking easier
|
||||
.SH SYNOPSIS
|
||||
.B colortail
|
||||
.RI [ options ] [file...]
|
||||
.br
|
||||
.SH DESCRIPTION
|
||||
This manual page documents briefly the
|
||||
.B colortail
|
||||
commands.
|
||||
.PP
|
||||
.\" TeX users may be more comfortable with the \fB<whatever>\fP and
|
||||
.\" \fI<whatever>\fP escape sequences to invode bold face and italics,
|
||||
.\" respectively.
|
||||
\fBcolortail\fP is basically tail but with support for colors. With the help of color
|
||||
config files you define what part of the output to print in which color.
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
.B \-h, \-\-help
|
||||
Show summary of options.
|
||||
.TP
|
||||
.B \-f, \-\-follow
|
||||
Output appended data as the file grows.
|
||||
.TP
|
||||
.B \-k, \-\-config=file
|
||||
.B \-\-config=file1,file2,...
|
||||
Color config files for the tail files. If only one config file it's global
|
||||
otherwise one config file for each tail file.
|
||||
.TP
|
||||
.B \-n, \-\-lines=N
|
||||
Output the last N lines, instead of last 10.
|
||||
.TP
|
||||
.B \-l
|
||||
Display without colors.
|
||||
.TP
|
||||
.B \-q, \-\-quiet, \-\-silent
|
||||
Never output headers giving file names.
|
||||
.TP
|
||||
.B \-v, \-\-version
|
||||
Output version information and exit.
|
||||
.TP
|
||||
.br
|
||||
.SH AUTHOR
|
||||
colortail was written by Joakim Andersson <ja@joakimandersson.se> Copyright (C) 2009
|
||||
.PP
|
||||
This manual page was written by Elías Alejandro Año Mendoza <ealmdz@gmail.com>,
|
||||
for the Debian project (and may be used by others).
|
12
sys-apps/colortail/metadata.xml
Normal file
12
sys-apps/colortail/metadata.xml
Normal file
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
<email>me@aidanharr.is</email>
|
||||
<name>Aidan Harris</name>
|
||||
</maintainer>
|
||||
<upstream>
|
||||
<remote-id type="github">joakim666/colortail</remote-id>
|
||||
</upstream>
|
||||
|
||||
</pkgmetadata>
|
Loading…
x
Reference in New Issue
Block a user