-
Notifications
You must be signed in to change notification settings - Fork 16
/
nexus_spec.in
222 lines (197 loc) · 7.14 KB
/
nexus_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
# @configure_input@
# $Id$
# Template for NeXus RPM SPEC file
# Copyright (C) 2004 Freddie Akeroyd <[email protected]>
#
Summary: Libraries and utilities for using NeXus format data files
Name: @PACKAGE_TARNAME@
Version: @NEXUS_VERSION@
# Release is the number of times this version of the software was
# built into an RPM file; it should be incremented each RPM build and
# then reset to 1 when a new version of the software is released
%if "@NEXUS_RELEASE@" == ""
%else
%define nexusrelease .@NEXUS_RELEASE@
%endif
Release: @PACKAGE_RELEASE@%{?nexusrelease}%{?dist}
License: LGPL
# Group: there is more than one choice for this - maybe we need to split
# nexus into separate packages (libraries + apps)
Group: Development/Libraries
#Group: Development/Tools
Source: http://download.nexusformat.org/kits/@PACKAGE_TARNAME@-@[email protected]
URL: http://www.nexusformat.org/
Distribution: @DISTRIBUTION@
#Icon: nexus.xpm
Vendor: NeXus International Advisory Committee (NIAC)
Packager: NeXus Developers <[email protected]>
# Prefix allows our package to be relocatable i.e. installable in
# other than just the /usr/local directory
#Prefix: /usr
# BuildRoot is the root for software installation
# this value will not usually be used, but something must
# be specified here to allow rpm --buildroot to be used later
# (it will get used for a rpmbuild --recompile of the the src.rpm)
%if 0%{?rhel} == 5
%define is_rhel5 1
%endif
%if 0%{?el5}
%define is_rhel5 1
%endif
%if "0%{?dist}" == "0.el5"
%define is_rhel5 1
%endif
%if 0%{?rhel} == 6
%define is_rhel6 1
%endif
%if 0%{?el6}
%define is_rhel6 1
%endif
%if "0%{?dist}" == "0.el6"
%define is_rhel6 1
%endif
BuildRoot: %{_tmppath}/@PACKAGE_TARNAME@-@PACKAGE_VERSION@
BuildRequires: python numpy
BuildRequires: hdf5-devel hdf-devel
BuildRequires: libxml2-devel
#BuildRequires: java-1.6.0-openjdk-devel
BuildRequires: readline-devel
# mxml is not in rhel or epel as yet
# ant on rhel5 is too old to build NXvalidate
%if 0%{?fedora}
BuildRequires: mxml-devel
BuildRequires: ant
%endif
%if 0%{?is_rhel5}
BuildRequires: python-ctypes
%endif
%if 0%{?is_rhel6}
BuildRequires: ant ant-nodeps
%endif
%description
NeXus is an international standard for exchanging data files
among Neutron, Muon and X-ray science facilities. The underlying
data is stored using the HDF format from NCSA. This package provides
access routines, documentation, examples and a basic NeXus file browser.
%package devel
Summary: Libraries and utilities for using NeXus format data files
Group: Development/Libraries
%description devel
NeXus is an international standard for exchanging data files
among Neutron, Muon and X-ray science facilities. The underlying
data is stored using the HDF format from NCSA. This package provides
%package tools
Summary: Libraries and utilities for using NeXus format data files
Group: Development/Libraries
%description tools
NeXus is an international standard for exchanging data files
among Neutron, Muon and X-ray science facilities. The underlying
data is stored using the HDF format from NCSA. This package provides
%package doc
Summary: Libraries and utilities for using NeXus format data files
Group: Development/Libraries
%description doc
NeXus is an international standard for exchanging data files
among Neutron, Muon and X-ray science facilities. The underlying
data is stored using the HDF format from NCSA. This package provides
@HAVE_PYTHON_TRUE@%package python
@HAVE_PYTHON_TRUE@Summary: Libraries and utilities for using NeXus format data files
@HAVE_PYTHON_TRUE@Group: Development/Libraries
@HAVE_PYTHON_TRUE@
@HAVE_PYTHON_TRUE@%description python
@HAVE_PYTHON_TRUE@NeXus is an international standard for exchanging data files
@HAVE_PYTHON_TRUE@among Neutron, Muon and X-ray science facilities. The underlying
@HAVE_PYTHON_TRUE@data is stored using the HDF format from NCSA. This package provides
@HAVE_JAVAC_TRUE@%package java
@HAVE_JAVAC_TRUE@Summary: Libraries and utilities for using NeXus format data files
@HAVE_JAVAC_TRUE@Group: Development/Libraries
@HAVE_JAVAC_TRUE@
@HAVE_JAVAC_TRUE@%description java
@HAVE_JAVAC_TRUE@NeXus is an international standard for exchanging data files
@HAVE_JAVAC_TRUE@among Neutron, Muon and X-ray science facilities. The underlying
@HAVE_JAVAC_TRUE@data is stored using the HDF format from NCSA. This package provides
%prep
%setup -q -n @PACKAGE_TARNAME@-@PACKAGE_VERSION@
%build
# RPM_INSTALL_PREFIX - where to install software
# do --prefix last in case also present in passed config options
if ! test -z "$RPM_INSTALL_PREFIX"; then
./configure %{?nexus_config_options} --prefix="$RPM_INSTALL_PREFIX"
else
./configure %{?nexus_config_options} --prefix=%{_prefix} --libdir=%{_libdir}
fi
make
%install
# RPM_BUILD_ROOT is where to install software to
if test "$RPM_BUILD_ROOT" != "/"; then rm -fr "$RPM_BUILD_ROOT"; fi
make DESTDIR="$RPM_BUILD_ROOT" install
find "$RPM_BUILD_ROOT" -name '*.la' -exec rm -f {} \;
%files
%defattr(-,root,root)
%doc README NEWS ChangeLog AUTHORS COPYING INSTALL
# %docdir /usr/local/doc
%{_libdir}/libNeXus*.so*
%{_libdir}/libnxconvert*.so*
#%ifarch x86_64
#/usr/lib/*.so*
#%endif
%files devel
%defattr(-,root,root)
%{_libdir}/libNeXus*.a
%{_libdir}/libnxconvert*.a
%{_libdir}/pkgconfig
%{_includedir}/*
%files tools
%defattr(-,root,root)
%{_bindir}/*
%{_datadir}/man
%files doc
%defattr(-,root,root)
%{_datadir}/nexus
@HAVE_PYTHON_TRUE@%files python
@HAVE_PYTHON_TRUE@%defattr(-,root,root)
@HAVE_PYTHON_TRUE@/usr/lib/python*/site-packages/nxs
@HAVE_JAVAC_TRUE@%files java
@HAVE_JAVAC_TRUE@%defattr(-,root,root)
@HAVE_JAVAC_TRUE@%{_datadir}/java
@HAVE_JAVAC_TRUE@%{_libdir}/libjnexus.so*
@HAVE_JAVAC_TRUE@%{_libdir}/libjnexus.a
%clean
if test "$RPM_BUILD_ROOT" != "/"; then rm -fr "$RPM_BUILD_ROOT"; fi
%post
if test `whoami` = root; then ldconfig; fi
%post tools
if [ "$RPM_INSTALL_PREFIX" != "" ]; then
INSTALL_PREFIX=$RPM_INSTALL_PREFIX
else
INSTALL_PREFIX=%{_prefix}
fi
( cd $INSTALL_PREFIX/bin; for i in nxbuild; do \
sed -i -e "s|^prefix=.*|prefix=$INSTALL_PREFIX|" $i; done )
%postun
if test `whoami` = root; then ldconfig; fi
#
# %changelog date format as per `date +"%a %d %b %Y"`
# first line should be date user email
%changelog
* Sat Oct 22 2011 Freddie Akeroyd <[email protected]> - 4.3.0
- Split into subpackages
* Thu May 24 2007 Freddie Akeroyd <[email protected]> - 4.0.0
- Tag and build 4.0.0
* Wed May 16 2007 Freddie Akeroyd <[email protected]> - 4.0rc3
- Tag and build 4.0rc3
* Fri Mar 30 2007 Freddie Akeroyd <[email protected]> - 4.0rc2
- Tag and build 4.0rc2
* Thu Mar 15 2007 Freddie Akeroyd <[email protected]> - 4.0rc1
- Tag and build 4.0rc1
* Wed Jul 27 2005 Freddie Akeroyd <[email protected]>
- Change Copyright: to License: and add PACKAGE_RELEASE
* Mon Jun 6 2005 Freddie Akeroyd <[email protected]>
- Add extra documentation and example files to distribution
* Wed May 12 2004 Jens Krueger <[email protected]>
- Change the License entry to LGPL
- remove /usr/local/nexus /usr/local/doc from the file list
* Wed Mar 24 2004 Freddie Akeroyd <[email protected]>
- Fix up prefix in nxbuild after an install so the RPM is now relocatable
* Sun Feb 22 2004 Freddie Akeroyd <[email protected]>
- Initial RPM kit version