File: maloc.spec

package info (click to toggle)
maloc 1.5-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 4,256 kB
  • sloc: ansic: 12,956; sh: 11,456; yacc: 2,922; lex: 294; makefile: 189; java: 134; fortran: 74
file content (126 lines) | stat: -rw-r--r-- 4,160 bytes parent folder | download
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
#############################################################################
### MALOC = < Minimal Abstraction Layer for Object-oriented C >
### Copyright (C) 1994-- Michael Holst
###
### This library is free software; you can redistribute it and/or
### modify it under the terms of the GNU Lesser General Public
### License as published by the Free Software Foundation; either
### version 2.1 of the License, or (at your option) any later version.
###
### This library is distributed in the hope that it will be useful,
### but WITHOUT ANY WARRANTY; without even the implied warranty of
### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
### Lesser General Public License for more details.
###
### You should have received a copy of the GNU Lesser General Public
### License along with this library; if not, write to the Free Software
### Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
###
### rcsid="$Id: maloc.spec,v 1.8 2010/08/09 19:01:26 fetk Exp $"
### ##########################################################################

## ###########################################################################
## File:    maloc.spec
##
## Purpose: Spec file for building RPMS
##
## Notes:   If this is installed in the top directory the user can build a
##          full set of src and arch rpms with one command:
##
##          rpm -ta maloc.tar.gz
##
## Author:  Stephen Bond and Michael Holst
## ###########################################################################

Summary: Minimal Abstraction Layer for Object-oriented C
Name: maloc
Version: 0.1
Release: 2
Copyright: GPL
Group: Applications/Science
Prefix: /usr/local
Buildroot: %{_topdir}/buildroot
Source: maloc-0.1-2.tar.gz
URL: http://scicomp.ucsd.edu/~mholst
Packager: Michael Holst <mholst@math.ucsd.edu>
%description
MALOC (Minimal Abstraction Layer for Object-oriented C) is a small, portable,
abstract C environment library for object-oriented C programming. MALOC is 
used as the foundation layer for a number of scientific applications, 
including MC, SG, and APBS. MALOC can be used as a small stand-alone 
abstraction environment for writing portable C programs which need access to 
resources which are typically architecture-dependent, such as INET sockets, 
timing routines, and so on. MALOC provides abstract datatypes, memory 
management routines, timing routines, machine epsilon, access to UNIX and INET 
sockets, MPI, and so on. All things that can vary from one architecture to 
another are abstracted out of an application code and placed in MALOC. To port 
the application code to a new architecture, only the small MALOC library needs 
to be ported (usually just "./configure ; make"). MALOC takes the pain of 
varying UNIX (and Win32) platforms with differing library and header 
layouts completely out of the software development picture.

%prep
%setup -n maloc

%build

%ifarch alpha
  export CC='ccc'
  export CFLAGS='-O2'
  export F77='fort'
  export FFLAGS='-O2'
  ./configure --enable-shared --prefix=${RPM_BUILD_ROOT}/%{prefix}
  make 
%endif

# For Portland group compilers on the AMD Opteron
# Note - we need to disable blas 
%ifarch x86_64 
     export CC=pgcc
     export CFLAGS='-O2 -fastsse -fPIC'
     ./configure --prefix=${RPM_BUILD_ROOT}/%{prefix} --disable-blas
     make
%endif
     
# For Itanium ia64 
# Note - we need to disable blas
%ifarch ia64
     export CC=icc
     export CFLAGS='-O2 -fPIC'
     ./configure --prefix=${RPM_BUILD_ROOT}/%{prefix} --disable-blas
     make
%endif

# For power 64, disabling blas
%ifarch ppc64 ppc64pseries
     export CC=xlc
     export CFLAGS="-q64 -qarch=pwr4 -qtune=pwr4"
     ./configure --prefix=${RPM_BUILD_ROOT}/%{prefix}  --disable-blas
     make
%endif

# All others
%ifnarch alpha x86_64 ia64 ppc64 ppc64pseries
     export CC=icc
     export CFLAGS='-O2 -fPIC'
     ./configure --prefix=${RPM_BUILD_ROOT}/%{prefix}
     make 
%endif

%install
mkdir -p ${RPM_BUILD_ROOT}/%{prefix}
make install

%clean
rm -rf ${RPM_BUILD_ROOT}

%post

%postun

%files
%defattr(-,root,root)
%{prefix}/lib
%{prefix}/include
%doc AUTHORS COPYING INSTALL NEWS ChangeLog doc