Gentoo Archives: gentoo-commits

From: Alessandro Barbieri <lssndrbarbieri@×××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/guru:dev commit in: sys-cluster/genders/
Date: Sat, 29 Feb 2020 02:55:01
Message-Id: 1582944848.ec140108b2ebb3febb9b333cbea294953fd6a8df.Alessandro-Barbieri@gentoo
1 commit: ec140108b2ebb3febb9b333cbea294953fd6a8df
2 Author: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
3 AuthorDate: Sat Feb 29 02:54:08 2020 +0000
4 Commit: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
5 CommitDate: Sat Feb 29 02:54:08 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=ec140108
7
8 sys-cluster/genders: new package
9
10 Package-Manager: Portage-2.3.89, Repoman-2.3.20
11 Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>
12
13 sys-cluster/genders/Manifest | 1 +
14 sys-cluster/genders/genders-1.27.3.ebuild | 108 ++++++++++++++++++++++++++++++
15 sys-cluster/genders/genders-9999.ebuild | 108 ++++++++++++++++++++++++++++++
16 sys-cluster/genders/metadata.xml | 12 ++++
17 4 files changed, 229 insertions(+)
18
19 diff --git a/sys-cluster/genders/Manifest b/sys-cluster/genders/Manifest
20 new file mode 100644
21 index 0000000..c106669
22 --- /dev/null
23 +++ b/sys-cluster/genders/Manifest
24 @@ -0,0 +1 @@
25 +DIST genders-1-27-3.tar.gz 1142250 BLAKE2B 49a9d0c6351c6c403bdcffa2019f14fe0142deae3331a045a54855a280f34625c6c8f78b2c517a34d0bde5d37dc59aedd16672fa7cc10c5bd4b5b7852445abae SHA512 a97bc9ebc8c167cf1aebade41fd3097e34ea27f4009bcc027e50d2dc354beb6e13d6eff1d8b8a334b6993f4396c8eba2ca4cd1e29d3dc6536086c2798a6d6751
26
27 diff --git a/sys-cluster/genders/genders-1.27.3.ebuild b/sys-cluster/genders/genders-1.27.3.ebuild
28 new file mode 100644
29 index 0000000..3d13ce4
30 --- /dev/null
31 +++ b/sys-cluster/genders/genders-1.27.3.ebuild
32 @@ -0,0 +1,108 @@
33 +# Copyright 1999-2020 Gentoo Authors
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI=7
37 +
38 +PYTHON_COMPAT=( python3_{6,7} )
39 +DISTUTILS_USE_SETUPTOOLS=no
40 +
41 +inherit autotools distutils-r1 perl-module java-pkg-opt-2
42 +
43 +case "${PV}" in
44 +9999)
45 + SRC_URI=""
46 + EGIT_REPO_URI="https://github.com/chaos/${PN}.git"
47 + inherit git-r3
48 + KEYWORDS=""
49 + ;;
50 +*)
51 + MY_PV="$(ver_rs 1-2 -)"
52 + MY_P="${PN}-${MY_PV}"
53 + SRC_URI="https://github.com/chaos/${PN}/archive/${MY_P}.tar.gz"
54 + KEYWORDS="~amd64"
55 + S="${WORKDIR}/${PN}-${MY_P}"
56 + ;;
57 +esac
58 +
59 +DESCRIPTION="Genders is a static cluster configuration database used for cluster configuration management."
60 +HOMEPAGE="https://github.com/chaos/genders"
61 +LICENSE="GPL-2"
62 +SLOT="0"
63 +IUSE="cxx java perl python"
64 +
65 +CDEPEND="
66 + perl? ( dev-lang/perl:= )
67 + python? ( ${PYTHON_DEPS} )
68 +"
69 +DEPEND="
70 + ${CDEPEND}
71 + java? ( virtual/jdk:1.8 )
72 +
73 +"
74 +
75 +RDEPEND="
76 + ${DEPEND}
77 + java? ( virtual/jre:1.8 )
78 +"
79 +REQUIRED_USE="
80 + python? ( ${PYTHON_REQUIRED_USE} )
81 +"
82 +
83 +src_prepare() {
84 + sed -i "s|perl python||" src/extensions/Makefile.am
85 + sed -i "s|\$(DESTDIR)\$(docdir)-\$(VERSION)-javadoc|\$(DESTDIR)\$(docdir)/html/javadoc|" src/extensions/java/Makefile.am
86 + eapply_user
87 + ./autogen.sh
88 +}
89 +
90 +src_configure() {
91 + use java && append-cflags "-I${S}/src/libgenders"
92 + use java && append-cflags "$(java-pkg_get-jni-cflags)"
93 +
94 + local myconf="(
95 + --disable-static
96 + --with-non-shortened-hostnames
97 + $(use_with cxx cplusplus-extensions)
98 + $(use_with java java-extensions)
99 + $(use_with perl perl-extensions)
100 + $(use_with python python-extensions)
101 + )"
102 + econf "${myconf[@]}"
103 +}
104 +
105 +src_compile() {
106 + default
107 +
108 + if use perl ; then
109 + cd "${S}/src/extensions/perl"
110 + perl-module_src_configure
111 + perl-module_src_compile
112 + fi
113 +
114 + if use python; then
115 + cd "${S}/src/extensions/python"
116 + cp genderssetup.py setup.py
117 + distutils-r1_src_compile
118 + fi
119 +}
120 +
121 +src_install() {
122 + default
123 + dodoc README TUTORIAL NEWS
124 +
125 + if use perl ; then
126 + cd "${S}/src/extensions/perl"
127 + myinst=( DESTDIR="${D}" )
128 + perl-module_src_install
129 + fi
130 +
131 + if use python; then
132 + cd "${S}/src/extensions/python"
133 + python_install() {
134 + distutils-r1_python_install
135 + }
136 + distutils-r1_src_install
137 + fi
138 +
139 + find "${ED}" -name '*.la' -delete || die
140 +}
141
142 diff --git a/sys-cluster/genders/genders-9999.ebuild b/sys-cluster/genders/genders-9999.ebuild
143 new file mode 100644
144 index 0000000..3d13ce4
145 --- /dev/null
146 +++ b/sys-cluster/genders/genders-9999.ebuild
147 @@ -0,0 +1,108 @@
148 +# Copyright 1999-2020 Gentoo Authors
149 +# Distributed under the terms of the GNU General Public License v2
150 +
151 +EAPI=7
152 +
153 +PYTHON_COMPAT=( python3_{6,7} )
154 +DISTUTILS_USE_SETUPTOOLS=no
155 +
156 +inherit autotools distutils-r1 perl-module java-pkg-opt-2
157 +
158 +case "${PV}" in
159 +9999)
160 + SRC_URI=""
161 + EGIT_REPO_URI="https://github.com/chaos/${PN}.git"
162 + inherit git-r3
163 + KEYWORDS=""
164 + ;;
165 +*)
166 + MY_PV="$(ver_rs 1-2 -)"
167 + MY_P="${PN}-${MY_PV}"
168 + SRC_URI="https://github.com/chaos/${PN}/archive/${MY_P}.tar.gz"
169 + KEYWORDS="~amd64"
170 + S="${WORKDIR}/${PN}-${MY_P}"
171 + ;;
172 +esac
173 +
174 +DESCRIPTION="Genders is a static cluster configuration database used for cluster configuration management."
175 +HOMEPAGE="https://github.com/chaos/genders"
176 +LICENSE="GPL-2"
177 +SLOT="0"
178 +IUSE="cxx java perl python"
179 +
180 +CDEPEND="
181 + perl? ( dev-lang/perl:= )
182 + python? ( ${PYTHON_DEPS} )
183 +"
184 +DEPEND="
185 + ${CDEPEND}
186 + java? ( virtual/jdk:1.8 )
187 +
188 +"
189 +
190 +RDEPEND="
191 + ${DEPEND}
192 + java? ( virtual/jre:1.8 )
193 +"
194 +REQUIRED_USE="
195 + python? ( ${PYTHON_REQUIRED_USE} )
196 +"
197 +
198 +src_prepare() {
199 + sed -i "s|perl python||" src/extensions/Makefile.am
200 + sed -i "s|\$(DESTDIR)\$(docdir)-\$(VERSION)-javadoc|\$(DESTDIR)\$(docdir)/html/javadoc|" src/extensions/java/Makefile.am
201 + eapply_user
202 + ./autogen.sh
203 +}
204 +
205 +src_configure() {
206 + use java && append-cflags "-I${S}/src/libgenders"
207 + use java && append-cflags "$(java-pkg_get-jni-cflags)"
208 +
209 + local myconf="(
210 + --disable-static
211 + --with-non-shortened-hostnames
212 + $(use_with cxx cplusplus-extensions)
213 + $(use_with java java-extensions)
214 + $(use_with perl perl-extensions)
215 + $(use_with python python-extensions)
216 + )"
217 + econf "${myconf[@]}"
218 +}
219 +
220 +src_compile() {
221 + default
222 +
223 + if use perl ; then
224 + cd "${S}/src/extensions/perl"
225 + perl-module_src_configure
226 + perl-module_src_compile
227 + fi
228 +
229 + if use python; then
230 + cd "${S}/src/extensions/python"
231 + cp genderssetup.py setup.py
232 + distutils-r1_src_compile
233 + fi
234 +}
235 +
236 +src_install() {
237 + default
238 + dodoc README TUTORIAL NEWS
239 +
240 + if use perl ; then
241 + cd "${S}/src/extensions/perl"
242 + myinst=( DESTDIR="${D}" )
243 + perl-module_src_install
244 + fi
245 +
246 + if use python; then
247 + cd "${S}/src/extensions/python"
248 + python_install() {
249 + distutils-r1_python_install
250 + }
251 + distutils-r1_src_install
252 + fi
253 +
254 + find "${ED}" -name '*.la' -delete || die
255 +}
256
257 diff --git a/sys-cluster/genders/metadata.xml b/sys-cluster/genders/metadata.xml
258 new file mode 100644
259 index 0000000..1ac907d
260 --- /dev/null
261 +++ b/sys-cluster/genders/metadata.xml
262 @@ -0,0 +1,12 @@
263 +<?xml version="1.0" encoding="UTF-8"?>
264 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
265 +<pkgmetadata>
266 + <maintainer type="person">
267 + <email>lssndrbarbieri@×××××.com</email>
268 + <name>Alessandro Barbieri</name>
269 + </maintainer>
270 + <upstream>
271 + <remote-id type="github">chaos/genders</remote-id>
272 + </upstream>
273 + <longdescription>Genders is a static cluster configuration database used for cluster configuration management. It is used by a variety of tools and scripts for management of large clusters. The genders database is typically replicated on every node of the cluster. It describes the layout and configuration of the cluster so that tools and scripts can sense the variations of cluster nodes. By abstracting this information into a plain text file, it becomes possible to change the configuration of a cluster by modifying only one file.</longdescription>
274 +</pkgmetadata>