-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathbeast_1.7-1.spec
executable file
·106 lines (77 loc) · 2.55 KB
/
beast_1.7-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
#
# Spec file for BEAST
#
Summary: BEAST - a program for Bayesian MCMC of Evolution & Phylogenetics using Molecular Sequences
Name: beast
Version: 1.7
Release: 1
License: GNU Lesser GPL
Group: Applications/Life Sciences
Source: BEASTv1.7.0.tgz
Packager: TACC - [email protected]
BuildRoot: /var/tmp/%{name}-%{version}-buildroot
%include rpm-dir.inc
%define APPS /opt/apps
%define MODULES modulefiles
%include compiler-defines.inc
%define INSTALL_DIR %{APPS}/%{comp_fam_ver}/%{name}/%{version}
%define MODULE_DIR %{APPS}/%{comp_fam_ver}/%{MODULES}/%{name}
%package -n %{name}-%{comp_fam_ver}
Summary: BEAST - a program for Bayesian MCMC of Evolution & Phylogenetics using Molecular Sequences
Group: Applications/Life Sciences
%description
%description -n %{name}-%{comp_fam_ver}
BEAST is a a program for Bayesian MCMC of Evolution & Phylogenetics using Molecular Sequences
%prep
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/%{INSTALL_DIR}
#%setup -n %{name}-%{version}
%setup -n BEASTv1.7.0
%build
%include compiler-load.inc
# Use mount temp trick
mkdir -p %{INSTALL_DIR}
mount -t tmpfs tmpfs %{INSTALL_DIR}
%install
%include compiler-load.inc
mkdir -p $RPM_BUILD_ROOT/%{INSTALL_DIR}
cp -r ./* %{INSTALL_DIR}
cp -r %{INSTALL_DIR}/ $RPM_BUILD_ROOT/%{INSTALL_DIR}/..
umount %{INSTALL_DIR}
## Module for beast
mkdir -p $RPM_BUILD_ROOT/%{MODULE_DIR}
cat > $RPM_BUILD_ROOT/%{MODULE_DIR}/%{version}.lua << 'EOF'
local help_message = [[
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 also prepends TACC_BEAST_BIN directory to PATH
Version %{version}
]]
help(help_message,"\n")
whatis("Name: BEAST")
whatis("Version: %{version}")
whatis("Category: application, biology")
whatis("Keyword: Biology, Application, Alignment, Phylogenetics")
whatis("URL: http://code.google.com/p/beast-mcmc/")
whatis("Description: Tool for Bayesian MCMC analysis of molecular sequences")
-- Prerequisites
prereq("jdk64")
setenv("TACC_BEAST_DIR" ,"%{INSTALL_DIR}")
setenv("TACC_BEAST_BIN" ,"%{INSTALL_DIR}/bin")
prepend_path("PATH","%{INSTALL_DIR}/bin")
EOF
cat > $RPM_BUILD_ROOT/%{MODULE_DIR}/.version.%{version} << 'EOF'
#%Module3.1.1#################################################
##
## version file for beast
##
set ModulesVersion "%{version}"
EOF
%files -n %{name}-%{comp_fam_ver}
%defattr(755,root,install)
%{INSTALL_DIR}
%{MODULE_DIR}
%post
%clean
rm -rf $RPM_BUILD_ROOT