1 |
%global __brp_check_rpaths %{nil} |
2 |
|
3 |
%define major 0 |
4 |
%define majorpp 2 |
5 |
%define libname %mklibname %{name} %{major} |
6 |
%define develname %mklibname %{name} -d |
7 |
|
8 |
%define majorver 1 |
9 |
%define minorver 28 |
10 |
%define patchver 1 |
11 |
|
12 |
%define gendersplusplus_libname %mklibname gendersplusplus %{majorpp} |
13 |
|
14 |
%bcond_with python |
15 |
|
16 |
Summary: Static cluster configuration database |
17 |
Name: genders |
18 |
Version: %{majorver}.%{minorver}.%{patchver} |
19 |
Release: %mkrel 8 |
20 |
Group: System/Libraries |
21 |
License: GPLv2 |
22 |
URL: https://github.com/chaos/genders |
23 |
Source0: https://github.com/chaos/genders/archive/genders-%{majorver}-%{minorver}-%{patchver}.tar.gz |
24 |
Patch0: genders-1.18-shebang.patch |
25 |
BuildRequires: byacc |
26 |
BuildRequires: flex |
27 |
BuildRequires: libtool |
28 |
|
29 |
%description |
30 |
Genders is a static cluster configuration database used for cluster |
31 |
configuration management. It is used by a variety of tools and scripts for |
32 |
management of large clusters. The genders database is typically replicated |
33 |
on every node of the cluster. It describes the layout and configuration of |
34 |
the cluster so that tools and scripts can sense the variations of cluster |
35 |
nodes. By abstracting this information into a plain text file, it becomes |
36 |
possible to change the configuration of a cluster by modifying only one file. |
37 |
|
38 |
%package -n %{libname} |
39 |
Summary: Static cluster configuration database library |
40 |
Group: System/Libraries |
41 |
|
42 |
%description -n %{libname} |
43 |
Genders is a static cluster configuration database used for cluster |
44 |
configuration management. It is used by a variety of tools and scripts for |
45 |
management of large clusters. The genders database is typically replicated |
46 |
on every node of the cluster. It describes the layout and configuration of |
47 |
the cluster so that tools and scripts can sense the variations of cluster |
48 |
nodes. By abstracting this information into a plain text file, it becomes |
49 |
possible to change the configuration of a cluster by modifying only one file. |
50 |
|
51 |
%package -n %{gendersplusplus_libname} |
52 |
Summary: Static cluster configuration database C++ library |
53 |
Group: System/Libraries |
54 |
|
55 |
%description -n %{gendersplusplus_libname} |
56 |
Genders is a static cluster configuration database used for cluster |
57 |
configuration management. It is used by a variety of tools and scripts for |
58 |
management of large clusters. The genders database is typically replicated |
59 |
on every node of the cluster. It describes the layout and configuration of |
60 |
the cluster so that tools and scripts can sense the variations of cluster |
61 |
nodes. By abstracting this information into a plain text file, it becomes |
62 |
possible to change the configuration of a cluster by modifying only one file. |
63 |
|
64 |
This package contains the C++ bindings for genders. |
65 |
|
66 |
|
67 |
%package -n %{develname} |
68 |
Summary: Static library and header files for the genders library |
69 |
Group: Development/C |
70 |
Provides: %{name}-devel = %{version} |
71 |
Provides: lib%{name}-devel = %{version} |
72 |
Requires: %{libname} = %{version} |
73 |
Requires: %{gendersplusplus_libname} = %{version} |
74 |
|
75 |
%description -n %{develname} |
76 |
Genders is a static cluster configuration database used for cluster |
77 |
configuration management. It is used by a variety of tools and scripts for |
78 |
management of large clusters. The genders database is typically replicated |
79 |
on every node of the cluster. It describes the layout and configuration of |
80 |
the cluster so that tools and scripts can sense the variations of cluster |
81 |
nodes. By abstracting this information into a plain text file, it becomes |
82 |
possible to change the configuration of a cluster by modifying only one file. |
83 |
|
84 |
This package contains the static genders library and its header files. |
85 |
|
86 |
%package compat |
87 |
Summary: Compatibility library |
88 |
Group: System/Libraries |
89 |
|
90 |
%description compat |
91 |
genders API that is compatible with earlier releases of genders. |
92 |
|
93 |
%package -n perl-Libgenders |
94 |
Summary: Genders interface |
95 |
Group: Development/Perl |
96 |
BuildRequires: perl-devel |
97 |
Provides: perl-Genders = %{version} |
98 |
Obsoletes: perl-Genders |
99 |
|
100 |
%description -n perl-Libgenders |
101 |
This package provides a perl interface for querying a genders file. |
102 |
|
103 |
%if %{with check} |
104 |
%package -n python3-libgenders |
105 |
Summary: Genders interface |
106 |
Group: Development/Python |
107 |
BuildRequires: pkgconfig(python3) |
108 |
|
109 |
Obsoletes: python-libgenders < 1.22-10 |
110 |
Provides: python-libgenders = %{version}-%{release} |
111 |
|
112 |
%description -n python3-libgenders |
113 |
This package provides a python3 interface for querying a genders file. |
114 |
%endif |
115 |
|
116 |
%package java |
117 |
Summary: Java libraries |
118 |
Group: Development/Java |
119 |
BuildRequires: java-devel |
120 |
|
121 |
%description java |
122 |
Genders API bindings for java. |
123 |
|
124 |
%package java-devel |
125 |
Summary: Java Development libraries |
126 |
Group: Development/Java |
127 |
Requires: %{name}-java = %{version}-%{release} |
128 |
|
129 |
%description java-devel |
130 |
Genders API bindings for java. |
131 |
|
132 |
%package javadoc |
133 |
Summary: Java Documentation |
134 |
Group: Documentation |
135 |
BuildRequires: java-devel |
136 |
|
137 |
%description javadoc |
138 |
Genders API Documentation for java. |
139 |
|
140 |
%prep |
141 |
%setup -q -n %{name}-%{name}-%{majorver}-%{minorver}-%{patchver} |
142 |
%autopatch -p1 |
143 |
|
144 |
%build |
145 |
# fix build on aarch64 |
146 |
autoreconf -vfi -Iconfig |
147 |
|
148 |
export CPPFLAGS='-I/usr/lib/jvm/java/include -I/usr/lib/jvm/java/include/linux -I../../../src/libgenders' |
149 |
%if %{with check} |
150 |
export PYTHON=%{__python3} |
151 |
%endif |
152 |
%configure \ |
153 |
--disable-static \ |
154 |
--with-genders-file=%{_sysconfdir}/%{name} \ |
155 |
--with-perl-extensions \ |
156 |
--with-perl-vendor-arch \ |
157 |
%if %{with check} |
158 |
--with-python-extensions \ |
159 |
%else |
160 |
--without-python-extensions \ |
161 |
%endif |
162 |
--with-cplusplus-extensions \ |
163 |
--with-extension-destdir=%{buildroot} |
164 |
|
165 |
make LD_RUN_PATH="" |
166 |
|
167 |
%install |
168 |
install -d %{buildroot}%{_sysconfdir} |
169 |
|
170 |
%make_install LD_RUN_PATH="" |
171 |
|
172 |
install -m0644 genders.sample %{buildroot}%{_sysconfdir}/%{name} |
173 |
|
174 |
mkdir -p %{buildroot}%{_jnidir} |
175 |
mv %{buildroot}%{_datadir}/java/Genders.jar %{buildroot}/%{_jnidir}/ |
176 |
|
177 |
# we don't want these |
178 |
find %{buildroot} -name '*.la' -delete |
179 |
|
180 |
%files |
181 |
%doc README NEWS ChangeLog DISCLAIMER DISCLAIMER.UC COPYING TUTORIAL |
182 |
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/%{name} |
183 |
%{_bindir}/* |
184 |
%{_mandir}/man1/* |
185 |
%{_mandir}/man3/genders.3* |
186 |
|
187 |
%files -n %{libname} |
188 |
%doc DISCLAIMER DISCLAIMER.UC COPYING |
189 |
%{_libdir}/libgenders.so.%{major} |
190 |
%{_libdir}/libgenders.so.%{major}.* |
191 |
%{_mandir}/man3/libgenders.3* |
192 |
|
193 |
%files -n %{gendersplusplus_libname} |
194 |
%doc DISCLAIMER DISCLAIMER.UC COPYING |
195 |
%{_libdir}/libgendersplusplus.so.%{majorpp} |
196 |
%{_libdir}/libgendersplusplus.so.%{majorpp}.* |
197 |
|
198 |
%files -n %{develname} |
199 |
%doc DISCLAIMER DISCLAIMER.UC COPYING |
200 |
%{_includedir}/* |
201 |
%{_libdir}/libgenders*.so |
202 |
%{_mandir}/man3/genders_* |
203 |
|
204 |
%files compat |
205 |
%doc DISCLAIMER DISCLAIMER.UC COPYING |
206 |
%{_mandir}/man3/gendlib* |
207 |
%dir %{_prefix}/lib/genders |
208 |
%{_prefix}/lib/genders/* |
209 |
|
210 |
%files -n perl-Libgenders |
211 |
%doc DISCLAIMER DISCLAIMER.UC COPYING |
212 |
%{perl_vendorarch}/Genders.pm |
213 |
%{perl_vendorarch}/Libgenders.pm |
214 |
%dir %{perl_vendorarch}/auto/Libgenders |
215 |
%{perl_vendorarch}/auto/Libgenders/Libgenders.so |
216 |
%{_mandir}/man3/Genders.3pm* |
217 |
%{_mandir}/man3/Libgenders.3pm* |
218 |
|
219 |
%if %{with check} |
220 |
%files -n python3-libgenders |
221 |
%doc DISCLAIMER DISCLAIMER.UC COPYING |
222 |
%{python3_sitearch}/genders.py* |
223 |
%{python3_sitearch}/libgenders-*-py*.egg-info |
224 |
%{python3_sitearch}/libgenders*.so |
225 |
%{python3_sitearch}/__pycache__/* |
226 |
%endif |
227 |
|
228 |
%files java |
229 |
%doc DISCLAIMER DISCLAIMER.UC COPYING |
230 |
%{_libdir}/libGendersjni.so.* |
231 |
%{_jnidir}/Genders.jar |
232 |
|
233 |
%files java-devel |
234 |
%doc DISCLAIMER DISCLAIMER.UC COPYING |
235 |
%{_libdir}/libGendersjni.so |
236 |
|
237 |
%files javadoc |
238 |
%doc DISCLAIMER DISCLAIMER.UC COPYING |
239 |
%{_docdir}/%{name}-%{majorver}.%{minorver}-javadoc |