-
Notifications
You must be signed in to change notification settings - Fork 27
/
masa.spec.in
104 lines (76 loc) · 2.52 KB
/
masa.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
#
# Spec file for MASA
#
Summary: MASA - Manufactured Analytical Solutions Abstraction Library
Name: masa
Version: @VERSION@
Release: 0
License: LGPL
Group: applications
Source: masa-%{version}.tar.gz
Distribution: Koomie Linux
Vendor: Koomie
Packager: [email protected]
BuildRoot: /var/tmp/%{name}-%{version}-buildroot
%define _topdir /h1/karl/build/rpms/
%define APPS /org/centers/pecos
%define MODULES derived_modulefiles
%include compiler-defines.inc
%define INSTALL_DIR %{APPS}/LIBRARIES/%{name}/%{APPSUB}/%{version}
%define MODULE_DIR %{APPS}/%{MODULES}/%{APPSUB}/%{name}
%package -n %{name}-%{comp_fam_ver}
Summary: MASA - Manufactured Analytical Solutions Abstraction Library
Group: applications
%description
%description -n %{name}-%{comp_fam_ver}
MASA is a Manufactured Analytical Solutions Abstraction Library.
%prep
rm -rf $RPM_BUILD_ROOT/%{INSTALL_DIR}
mkdir -p $RPM_BUILD_ROOT/%{INSTALL_DIR}
%setup
%build
%include compiler-load.inc
./configure --prefix=%{INSTALL_DIR}
make -j 1
make DESTDIR=$RPM_BUILD_ROOT install
rm -rf $RPM_BUILD_ROOT/%{MODULE_DIR}
mkdir -p $RPM_BUILD_ROOT/%{MODULE_DIR}
cat > $RPM_BUILD_ROOT/%{MODULE_DIR}/%{version} << 'EOF'
#%Module1.0###################################################################
#
# This modulefile setups the environment for the MASA library.
#
##############################################################################
proc ModulesHelp { } {
puts stderr "The %{name} module file defines the following environment variables:"
puts stderr "MASA_DIR, MASA_LIB, and MASA_INC for the location of the "
puts stderr "MASA distribution.\n"
puts stderr "To use the MASA library, compile the source code with the option:"
puts stderr ""
puts stderr "\t-I\$MASA_INC "
puts stderr "\nand add the following options to the link step: "
puts stderr ""
puts stderr "\t-L\$MASA_LIB -lmasa"
puts stderr "\nVersion %{version}"
}
prepend-path LD_LIBRARY_PATH %{INSTALL_DIR}/lib
#prepend-path PKG_CONFIG_PATH %{INSTALL_DIR}/lib/pkgconfig
prepend-path INCLUDE %{INSTALL_DIR}/include
setenv MASA_DIR %{INSTALL_DIR}
setenv MASA_INC %{INSTALL_DIR}/include
setenv MASA_LIB %{INSTALL_DIR}/lib
EOF
cat > $RPM_BUILD_ROOT/%{MODULE_DIR}/.version.%{version} << 'EOF'
#%Module1.0#################################################
##
## version file for MASA
##
set ModulesVersion "%{version}"
EOF
%files -n %{name}-%{comp_fam_ver}
%defattr(-,karl,pecos)
%{INSTALL_DIR}
%{MODULE_DIR}
%post
%clean
rm -rf $RPM_BUILD_ROOT