-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathamos-3.1.0-3.spec
163 lines (127 loc) · 4.5 KB
/
amos-3.1.0-3.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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
Summary: AMOS - A Modular, Open-Source whole genome assembler
Name: amos
Version: 3.1.0
Release: 3
License: Free
Vendor: AMOS Consortium
Group: Applications/Life Sciences
Source: %{name}-%{version}.tar.gz
Packager: TACC - [email protected]
BuildRoot: /scratch/02114/wonaya/tmp/%{name}-%{version}-buildroot
#------------------------------------------------
# BASIC DEFINITIONS
#------------------------------------------------
# This will define the correct _topdir and turn of building a debug package
%include rpm-dir.inc
%include ../system-defines.inc
# Compiler Family Definitions
# %include compiler-defines.inc
# MPI Family Definitions
# %include mpi-defines.inc
# Other defs
%define PNAME %{name}
%define INSTALL_DIR %{APPS}/%{PNAME}/%{version}
%define MODULE_DIR %{APPS}/%{MODULES}/%{PNAME}
%define MODULE_VAR TACC_AMOS
#------------------------------------------------
# BASIC DEFINITIONS
#------------------------------------------------
# This will define the correct _topdir and turn of building a debug package
%include rpm-dir.inc
%include ../system-defines.inc
# Compiler Family Definitions
# %include compiler-defines.inc
# MPI Family Definitions
# %include mpi-defines.inc
# Other defs
%define PNAME %{name}
%define INSTALL_DIR %{APPS}/%{PNAME}/%{version}
%define MODULE_DIR %{APPS}/%{MODULES}/%{name}
%define MODULE_VAR TACC_AMOS
%description
AMOS is a software infrastructure for developing assembly tools. If you are only interested in running an off-the-shelf assembler on your shotgun data, do not despair, AMOS provides two such assemblers: AMOScmp - a comparative assembler; and Minimus - a basic assembler for small datasets.
## PREP
%prep
# Remove older attempts
rm -rf $RPM_BUILD_ROOT/%{INSTALL_DIR}
%setup -n %{PNAME}-%{version}
%build
%install
%include ../system-load.inc
mkdir -p $RPM_BUILD_ROOT/%{INSTALL_DIR}
module purge
module load TACC
module unload $TACC_FAMILY_COMPILER
module load gcc/4.4.5
module load boost
module load perl
module load mummer
module load blat
./configure --prefix=%{INSTALL_DIR} --with-Boost-dir=$TACC_BOOST_INC
make 'CXXFLAGS=-Wno-deprecated'
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}.lua << 'EOF'
help (
[[
This module loads %{name} built with gcc. Full Documentation for is available online at the publisher's website:
http://sourceforge.net/apps/mediawiki/amos/
The AMOS executables can be found in %{MODULE_VAR}_BIN. Includes are in %{MODULE_VAR}_INC and libraries are in %{MODULE_VAR}_LIB.
Dependencies: AMOS is a complex workflow system, with many potential dependencies. Some are taken care by loading additional modules before using AMOS:
* Perl: 'module load perl'
* MUMmer: 'module load mummer'
* BLAT: 'module load blat'
Some Perl scripts in the AMOS package require additional modules
that you should install:
* DBI
* Statistics::Descriptive
* XML::Parser
You should be able to install these in your local PERL5 directory via CPAN
Version %{version}
]])
whatis("Name: AMOS")
whatis("Version: %{version}")
whatis("Category: Computational biology, genomics")
whatis("Keywords: Biology, Genomics, Assembly")
whatis("Description: AMOS - A Modular, Open-Source whole genome assembler")
whatis("URL: http://sourceforge.net/apps/mediawiki/amos/")
setenv("%{MODULE_VAR}_DIR","%{INSTALL_DIR}/")
setenv("%{MODULE_VAR}_BIN","%{INSTALL_DIR}/bin")
setenv("%{MODULE_VAR}_INC","%{INSTALL_DIR}/include")
setenv("%{MODULE_VAR}_LIB","%{INSTALL_DIR}/lib")
setenv("%{MODULE_VAR}_MAN","%{INSTALL_DIR}/man")
prepend_path("PATH" ,"%{INSTALL_DIR}/bin")
prepend_path("MANPATH" ,"%{INSTALL_DIR}/man")
prereq ("boost")
prereq ("perl")
prereq ("mummer")
prereq ("blat")
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 SECTION
#------------------------------------------------
%files
# Define files permisions, user and group
%defattr(755,root,root,-)
%{INSTALL_DIR}
%{MODULE_DIR}
#------------------------------------------------
# CLEAN UP SECTION
#------------------------------------------------
%post
%clean
# Make sure we are not within one of the directories we try to delete
cd /tmp
# Remove the installation files now that the RPM has been generated
rm -rf $RPM_BUILD_ROOT