Gentoo Archives: gentoo-commits

From: Conrad Kostecki <conikost@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/samplicator/
Date: Sun, 11 Jul 2021 21:23:25
Message-Id: 1626038304.8f2532e3443c012480fae0b67da58a07fa9a90c0.conikost@gentoo
1 commit: 8f2532e3443c012480fae0b67da58a07fa9a90c0
2 Author: Conrad Kostecki <conikost <AT> gentoo <DOT> org>
3 AuthorDate: Sun Jul 11 20:54:34 2021 +0000
4 Commit: Conrad Kostecki <conikost <AT> gentoo <DOT> org>
5 CommitDate: Sun Jul 11 21:18:24 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8f2532e3
7
8 net-misc/samplicator: migrate to GLEP 81
9
10 Bug: https://bugs.gentoo.org/781431
11 Package-Manager: Portage-3.0.20, Repoman-3.0.3
12 Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org>
13
14 net-misc/samplicator/samplicator-1.3.6-r1.ebuild | 50 ++++++++++++++++++++
15 .../samplicator/samplicator-1.3.8_rc1-r1.ebuild | 54 ++++++++++++++++++++++
16 2 files changed, 104 insertions(+)
17
18 diff --git a/net-misc/samplicator/samplicator-1.3.6-r1.ebuild b/net-misc/samplicator/samplicator-1.3.6-r1.ebuild
19 new file mode 100644
20 index 00000000000..1d2a557d88d
21 --- /dev/null
22 +++ b/net-misc/samplicator/samplicator-1.3.6-r1.ebuild
23 @@ -0,0 +1,50 @@
24 +# Copyright 1999-2021 Gentoo Authors
25 +# Distributed under the terms of the GNU General Public License v2
26 +
27 +EAPI=7
28 +
29 +DESCRIPTION="UDP packets forwarder and duplicator"
30 +HOMEPAGE="https://github.com/sleinen/samplicator"
31 +SRC_URI="https://github.com/sleinen/${PN}/releases/download/v${PV}/${P}.tar.gz"
32 +
33 +LICENSE="Artistic GPL-2"
34 +SLOT="0"
35 +KEYWORDS="~amd64 ~x86"
36 +
37 +RDEPEND="
38 + acct-group/samplicator
39 + acct-user/samplicator
40 +"
41 +
42 +src_install() {
43 + # Install and copy documentation
44 + default
45 +
46 + # Install Gentoo init script and its config
47 + newinitd "${FILESDIR}"/${PN}.initd ${PN}
48 + newconfd "${FILESDIR}"/${PN}.confd ${PN}
49 +
50 + # Install manual page
51 + doman "${FILESDIR}"/${PN}.8
52 +}
53 +
54 +pkg_postinst() {
55 + ewarn ""
56 + ewarn "Don't specify the receiver on the command line, because it will get all packets."
57 + ewarn "Instead of this, specify it in a config file; defined in such way it will only get packets with a matching source."
58 + ewarn ""
59 +
60 + einfo "For every receiver type create a file in directory /etc/${PN} (see example below)"
61 + einfo "and specify the path to it in variable CONFIG of the corresponding initscript config file in /etc/conf.d/"
62 + einfo ""
63 + einfo "Receiver config examples: "
64 + einfo ""
65 + einfo " /etc/${PN}/netflow:"
66 + einfo " 10.0.0.0/255.0.0.0:1.1.1.1/9996 2.2.2.2/9996 3.3.3.3/9996"
67 + einfo ""
68 + einfo " /etc/${PN}/syslog:"
69 + einfo " 10.0.0.0/255.255.0.0:2.2.2.2/514 3.3.3.3/514"
70 + einfo ""
71 + einfo " /etc/${PN}/snmp:"
72 + einfo " 10.0.0.0/255.255.255.255:3.3.3.3/162"
73 +}
74
75 diff --git a/net-misc/samplicator/samplicator-1.3.8_rc1-r1.ebuild b/net-misc/samplicator/samplicator-1.3.8_rc1-r1.ebuild
76 new file mode 100644
77 index 00000000000..85d9445c3fa
78 --- /dev/null
79 +++ b/net-misc/samplicator/samplicator-1.3.8_rc1-r1.ebuild
80 @@ -0,0 +1,54 @@
81 +# Copyright 1999-2021 Gentoo Authors
82 +# Distributed under the terms of the GNU General Public License v2
83 +
84 +EAPI=7
85 +
86 +MY_PV="${PV/_/}"
87 +MY_P="${PN}-${MY_PV}"
88 +
89 +DESCRIPTION="UDP packets forwarder and duplicator"
90 +HOMEPAGE="https://github.com/sleinen/samplicator"
91 +SRC_URI="https://github.com/sleinen/${PN}/releases/download/${MY_PV}/${MY_P}.tar.gz"
92 +S="${WORKDIR}/${MY_P}"
93 +
94 +LICENSE="Artistic GPL-2"
95 +SLOT="0"
96 +KEYWORDS="~amd64 ~x86"
97 +
98 +RDEPEND="
99 + acct-group/samplicator
100 + acct-user/samplicator
101 +"
102 +
103 +src_install() {
104 + # Install and copy documentation
105 + default
106 +
107 + # Install Gentoo init script and its config
108 + newinitd "${FILESDIR}"/${PN}.initd ${PN}
109 + newconfd "${FILESDIR}"/${PN}.confd ${PN}
110 +
111 + # Install manual page
112 + doman "${FILESDIR}"/${PN}.8
113 +}
114 +
115 +pkg_postinst() {
116 + ewarn ""
117 + ewarn "Don't specify the receiver on the command line, because it will get all packets."
118 + ewarn "Instead of this, specify it in a config file; defined in such way it will only get packets with a matching source."
119 + ewarn ""
120 +
121 + einfo "For every receiver type create a file in directory /etc/${PN} (see example below)"
122 + einfo "and specify the path to it in variable CONFIG of the corresponding initscript config file in /etc/conf.d/"
123 + einfo ""
124 + einfo "Receiver config examples: "
125 + einfo ""
126 + einfo " /etc/${PN}/netflow:"
127 + einfo " 10.0.0.0/255.0.0.0:1.1.1.1/9996 2.2.2.2/9996 3.3.3.3/9996"
128 + einfo ""
129 + einfo " /etc/${PN}/syslog:"
130 + einfo " 10.0.0.0/255.255.0.0:2.2.2.2/514 3.3.3.3/514"
131 + einfo ""
132 + einfo " /etc/${PN}/snmp:"
133 + einfo " 10.0.0.0/255.255.255.255:3.3.3.3/162"
134 +}