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
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
|
#!/bin/bash
# Slackware build script for EMBASSY
# Copyright 2011-2021 Petar Petrov slackalaxy@gmail.com
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=EMBASSY
VERSION=${VERSION:-6.6.0} # Keep this the same version as EMBOSS
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
# the name of the created package would be, and then exit. This information
# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
fi
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
else
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
fi
# EMBASSY components and their versions
CBSTOOLS=CBSTOOLS-1.0.0.650
CLUSTALOMEGA=CLUSTALOMEGA-1.1.0
DOMAINATRIX=DOMAINATRIX-0.1.650
DOMALIGN=DOMALIGN-0.1.650
DOMSEARCH=DOMSEARCH-0.1.650
EMNU=EMNU-1.05.650
ESIM4=ESIM4-1.0.0.650
HMMER=HMMER-2.3.2.650
IPRSCAN=IPRSCAN-4.3.1.650
MEME=MEME-4.7.650
MSE=MSE-3.0.0.650
MYEMBOSS=MYEMBOSS-6.5.1
MYEMBOSSDEMO=MYEMBOSSDEMO-6.5.0
PHYLIPNEW=PHYLIPNEW-3.69.650
SIGNATURE=SIGNATURE-0.1.650
STRUCTURE=STRUCTURE-0.1.650
TOPO=TOPO-2.0.650
VIENNA=VIENNA-1.7.2.650
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
mkdir $TMP/$PRGNAM-$VERSION
cd $TMP/$PRGNAM-$VERSION
# Extract the components
tar xvf $CWD/$CBSTOOLS.tar.gz
tar xvf $CWD/$CLUSTALOMEGA.tar.gz
tar xvf $CWD/$DOMAINATRIX.tar.gz
tar xvf $CWD/$DOMALIGN.tar.gz
tar xvf $CWD/$DOMSEARCH.tar.gz
tar xvf $CWD/$EMNU.tar.gz
tar xvf $CWD/$ESIM4.tar.gz
tar xvf $CWD/$HMMER.tar.gz
tar xvf $CWD/$IPRSCAN.tar.gz
tar xvf $CWD/$MEME.tar.gz
tar xvf $CWD/$MSE.tar.gz
tar xvf $CWD/$MYEMBOSS.tar.gz
tar xvf $CWD/$MYEMBOSSDEMO.tar.gz
tar xvf $CWD/$PHYLIPNEW.tar.gz
tar xvf $CWD/$SIGNATURE.tar.gz
tar xvf $CWD/$STRUCTURE.tar.gz
tar xvf $CWD/$TOPO.tar.gz
tar xvf $CWD/$VIENNA.tar.gz
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
-o -perm 511 \) -exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
# Build CBSTOOLS
cd $TMP/$PRGNAM-$VERSION/$CBSTOOLS
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--localstatedir=/var \
--mandir=/usr/man \
--docdir=/usr/doc/$PRGNAM-$VERSION/CBSTOOLS \
--build=$ARCH-slackware-linux
make
make install DESTDIR=$PKG
# Build CLUSTALOMEGA
cd $TMP/$PRGNAM-$VERSION/$CLUSTALOMEGA
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--localstatedir=/var \
--mandir=/usr/man \
--docdir=/usr/doc/$PRGNAM-$VERSION/CLUSTALOMEGA \
--build=$ARCH-slackware-linux
make
make install DESTDIR=$PKG
# Build DOMAINATRIX
cd $TMP/$PRGNAM-$VERSION/$DOMAINATRIX
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--localstatedir=/var \
--mandir=/usr/man \
--docdir=/usr/doc/$PRGNAM-$VERSION/DOMAINATRIX \
--build=$ARCH-slackware-linux
make
make install DESTDIR=$PKG
# Build DOMALIGN
cd $TMP/$PRGNAM-$VERSION/$DOMALIGN
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--localstatedir=/var \
--mandir=/usr/man \
--docdir=/usr/doc/$PRGNAM-$VERSION/DOMALIGN \
--build=$ARCH-slackware-linux
make
make install DESTDIR=$PKG
# Build DOMSEARCH
cd $TMP/$PRGNAM-$VERSION/$DOMSEARCH
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--localstatedir=/var \
--mandir=/usr/man \
--docdir=/usr/doc/$PRGNAM-$VERSION/DOMSEARCH \
--build=$ARCH-slackware-linux
make
make install DESTDIR=$PKG
# Build EMNU
cd $TMP/$PRGNAM-$VERSION/$EMNU
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--localstatedir=/var \
--mandir=/usr/man \
--docdir=/usr/doc/$PRGNAM-$VERSION/EMNU \
--build=$ARCH-slackware-linux
make
make install DESTDIR=$PKG
# Build ESIM4
cd $TMP/$PRGNAM-$VERSION/$ESIM4
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--localstatedir=/var \
--mandir=/usr/man \
--docdir=/usr/doc/$PRGNAM-$VERSION/ESIM4 \
--build=$ARCH-slackware-linux
make
make install DESTDIR=$PKG
# Build HMMER
cd $TMP/$PRGNAM-$VERSION/$HMMER
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--localstatedir=/var \
--mandir=/usr/man \
--docdir=/usr/doc/$PRGNAM-$VERSION/HMMER \
--build=$ARCH-slackware-linux
make
make install DESTDIR=$PKG
# Build IPRSCAN
cd $TMP/$PRGNAM-$VERSION/$IPRSCAN
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--localstatedir=/var \
--mandir=/usr/man \
--docdir=/usr/doc/$PRGNAM-$VERSION/IPRSCAN \
--build=$ARCH-slackware-linux
make
make install DESTDIR=$PKG
# Build MEME
cd $TMP/$PRGNAM-$VERSION/$MEME
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--localstatedir=/var \
--mandir=/usr/man \
--docdir=/usr/doc/$PRGNAM-$VERSION/MEME \
--build=$ARCH-slackware-linux
make
make install DESTDIR=$PKG
# Build MSE
cd $TMP/$PRGNAM-$VERSION/$MSE
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--localstatedir=/var \
--mandir=/usr/man \
--docdir=/usr/doc/$PRGNAM-$VERSION/MSE \
--build=$ARCH-slackware-linux
make
make install DESTDIR=$PKG
# Build MYEMBOSS
cd $TMP/$PRGNAM-$VERSION/$MYEMBOSS
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--localstatedir=/var \
--mandir=/usr/man \
--docdir=/usr/doc/$PRGNAM-$VERSION/MYEMBOSS \
--build=$ARCH-slackware-linux
make
make install DESTDIR=$PKG
# Build MYEMBOSSDEMO
cd $TMP/$PRGNAM-$VERSION/$MYEMBOSSDEMO
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--localstatedir=/var \
--mandir=/usr/man \
--docdir=/usr/doc/$PRGNAM-$VERSION/MYEMBOSSDEMO \
--build=$ARCH-slackware-linux
make
make install DESTDIR=$PKG
# Build PHYLIPNEW
cd $TMP/$PRGNAM-$VERSION/$PHYLIPNEW
CFLAGS="$SLKCFLAGS -fcommon" \
CXXFLAGS="$SLKCFLAGS -fcommon" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--localstatedir=/var \
--mandir=/usr/man \
--docdir=/usr/doc/$PRGNAM-$VERSION/PHYLIPNEW \
--build=$ARCH-slackware-linux
make
make install DESTDIR=$PKG
# Build SIGNATURE
cd $TMP/$PRGNAM-$VERSION/$SIGNATURE
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--localstatedir=/var \
--mandir=/usr/man \
--docdir=/usr/doc/$PRGNAM-$VERSION/SIGNATURE \
--build=$ARCH-slackware-linux
make
make install DESTDIR=$PKG
# Build STRUCTURE
cd $TMP/$PRGNAM-$VERSION/$STRUCTURE
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--localstatedir=/var \
--mandir=/usr/man \
--docdir=/usr/doc/$PRGNAM-$VERSION/STRUCTURE \
--build=$ARCH-slackware-linux
make
make install DESTDIR=$PKG
# Build TOPO
cd $TMP/$PRGNAM-$VERSION/$TOPO
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--localstatedir=/var \
--mandir=/usr/man \
--docdir=/usr/doc/$PRGNAM-$VERSION/TOPO \
--build=$ARCH-slackware-linux
make
make install DESTDIR=$PKG
# Build VIENNA
cd $TMP/$PRGNAM-$VERSION/$VIENNA
# -std=gnu89 fixes build with gcc-5.2 (inline functions HairpinE and LoopEnergy)
CFLAGS="$SLKCFLAGS -std=gnu89" \
CXXFLAGS="$SLKCFLAGS -std=gnu89" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--localstatedir=/var \
--mandir=/usr/man \
--docdir=/usr/doc/$PRGNAM-$VERSION/VIENNA \
--build=$ARCH-slackware-linux
make
make install DESTDIR=$PKG
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
cat $CWD/CONTENTS > $PKG/usr/doc/$PRGNAM-$VERSION/CONTENTS
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
|