source: trunk/nexus_spec.in @ 1822

Revision 1820, 7.1 KB checked in by Freddie Akeroyd, 3 months ago (diff)

Pass configure arguments properly to mock. Also update dependencies
to build NXvalidate. Refs #328

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1# @configure_input@
2# $Id$
3# Template for NeXus RPM SPEC file
4# Copyright (C) 2004 Freddie Akeroyd <freddie.akeroyd@stfc.ac.uk>
5#
6Summary: Libraries and utilities for using NeXus format data files
7Name: @PACKAGE_TARNAME@
8Version: @NEXUS_VERSION@
9# Release is the number of times this version of the software was
10# built into an RPM file; it should be incremented each RPM build and
11# then reset to 1 when a new version of the software is released
12Release: @PACKAGE_RELEASE@.@NEXUS_RELEASE@%{?dist}
13License: LGPL
14# Group: there is more than one choice for this - maybe we need to split
15# nexus into separate packages (libraries + apps)
16Group: Development/Libraries
17#Group: Development/Tools
18Source: http://download.nexusformat.org/kits/@PACKAGE_TARNAME@-@PACKAGE_VERSION@.tar.gz
19URL: http://www.nexusformat.org/
20Distribution: @DISTRIBUTION@
21#Icon: nexus.xpm
22Vendor: NeXus International Advisory Committee (NIAC)
23Packager: NeXus Developers <nexus-developers@nexusformat.org>
24# Prefix allows our package to be relocatable i.e. installable in
25# other than just the /usr/local directory
26#Prefix: /usr
27# BuildRoot is the root for software installation
28# this value will not usually be used, but something must
29# be specified here to allow   rpm --buildroot   to be used later
30# (it will get used for a   rpmbuild --recompile  of the the src.rpm)
31%if 0%{?rhel} == 5
32%define is_rhel5 1
33%endif
34%if 0%{?el5}
35%define is_rhel5 1
36%endif
37%if "0%{?dist}" == "0.el5"
38%define is_rhel5 1
39%endif
40
41%if 0%{?rhel} == 6
42%define is_rhel6 1
43%endif
44%if 0%{?el6}
45%define is_rhel6 1
46%endif
47%if "0%{?dist}" == "0.el6"
48%define is_rhel6 1
49%endif
50
51BuildRoot: %{_tmppath}/@PACKAGE_TARNAME@-@PACKAGE_VERSION@
52BuildRequires: python numpy
53BuildRequires: hdf5-devel hdf-devel
54BuildRequires: libxml2-devel
55BuildRequires: java-1.6.0-openjdk-devel
56BuildRequires: readline-devel
57# mxml is not in rhel or epel as yet
58# ant on rhel5 is too old to build NXvalidate
59%if 0%{?fedora}
60BuildRequires: mxml-devel
61BuildRequires: ant
62%endif
63%if 0%{?is_rhel5}
64BuildRequires: python-ctypes
65%endif
66%if 0%{?is_rhel6}
67BuildRequires: ant ant-nodeps
68%endif
69
70%description
71NeXus is an international standard for exchanging data files
72among Neutron, Muon and X-ray science facilities. The underlying
73data is stored using the HDF format from NCSA. This package provides
74access routines, documentation, examples and a basic NeXus file browser.
75
76%package devel
77Summary: Libraries and utilities for using NeXus format data files
78Group: Development/Libraries
79
80%description devel
81NeXus is an international standard for exchanging data files
82among Neutron, Muon and X-ray science facilities. The underlying
83data is stored using the HDF format from NCSA. This package provides
84
85%package tools
86Summary: Libraries and utilities for using NeXus format data files
87Group: Development/Libraries
88
89%description tools
90NeXus is an international standard for exchanging data files
91among Neutron, Muon and X-ray science facilities. The underlying
92data is stored using the HDF format from NCSA. This package provides
93
94%package doc
95Summary: Libraries and utilities for using NeXus format data files
96Group: Development/Libraries
97
98%description doc
99NeXus is an international standard for exchanging data files
100among Neutron, Muon and X-ray science facilities. The underlying
101data is stored using the HDF format from NCSA. This package provides
102
103@HAVE_PYTHON_TRUE@%package python
104@HAVE_PYTHON_TRUE@Summary: Libraries and utilities for using NeXus format data files
105@HAVE_PYTHON_TRUE@Group: Development/Libraries
106@HAVE_PYTHON_TRUE@
107@HAVE_PYTHON_TRUE@%description python
108@HAVE_PYTHON_TRUE@NeXus is an international standard for exchanging data files
109@HAVE_PYTHON_TRUE@among Neutron, Muon and X-ray science facilities. The underlying
110@HAVE_PYTHON_TRUE@data is stored using the HDF format from NCSA. This package provides
111
112@HAVE_JAVAC_TRUE@%package java
113@HAVE_JAVAC_TRUE@Summary: Libraries and utilities for using NeXus format data files
114@HAVE_JAVAC_TRUE@Group: Development/Libraries
115@HAVE_JAVAC_TRUE@
116@HAVE_JAVAC_TRUE@%description java
117@HAVE_JAVAC_TRUE@NeXus is an international standard for exchanging data files
118@HAVE_JAVAC_TRUE@among Neutron, Muon and X-ray science facilities. The underlying
119@HAVE_JAVAC_TRUE@data is stored using the HDF format from NCSA. This package provides
120
121%prep
122%setup -q -n @PACKAGE_TARNAME@-@PACKAGE_VERSION@
123
124%build
125# RPM_INSTALL_PREFIX - where to install software
126# do --prefix last in case also present in passed config options
127if ! test -z "$RPM_INSTALL_PREFIX"; then
128    ./configure %{?nexus_config_options} --prefix="$RPM_INSTALL_PREFIX"
129else
130    ./configure %{?nexus_config_options} --prefix=%{_prefix} --libdir=%{_libdir}
131fi
132make
133
134%install
135# RPM_BUILD_ROOT is where to install software to
136if test "$RPM_BUILD_ROOT" != "/"; then rm -fr "$RPM_BUILD_ROOT"; fi
137make DESTDIR="$RPM_BUILD_ROOT" install
138find "$RPM_BUILD_ROOT" -name '*.la' -exec rm -f {} \;
139
140%files
141%defattr(-,root,root)
142%doc README NEWS ChangeLog AUTHORS COPYING INSTALL
143# %docdir /usr/local/doc
144%{_libdir}/libNeXus*.so*
145%{_libdir}/libnxconvert*.so*
146#%ifarch x86_64
147#/usr/lib/*.so*
148#%endif
149
150%files devel
151%defattr(-,root,root)
152%{_libdir}/libNeXus*.a
153%{_libdir}/libnxconvert*.a
154%{_libdir}/pkgconfig
155%{_includedir}/*
156
157%files tools
158%defattr(-,root,root)
159%{_bindir}/*
160%{_datadir}/man
161
162%files doc
163%defattr(-,root,root)
164%{_datadir}/nexus
165
166@HAVE_PYTHON_TRUE@%files python
167@HAVE_PYTHON_TRUE@%defattr(-,root,root)
168@HAVE_PYTHON_TRUE@/usr/lib/python*/site-packages/nxs
169
170@HAVE_JAVAC_TRUE@%files java
171@HAVE_JAVAC_TRUE@%defattr(-,root,root)
172@HAVE_JAVAC_TRUE@%{_datadir}/java
173@HAVE_JAVAC_TRUE@%{_libdir}/libjnexus.so*
174@HAVE_JAVAC_TRUE@%{_libdir}/libjnexus.a
175
176%clean
177if test "$RPM_BUILD_ROOT" != "/"; then rm -fr "$RPM_BUILD_ROOT"; fi
178
179%post
180if test `whoami` = root; then ldconfig; fi
181
182%post tools
183if [ "$RPM_INSTALL_PREFIX" != "" ]; then
184    INSTALL_PREFIX=$RPM_INSTALL_PREFIX
185else
186    INSTALL_PREFIX=%{_prefix}
187fi
188
189( cd $INSTALL_PREFIX/bin; for i in nxbuild; do \
190  sed -i -e "s|^prefix=.*|prefix=$INSTALL_PREFIX|" $i; done )
191
192%postun
193if test `whoami` = root; then ldconfig; fi
194#
195# %changelog date format as per  `date +"%a %d %b %Y"`
196# first line should be   date  user  email
197%changelog
198* Sat Oct 22 2011 Freddie Akeroyd <freddie.akeroyd@stfc.ac.uk> - 4.3.0
199- Split into subpackages
200* Thu May 24 2007 Freddie Akeroyd <F.A.Akeroyd@rl.ac.uk> - 4.0.0
201- Tag and build 4.0.0
202* Wed May 16 2007 Freddie Akeroyd <F.A.Akeroyd@rl.ac.uk> - 4.0rc3
203- Tag and build 4.0rc3
204* Fri Mar 30 2007 Freddie Akeroyd <F.A.Akeroyd@rl.ac.uk> - 4.0rc2
205- Tag and build 4.0rc2
206* Thu Mar 15 2007 Freddie Akeroyd <F.A.Akeroyd@rl.ac.uk> - 4.0rc1
207- Tag and build 4.0rc1
208* Wed Jul 27 2005 Freddie Akeroyd <F.A.Akeroyd@rl.ac.uk>
209- Change Copyright: to License: and add PACKAGE_RELEASE
210* Mon Jun  6 2005 Freddie Akeroyd <F.A.Akeroyd@rl.ac.uk>
211- Add extra documentation and example files to distribution
212* Wed May 12 2004 Jens Krueger <jens.krueger@frm2.tum.de>
213- Change the License entry to LGPL
214- remove /usr/local/nexus /usr/local/doc from the file list
215* Wed Mar 24 2004 Freddie Akeroyd <F.A.Akeroyd@rl.ac.uk>
216- Fix up prefix in nxbuild after an install so the RPM is now relocatable
217* Sun Feb 22 2004 Freddie Akeroyd <F.A.Akeroyd@rl.ac.uk>
218- Initial RPM kit version
Note: See TracBrowser for help on using the repository browser.