Gentoo Archives: gentoo-commits

From: Marco Sirabella <marco@×××××××××.org>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/guru:dev commit in: sys-apps/nq/
Date: Fri, 16 Apr 2021 19:45:54
Message-Id: 1618602307.d61ecb8fb319dcbd085c52a1b64c1456aa6f9a65.marco@gentoo
1 commit: d61ecb8fb319dcbd085c52a1b64c1456aa6f9a65
2 Author: Marco Sirabella <marco <AT> sirabella <DOT> org>
3 AuthorDate: Fri Apr 16 18:15:18 2021 +0000
4 Commit: Marco Sirabella <marco <AT> sirabella <DOT> org>
5 CommitDate: Fri Apr 16 19:45:07 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=d61ecb8f
7
8 sys-apps/nq: Add new package
9
10 Currently shell implementations don't pass the tests, too minimal
11
12 Should the shell implementations even be included? I don't see why not,
13 as long as they're around
14
15 Came across this from https://news.ycombinator.com/item?id=25920517
16
17 Signed-off-by: Marco Sirabella <marco <AT> sirabella.org>
18
19 sys-apps/nq/Manifest | 1 +
20 sys-apps/nq/metadata.xml | 20 ++++++++++++++++++++
21 sys-apps/nq/nq-0.4.ebuild | 38 ++++++++++++++++++++++++++++++++++++++
22 3 files changed, 59 insertions(+)
23
24 diff --git a/sys-apps/nq/Manifest b/sys-apps/nq/Manifest
25 new file mode 100644
26 index 000000000..5f9ea0a1a
27 --- /dev/null
28 +++ b/sys-apps/nq/Manifest
29 @@ -0,0 +1 @@
30 +DIST nq-0.4.tar.gz 11976 BLAKE2B 2fa22bd0518e8eea09604db4bfb3c0c11583e8c812bb80697d4697afe30283ff878e367e5e42b0894a1a216ee3ce313f41a8f5d217dcc15a49a8b331d0ba9c3f SHA512 c4587c2074dd6e3d18d56a273b943b2594f6ea73912d774120706dbcb6a64e0b7a99c4da7283cbe0d3d47eb24fa246625e9180a88ee2e0cacc647de8c8606c38
31
32 diff --git a/sys-apps/nq/metadata.xml b/sys-apps/nq/metadata.xml
33 new file mode 100644
34 index 000000000..2cd03cdfe
35 --- /dev/null
36 +++ b/sys-apps/nq/metadata.xml
37 @@ -0,0 +1,20 @@
38 +<?xml version="1.0" encoding="UTF-8"?>
39 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
40 +<pkgmetadata>
41 + <maintainer type="person">
42 + <email>marco@×××××××××.org</email>
43 + <name>Marco Sirabella</name>
44 + </maintainer>
45 + <upstream>
46 + <remote-id type="github">leahneukirchen/nq</remote-id>
47 + <bugs-to>https://github.com/leahneukirchen/nq/issues</bugs-to>
48 + <changelog>https://git.vuxu.org/nq/plain/NEWS.md</changelog>
49 + </upstream>
50 + <longdescription lang="en">
51 + These small utilities allow creating very lightweight job queue systems which require no setup, maintenance, supervision, or any long-running processes.
52 + </longdescription>
53 + <use>
54 + <flag name="shell">Use shell implementation</flag>
55 + <flag name="tq">Install tq, a tmux &amp; screen wrapper</flag>
56 + </use>
57 +</pkgmetadata>
58
59 diff --git a/sys-apps/nq/nq-0.4.ebuild b/sys-apps/nq/nq-0.4.ebuild
60 new file mode 100644
61 index 000000000..64666b61b
62 --- /dev/null
63 +++ b/sys-apps/nq/nq-0.4.ebuild
64 @@ -0,0 +1,38 @@
65 +# Copyright 2021 Gentoo Authors
66 +# Distributed under the terms of the GNU General Public License v2
67 +
68 +EAPI=7
69 +
70 +DESCRIPTION="Unix command line queue utility"
71 +HOMEPAGE="https://git.vuxu.org/nq/about/"
72 +SRC_URI="https://git.vuxu.org/${PN}/snapshot/${P}.tar.gz"
73 +
74 +LICENSE="public-domain"
75 +SLOT="0"
76 +KEYWORDS="~amd64 ~x86"
77 +
78 +IUSE="-shell +tq test"
79 +RESTRICT="!test? ( test )"
80 +REQUIRED_USE="shell? ( !test )" # shell alternatives currently fail tests
81 +
82 +DEPEND=""
83 +RDEPEND="
84 + shell? ( sys-apps/util-linux sys-apps/coreutils )
85 + tq? ( || ( app-misc/tmux app-misc/screen ) )
86 +"
87 +BDEPEND="test? ( dev-lang/perl )"
88 +
89 +DOCS=( README.md NEWS.md )
90 +
91 +src_compile() {
92 + if use shell; then
93 + cp nq.sh nq
94 + cp fq.sh fq
95 + fi
96 + emake CFLAGS="${CFLAGS} -Wno-unused-result"
97 +}
98 +
99 +src_install() {
100 + emake DESTDIR="${D}" PREFIX=/usr ALL="nq fq $(usev tq)" install
101 + einstalldocs
102 +}