-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathbeast_1.8.0-1.spec
executable file
·107 lines (82 loc) · 2.53 KB
/
beast_1.8.0-1.spec
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
## BEAST
Summary: BEAST - a program for Bayesian MCMC of Evolution and Phylogenetics using Molecular Sequences
Name: beast
Version: 1.8.0
Release: 1
License: GNU Lesser GPL
Group: Applications/Life Sciences
Source: BEASTv1.8.0.tgz
Packager: Matt Cowperthwaite (TACC) - [email protected]
BuildRoot: /var/tmp/%{name}_%{version}-buildroot
%define debug_package %{nil}
%include ../rpm-dir.inc
%include ../system-defines.inc
%description
BEAST is a a program for Bayesian MCMC of Evolution & Phylogenetics using Molecular Sequences. This module provides the following binaries: beast, beauti, beastMC3, loganalyser, logcombiner, treeannotator, and treestat.
%define INSTALL_DIR %{APPS}/%{name}/%{version}
%define MODULE_DIR %{APPS}/%{MODULES}/%{name}
%define MODULE_VAR TACC_BEAST
%prep
rm -rf $RPM_BUILD_ROOT/%{INSTALL_DIR}
mkdir -p $RPM_BUILD_ROOT/%{INSTALL_DIR}
%setup -n BEASTv1.8.0
%build
%install
%include ../system-load.inc
module purge
module load TACC
module load intel
export JAVA_HOME=/usr/java/latest
# compile shared object file
rm lib/*.so
cd native
rm *.o
make -f Makefile.icc
cd ..
#copy into install dir
mkdir -p $RPM_BUILD_ROOT%{INSTALL_DIR}
cp -R ./* $RPM_BUILD_ROOT/%{INSTALL_DIR}
rm $RPM_BUILD_ROOT/%{INSTALL_DIR}/native/*.c
rm $RPM_BUILD_ROOT/%{INSTALL_DIR}/native/*.h
#-----------------
# Modules Section
#-----------------
rm -rf $RPM_BUILD_ROOT%{MODULE_DIR}
mkdir -p $RPM_BUILD_ROOT%{MODULE_DIR}
cat > $RPM_BUILD_ROOT%{MODULE_DIR}/%{version}.lua << 'EOF'
help(
[[
The BEAST modulefile defines the following environment variables,
TACC_BEAST_DIR, and TACC_BEAST_BIN for the location of the beast directory and
binaries.
The modulefile prepends TACC_BEAST_BIN directory to PATH
Version %{version}
]]
)
whatis("Name: BEAST")
whatis("Version: %{version}")
whatis("Category: application, biology, phylogenetics")
whatis("Keyword: Biology, Application, Alignment, Phylogenetics, 2012Q3")
whatis("URL: http://code.google.com/p/beast-mcmc/")
whatis("Description: Tool for Bayesian MCMC analysis of molecular sequences")
-- Prerequisites
setenv( "TACC_BEAST_DIR", "%{INSTALL_DIR}" )
setenv( "TACC_BEAST_BIN", "%{INSTALL_DIR}/bin" )
prepend_path("PATH","%{INSTALL_DIR}/bin")
EOF
#--------------
# Version file.
#--------------
cat > $RPM_BUILD_ROOT%{MODULE_DIR}/.version.%{version} << 'EOF'
#%Module3.1.1#################################################
##
## version file for %{PNAME}-%{version}
##
set ModulesVersion "%{version}"
EOF
%files
%defattr(755,root,root,-)
%{INSTALL_DIR}
%{MODULE_DIR}
%clean
rm -rf $RPM_BUILD_ROOT