Gentoo Archives: gentoo-commits

From: Randall Vasquez <ran.dall@××××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/guru:dev commit in: sys-apps/bat-extras/
Date: Sat, 30 Jul 2022 22:55:02
Message-Id: 1659221595.996f3f5b52bb35bbff7b3be4f9cd2b9627646043.ran.dall@gentoo
1 commit: 996f3f5b52bb35bbff7b3be4f9cd2b9627646043
2 Author: Randall T. Vasquez <ran.dall <AT> icloud <DOT> com>
3 AuthorDate: Sat Jul 30 22:42:30 2022 +0000
4 Commit: Randall Vasquez <ran.dall <AT> icloud <DOT> com>
5 CommitDate: Sat Jul 30 22:53:15 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=996f3f5b
7
8 sys-apps/bat-extras: add ebuilds
9
10 Signed-off-by: Randall T. Vasquez <ran.dall <AT> icloud.com>
11
12 sys-apps/bat-extras/Manifest | 1 +
13 sys-apps/bat-extras/bat-extras-2022.07.27.ebuild | 82 ++++++++++++++++++++++++
14 sys-apps/bat-extras/bat-extras-9999.ebuild | 82 ++++++++++++++++++++++++
15 sys-apps/bat-extras/metadata.xml | 14 ++++
16 4 files changed, 179 insertions(+)
17
18 diff --git a/sys-apps/bat-extras/Manifest b/sys-apps/bat-extras/Manifest
19 new file mode 100644
20 index 000000000..27c2a072c
21 --- /dev/null
22 +++ b/sys-apps/bat-extras/Manifest
23 @@ -0,0 +1 @@
24 +DIST bat-extras-2022.07.27.tar.gz 41647 BLAKE2B aa481520c49675c249b47b9b6a1f06c24928ccf6eb96a0b1b17d87364f43063d718cea61a8edaebca097a27c239e528bf8c10f93b7d09d92b374cbf720fc6481 SHA512 352edf8f5879239894a8defbac466e908f6235bf4a9c7a64622418f2bdbae9b364343fca54769f792025d2a87aeca52a356ee36c5733eee7fd641d8d5c8d995b
25
26 diff --git a/sys-apps/bat-extras/bat-extras-2022.07.27.ebuild b/sys-apps/bat-extras/bat-extras-2022.07.27.ebuild
27 new file mode 100644
28 index 000000000..682f571b7
29 --- /dev/null
30 +++ b/sys-apps/bat-extras/bat-extras-2022.07.27.ebuild
31 @@ -0,0 +1,82 @@
32 +# Copyright 2022 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=8
36 +
37 +DESCRIPTION="Bash scripts that integrate bat with various command line tools."
38 +HOMEPAGE="https://github.com/eth-p/bat-extras"
39 +if [[ ${PV} == *9999 ]]; then
40 + inherit git-r3
41 + EGIT_REPO_URI="https://github.com/eth-p/bat-extras.git"
42 + RESTRICT="mirror fetch"
43 +else
44 + SRC_URI="https://github.com/eth-p/bat-extras/archive/v${PV}.tar.gz -> ${P}.tar.gz"
45 + KEYWORDS="~amd64"
46 + RESTRICT="mirror test"
47 +fi
48 +
49 +LICENSE="MIT"
50 +SLOT="0"
51 +IUSE="+man"
52 +
53 +DEPEND="
54 + app-shells/bash
55 + sys-apps/bat
56 + dev-util/sh
57 +"
58 +RDEPEND="
59 + ${DEPEND}
60 + dev-vcs/git
61 + sys-apps/ripgrep
62 + app-admin/entr
63 + dev-util/git-delta
64 + sys-devel/clang
65 + sys-apps/exa
66 + app-shells/fzf
67 + sys-libs/ncurses
68 + dev-python/black
69 + virtual/rust[rustfmt(+)]
70 +"
71 +
72 +S="${WORKDIR}/${P}"
73 +
74 +src_unpack() {
75 + default
76 + if [[ ${PV} == *9999 ]]; then
77 + git-r3_checkout
78 + fi
79 +}
80 +
81 +src_prepare() {
82 + # remove license
83 + rm LICENSE.md || die
84 + # remove contribution document
85 + rm CONTRIBUTING.md || die
86 + default
87 +}
88 +
89 +src_compile() {
90 + if use man; then
91 + ./build.sh --compress --minify=all --manuals --no-verify || die "build failed"
92 + else
93 + ./build.sh --compress --minify=all --no-verify || die "build failed"
94 + fi
95 +}
96 +
97 +src_test() {
98 + ./test.sh || die "test failed"
99 +}
100 +
101 +src_install() {
102 + dobin bin/*
103 + if use man; then
104 + doman man/*
105 + fi
106 +}
107 +
108 +pkg_postinst() {
109 + einfo "To enable additional code formatting for 'prettybat' script, ensure"
110 + einfo "'net-libs/nodejs' is installed in your system, and use 'npm' to install"
111 + einfo "'prettier' (npm i -g prettier). Once 'prettier' is properly installed in"
112 + einfo "your system, remerge this pacakge."
113 +}
114
115 diff --git a/sys-apps/bat-extras/bat-extras-9999.ebuild b/sys-apps/bat-extras/bat-extras-9999.ebuild
116 new file mode 100644
117 index 000000000..682f571b7
118 --- /dev/null
119 +++ b/sys-apps/bat-extras/bat-extras-9999.ebuild
120 @@ -0,0 +1,82 @@
121 +# Copyright 2022 Gentoo Authors
122 +# Distributed under the terms of the GNU General Public License v2
123 +
124 +EAPI=8
125 +
126 +DESCRIPTION="Bash scripts that integrate bat with various command line tools."
127 +HOMEPAGE="https://github.com/eth-p/bat-extras"
128 +if [[ ${PV} == *9999 ]]; then
129 + inherit git-r3
130 + EGIT_REPO_URI="https://github.com/eth-p/bat-extras.git"
131 + RESTRICT="mirror fetch"
132 +else
133 + SRC_URI="https://github.com/eth-p/bat-extras/archive/v${PV}.tar.gz -> ${P}.tar.gz"
134 + KEYWORDS="~amd64"
135 + RESTRICT="mirror test"
136 +fi
137 +
138 +LICENSE="MIT"
139 +SLOT="0"
140 +IUSE="+man"
141 +
142 +DEPEND="
143 + app-shells/bash
144 + sys-apps/bat
145 + dev-util/sh
146 +"
147 +RDEPEND="
148 + ${DEPEND}
149 + dev-vcs/git
150 + sys-apps/ripgrep
151 + app-admin/entr
152 + dev-util/git-delta
153 + sys-devel/clang
154 + sys-apps/exa
155 + app-shells/fzf
156 + sys-libs/ncurses
157 + dev-python/black
158 + virtual/rust[rustfmt(+)]
159 +"
160 +
161 +S="${WORKDIR}/${P}"
162 +
163 +src_unpack() {
164 + default
165 + if [[ ${PV} == *9999 ]]; then
166 + git-r3_checkout
167 + fi
168 +}
169 +
170 +src_prepare() {
171 + # remove license
172 + rm LICENSE.md || die
173 + # remove contribution document
174 + rm CONTRIBUTING.md || die
175 + default
176 +}
177 +
178 +src_compile() {
179 + if use man; then
180 + ./build.sh --compress --minify=all --manuals --no-verify || die "build failed"
181 + else
182 + ./build.sh --compress --minify=all --no-verify || die "build failed"
183 + fi
184 +}
185 +
186 +src_test() {
187 + ./test.sh || die "test failed"
188 +}
189 +
190 +src_install() {
191 + dobin bin/*
192 + if use man; then
193 + doman man/*
194 + fi
195 +}
196 +
197 +pkg_postinst() {
198 + einfo "To enable additional code formatting for 'prettybat' script, ensure"
199 + einfo "'net-libs/nodejs' is installed in your system, and use 'npm' to install"
200 + einfo "'prettier' (npm i -g prettier). Once 'prettier' is properly installed in"
201 + einfo "your system, remerge this pacakge."
202 +}
203
204 diff --git a/sys-apps/bat-extras/metadata.xml b/sys-apps/bat-extras/metadata.xml
205 new file mode 100644
206 index 000000000..590860096
207 --- /dev/null
208 +++ b/sys-apps/bat-extras/metadata.xml
209 @@ -0,0 +1,14 @@
210 +<?xml version="1.0" encoding="utf-8"?>
211 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
212 +<pkgmetadata>
213 + <maintainer type="person">
214 + <email>ran.dall@××××××.com</email>
215 + <name>Randall Vasquez</name>
216 + </maintainer>
217 + <longdescription lang="en">
218 + Bash scripts that integrate bat with various command line tools.
219 + </longdescription>
220 + <upstream>
221 + <remote-id type="github">eth-p/bat-extras</remote-id>
222 + </upstream>
223 +</pkgmetadata>