-
Notifications
You must be signed in to change notification settings - Fork 19
/
bes.spec.in
267 lines (216 loc) · 7.93 KB
/
bes.spec.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
%define bescachedir %{_localstatedir}/cache/%{name}
%define bespkidir %{_sysconfdir}/pki/%{name}
%define beslogdir %{_localstatedir}/log/%{name}
%define bespiddir %{_localstatedir}/run
%define besuser %{name}
%define besgroup %{name}
%define beslibdir %{_libdir}/bes
%define bessharedir %{_datadir}/bes
%define hyraxsharedir %{_datadir}/hyrax
Name: bes
Version: @PACKAGE_MAJOR_VERSION@.@PACKAGE_MINOR_VERSION@.@PACKAGE_PATCH_VERSION@
Release: @PACKAGE_BUILD_NUMBER@%{?dist}
Summary: Back-end server software framework for OPeNDAP
Group: System Environment/Libraries
License: LGPLv2+
URL: http://www.opendap.org/download/BES.html
Source0: http://www.opendap.org/pub/source/bes-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: libdap >= 3.21.0
Requires: readline bzip2 zlib
Requires: netcdf >= 4.8
Requires: libicu >= 3.6
Requires: hdf5 >= 1.10.5
Requires: hdf >= 4.2
Requires: libxml2 >= 2.9.0
Requires: libcurl >= 7.61.0
Requires: openssl
Requires(pre): shadow-utils
BuildRequires: libdap-devel >= 3.21.0
BuildRequires: readline-devel
BuildRequires: bzip2-devel zlib-devel
BuildRequires: libxml2-devel >= 2.9.0
BuildRequires: libcurl-devel >= 7.61.0
BuildRequires: netcdf-devel >= 4.8
BuildRequires: libicu-devel >= 3.6
BuildRequires: hdf5-devel >= 1.10.5
BuildRequires: hdf-devel >= 4.2
BuildRequires: openssl-devel
BuildRequires: pkgconfig
%description
BES is a high-performance back-end server software framework for
OPeNDAP that allows data providers more flexibility in providing end
users views of their data. The current OPeNDAP data objects (DAS, DDS,
and DataDDS) are still supported, but now data providers can add new data
views, provide new functionality, and new features to their end users
through the BES modular design. Providers can add new data handlers, new
data objects/views, the ability to define views with constraints and
aggregation, the ability to add reporting mechanisms, initialization
hooks, and more.
%package devel
Summary: Development files for %{name}
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: libdap-devel >= 3.21.0
# for the /usr/share/aclocal directory ownership
Requires: automake
Requires: openssl-devel, bzip2-devel, zlib-devel
Requires: pkgconfig
%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
# %package doc
# Summary: Documentation of the OPeNDAP BES
# Group: Documentation
# %description doc
# Documentation of OPeNDAP BES.
%prep
%setup -q
chmod a-x dispatch/BESStreamResponseHandler*
%build
%configure --disable-static --disable-dependency-tracking --with-build=@PACKAGE_BUILD_NUMBER@
make %{?_smp_mflags}
# make docs
# rm -rf __distribution_docs
# cp -pr docs __distribution_docs
# mv __distribution_docs/html __distribution_docs/api-html
# # .map and .md5 files are of dubious use
# rm __distribution_docs/api-html/*.map
# rm __distribution_docs/api-html/*.md5
# chmod a-x __distribution_docs/BES_*.doc
sed -i.dist -e 's:=/tmp:=%{bescachedir}:' \
-e 's:=.*/bes.log:=%{beslogdir}/bes.log:' \
-e 's:=.*/lib/bes:=%{beslibdir}:' \
-e 's:=.*/share/bes:=%{bessharedir}:' \
-e 's:=.*/share/hyrax:=%{hyraxsharedir}:' \
-e 's:=/full/path/to/serverside/certificate/file.pem:=%{bespkidir}/cacerts/file.pem:' \
-e 's:=/full/path/to/serverside/key/file.pem:=%{bespkidir}/public/file.pem:' \
-e 's:=/full/path/to/clientside/certificate/file.pem:=%{bespkidir}/cacerts/file.pem:' \
-e 's:=/full/path/to/clientside/key/file.pem:=%{bespkidir}/public/file.pem:' \
-e 's:=user_name:=%{besuser}:' \
-e 's:=group_name:=%{besgroup}:' \
dispatch/bes/bes.conf
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
mkdir -p $RPM_BUILD_ROOT%{bescachedir}
chmod g+w $RPM_BUILD_ROOT%{bescachedir}
mkdir -p $RPM_BUILD_ROOT%{bespkidir}/{cacerts,public}
mkdir -p $RPM_BUILD_ROOT%{beslogdir}
chmod g+w $RPM_BUILD_ROOT%{beslogdir}
mkdir -p $RPM_BUILD_ROOT%{bespiddir}
chmod g+w $RPM_BUILD_ROOT%{bespiddir}
mv $RPM_BUILD_ROOT%{_bindir}/bes-config-pkgconfig $RPM_BUILD_ROOT%{_bindir}/bes-config
mkdir -p $RPM_BUILD_ROOT%{_tmpfilesdir}
mv $RPM_BUILD_ROOT%{_bindir}/bes-tmpfiles-conf $RPM_BUILD_ROOT%{_tmpfilesdir}/%{name}.conf
%clean
rm -rf $RPM_BUILD_ROOT
%pre
getent group %{besgroup} >/dev/null || groupadd -r %{besgroup}
getent passwd %{besuser} >/dev/null || \
useradd -r -g %{besuser} -d %{beslogdir} -s /sbin/nologin \
-c "BES daemon" %{besuser}
exit 0
%post
/sbin/chkconfig --add besd
/sbin/ldconfig
%preun
/sbin/chkconfig --del besd
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root,-)
%doc ChangeLog NEWS README.md
%dir %{_sysconfdir}/bes/
%dir %{_sysconfdir}/bes/modules
%{_tmpfilesdir}/%{name}.conf
%config(noreplace) %{_sysconfdir}/bes/bes.conf
%config(noreplace) %{_sysconfdir}/bes/site.conf.proto
%config(noreplace) %{_sysconfdir}/bes/modules/*.conf
# Added 10/25/16 jhrg. See below for the installation of the logrotate file.
# %dir %{_sysconfdir}/logrotate.d
# %config(noreplace) %{_sysconfdir}/logrotate.d/besd.logrotate
%dir %{_datadir}/bes/
%{_datadir}/bes/*.html
%{_datadir}/bes/*.txt
%{_datadir}/bes/*.xml
%{_datadir}/hyrax/
%{_datadir}/mds/
%{_bindir}/beslistener
%{_bindir}/besdaemon
# %{_bindir}/besd # moved to /etc/rc.d/init.d; see below.
%{_bindir}/besstandalone
%{_bindir}/besctl
%{_bindir}/hyraxctl
%{_bindir}/bescmdln
%{_bindir}/build_dmrpp
%{_bindir}/build_dmrpp_h4
%{_bindir}/check_dmrpp
%{_bindir}/merge_dmrpp
%{_bindir}/reduce_mdf
#%{_bindir}/ngap_build_dmrpp
%{_bindir}/localBesGetDap
%{_bindir}/populateMDS
%{_bindir}/get_dmrpp
%{_bindir}/get_dmrpp_h4
%{_bindir}/ingest_filesystem
%{_bindir}/ingest_s3bucket
%{_bindir}/gen_dmrpp_side_car
%{_bindir}/get_hdf_side_car
%{_bindir}/retriever
# TODO Change build_sidecar to a better name, like build_stare_sidecar. jhrg 10/29/19
%{_bindir}/build_sidecar
%{_libdir}/*.so.*
%{_libdir}/bes/
%{_initddir}/besd
# %{bescachedir}
%{bespkidir}/
%attr (-,%{besuser},%{besgroup}) %{beslogdir}
# The directory bespiddir was specific to the bes, but it became a system directory.
# Thus, its bad form to change the owner and group to the 'bes.' jhrg 7/8/20
# %attr (-,%{besuser},%{besgroup}) %{bespiddir}
%attr (-,%{besuser},%{besgroup}) %{bescachedir}
# Make sure that the BES, once running, can write to the MDS directory. jhrg 11/7/18
%attr (-,%{besuser},%{besgroup}) %{_datadir}/mds/
%files devel
%defattr(-,root,root,-)
# %doc __distribution_docs/BES_*.doc
%{_bindir}/besCreateModule
%{_bindir}/bes-config
%{_includedir}/bes/
%{_libdir}/*.so
%{_libdir}/pkgconfig/bes_*.pc
%{_datadir}/bes/templates/
%{_datadir}/aclocal/bes.m4
# %files doc
# %defattr(-,root,root,-)
# %doc __distribution_docs/api-html/
%changelog
* Wed Mar 18 2020 Nathan Potter <[email protected]> -3.20.6-1
- Added ngap_build_dmrpp to bin
* Thu Aug 30 2018 James Gallagher <[email protected]> - 3.19.1-1
- Added build_dmrpp, localBesGetDap, and populateMDS to bin
* Thu Apr 2 2015 EC2 James Gallagher <[email protected]> - 3.13.2-1
- Added install of 'besd' script to /etc/rc.d/init.d
* Tue Sep 14 2010 Patrick West <[email protected]> - 3.9.0-1
- Update
* Tue May 04 2010 Patrick West <[email protected]> - 3.8.3-1
- Update
* Tue Apr 06 2010 Patrick West <[email protected]> - 3.8.2-1
- Update
* Thu Mar 11 2010 Patrick West <[email protected]> - 3.8.1-1
- Update
* Tue Feb 02 2010 Patrick West <[email protected]> - 3.8.0-1
- Update
* Thu Jan 29 2009 James Gallagher <[email protected]> - 3.7.0-1
- Update
* Wed Jun 25 2008 Patrick West <[email protected]> 3.6.2-1
- Update.
* Fri Apr 11 2008 Patrick West <[email protected]> 3.6.1-1
- Update.
* Fri Feb 29 2008 Patrick West <[email protected]> 3.6.0-1
- Update.
* Tue Feb 13 2007 James Gallagher <[email protected]> 3.4.0-1
- Update.
* Sat Jul 22 2006 Patrice Dumas <[email protected]> 3.2.0-1
- initial packaging