This repository has been archived by the owner on Jun 20, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscl_spec.in
92 lines (81 loc) · 2.93 KB
/
scl_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
# @configure_input@
# $Id$
# Template for SCL RPM SPEC file
# Based on the NeXus build script by Freddie Akeroyd
#
%define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")
Summary: Libraries and utilities for running data reduction at the SNS
Name: @PACKAGE_TARNAME@
Version: @PACKAGE_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
Release: 1
License: MIT Academic
# Group: there is more than one choice for this - maybe we need to split
# nexus into separate packages (libraries + apps)
Group: Development/Libraries
Source: http://flathead.ornl.gov/reduction/@PACKAGE_TARNAME@-@[email protected]
URL: https://flathead.ornl.gov/trac/reduction
#Distribution: @DISTRIBUTION@
#Icon:
Vendor: NSSD Scientific Computing Group
Packager: Reduction Developers
# 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)
BuildRoot: %{_tmppath}/@PACKAGE_TARNAME@-@PACKAGE_VERSION@
%description
The SNS Common Libaries package (also known as reduction) contains the
core-level data manipulation and transformation routines required by data
reduction for the Spallation Neutron Source at ORNL.
#%package devel
#Summary: Libraries and utilities for running data reduction at the SNS
#Group: Development/Libraries
#
#%description devel
%prep
%setup -q
%build
# RPM_INSTALL_PREFIX - where to install software
if ! test -z "$RPM_INSTALL_PREFIX"; then
./configure --prefix="$RPM_INSTALL_PREFIX" $SCL_CONFIG_OPTIONS
else
./configure --prefix=%{_prefix} --libdir=%{_libdir} $SCL_CONFIG_OPTIONS
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
%files
%defattr(-,root,root)
%doc README NEWS AUTHORS COPYING INSTALL
# %docdir /usr/local/doc
%{_libdir}/*
%{_includedir}/*
%{python_sitelib}/@[email protected]
%{python_sitelib}/@PACKAGE_TARNAME@/*
%clean
if test "$RPM_BUILD_ROOT" != "/"; then rm -fr "$RPM_BUILD_ROOT"; fi
%post
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 )
if test `whoami` = root; then ldconfig; fi
%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
* Wed May 27 2009 Michael Reuter <[email protected]>
- Initial RPM kit version