Debian Codegraph @

debian/external_deps/fetk/punc/punc.spec

raw
1 ### ##########################################################################
2 ### PUNC = < Portable Understructure for Numerical Computing >
3 ### Copyright (C) 1994-- Michael Holst
4 ###
5 ### This library is free software; you can redistribute it and/or
6 ### modify it under the terms of the GNU Lesser General Public
7 ### License as published by the Free Software Foundation; either
8 ### version 2.1 of the License, or (at your option) any later version.
9 ###
10 ### This library is distributed in the hope that it will be useful,
11 ### but WITHOUT ANY WARRANTY; without even the implied warranty of
12 ### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 ### Lesser General Public License for more details.
14 ###
15 ### You should have received a copy of the GNU Lesser General Public
16 ### License along with this library; if not, write to the Free Software
17 ### Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 ###
19 ### rcsid="$Id: punc.spec,v 1.14 2010/08/09 19:01:48 fetk Exp $"
20 ### ##########################################################################
21
22 ## ###########################################################################
23 ## File: punc.spec
24 ##
25 ## Purpose: Spec file for building RPMS
26 ##
27 ## Notes: If this is installed in the top directory the user can build a
28 ## full set of src and arch rpms with one command:
29 ##
30 ## rpm -ta punc.tar.gz
31 ##
32 ## Author: Stephen Bond and Michael Holst
33 ## ###########################################################################
34
35 Summary: Portable Understructure for Numerical Computing
36 Name: punc
37 Version: 0.1
38 Release: 2
39 Copyright: GPL
40 Group: Applications/Science
41 Prefix: /usr/local
42 Buildroot: %{_topdir}/buildroot
43 Source: punc-0.1-2.tar.gz
44 URL: http://scicomp.ucsd.edu/~mholst
45 Packager: Michael Holst <[email protected]>
46 %description
47 PUNC (Portable Understructure for Numerical Computing) is a small portable
48 collection of standard numerical linear algebra and other reference
49 libraries for numerical analysis software. Some of the higher-level
50 libraries in the collection are further wrapped with an object-oriented
51 C interface for safer/easier software engineering into other software.
52 PUNC is used as the linear algebra layer for a number of applications,
53 including MC and FEtk.
54
55 %prep
56 %setup -n punc
57
58 %build
59
60 %ifarch alpha
61 export CC='ccc'
62 export CFLAGS='-O2'
63 export F77='fort'
64 export FFLAGS='-O2'
65 ./configure --enable-shared --prefix=${RPM_BUILD_ROOT}/%{prefix}
66 make
67 %endif
68
69 # For Portland group compilers on the AMD Opteron
70 # Note - we need to disable blas
71 %ifarch x86_64
72 export CC=pgcc
73 export CFLAGS='-O2 -fastsse -fPIC'
74 ./configure --prefix=${RPM_BUILD_ROOT}/%{prefix} --disable-blas
75 make
76 %endif
77
78 # For Itanium ia64
79 # Note - we need to disable blas
80 %ifarch ia64
81 export CC=icc
82 export CFLAGS='-O2 -fPIC'
83 ./configure --prefix=${RPM_BUILD_ROOT}/%{prefix} --disable-blas
84 make
85 %endif
86
87 # For power 64, disabling blas
88 %ifarch ppc64 ppc64pseries
89 export CC=xlc
90 export CFLAGS="-q64 -qarch=pwr4 -qtune=pwr4"
91 ./configure --prefix=${RPM_BUILD_ROOT}/%{prefix} --disable-blas
92 make
93 %endif
94
95 # All others
96 %ifnarch alpha x86_64 ia64 ppc64 ppc64pseries
97 export CC=icc
98 export CFLAGS='-O2 -fPIC'
99 ./configure --prefix=${RPM_BUILD_ROOT}/%{prefix}
100 make
101 %endif
102
103 %install
104 mkdir -p ${RPM_BUILD_ROOT}/%{prefix}
105 make install
106
107 %clean
108 rm -rf ${RPM_BUILD_ROOT}
109
110 %post
111
112 %postun
113
114 %files
115 %defattr(-,root,root)
116 %{prefix}/lib
117 %{prefix}/include
118 %doc AUTHORS COPYING INSTALL NEWS ChangeLog doc
119