EMBASSY.SlackBuild 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408
  1. #!/bin/bash
  2. # Slackware build script for EMBASSY
  3. # Copyright 2011-2021 Petar Petrov slackalaxy@gmail.com
  4. # All rights reserved.
  5. #
  6. # Redistribution and use of this script, with or without modification, is
  7. # permitted provided that the following conditions are met:
  8. #
  9. # 1. Redistributions of this script must retain the above copyright
  10. # notice, this list of conditions and the following disclaimer.
  11. #
  12. # THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
  13. # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  14. # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
  15. # EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  16. # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  17. # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
  18. # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
  19. # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
  20. # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
  21. # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
  22. cd $(dirname $0) ; CWD=$(pwd)
  23. PRGNAM=EMBASSY
  24. VERSION=${VERSION:-6.6.0} # Keep this the same version as EMBOSS
  25. BUILD=${BUILD:-3}
  26. TAG=${TAG:-_SBo}
  27. PKGTYPE=${PKGTYPE:-tgz}
  28. if [ -z "$ARCH" ]; then
  29. case "$( uname -m )" in
  30. i?86) ARCH=i586 ;;
  31. arm*) ARCH=arm ;;
  32. *) ARCH=$( uname -m ) ;;
  33. esac
  34. fi
  35. # If the variable PRINT_PACKAGE_NAME is set, then this script will report what
  36. # the name of the created package would be, and then exit. This information
  37. # could be useful to other scripts.
  38. if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
  39. echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
  40. exit 0
  41. fi
  42. TMP=${TMP:-/tmp/SBo}
  43. PKG=$TMP/package-$PRGNAM
  44. OUTPUT=${OUTPUT:-/tmp}
  45. if [ "$ARCH" = "i586" ]; then
  46. SLKCFLAGS="-O2 -march=i586 -mtune=i686"
  47. LIBDIRSUFFIX=""
  48. elif [ "$ARCH" = "i686" ]; then
  49. SLKCFLAGS="-O2 -march=i686 -mtune=i686"
  50. LIBDIRSUFFIX=""
  51. elif [ "$ARCH" = "x86_64" ]; then
  52. SLKCFLAGS="-O2 -fPIC"
  53. LIBDIRSUFFIX="64"
  54. else
  55. SLKCFLAGS="-O2"
  56. LIBDIRSUFFIX=""
  57. fi
  58. # EMBASSY components and their versions
  59. CBSTOOLS=CBSTOOLS-1.0.0.650
  60. CLUSTALOMEGA=CLUSTALOMEGA-1.1.0
  61. DOMAINATRIX=DOMAINATRIX-0.1.650
  62. DOMALIGN=DOMALIGN-0.1.650
  63. DOMSEARCH=DOMSEARCH-0.1.650
  64. EMNU=EMNU-1.05.650
  65. ESIM4=ESIM4-1.0.0.650
  66. HMMER=HMMER-2.3.2.650
  67. IPRSCAN=IPRSCAN-4.3.1.650
  68. MEME=MEME-4.7.650
  69. MSE=MSE-3.0.0.650
  70. MYEMBOSS=MYEMBOSS-6.5.1
  71. MYEMBOSSDEMO=MYEMBOSSDEMO-6.5.0
  72. PHYLIPNEW=PHYLIPNEW-3.69.650
  73. SIGNATURE=SIGNATURE-0.1.650
  74. STRUCTURE=STRUCTURE-0.1.650
  75. TOPO=TOPO-2.0.650
  76. VIENNA=VIENNA-1.7.2.650
  77. set -e
  78. rm -rf $PKG
  79. mkdir -p $TMP $PKG $OUTPUT
  80. cd $TMP
  81. rm -rf $PRGNAM-$VERSION
  82. mkdir $TMP/$PRGNAM-$VERSION
  83. cd $TMP/$PRGNAM-$VERSION
  84. # Extract the components
  85. tar xvf $CWD/$CBSTOOLS.tar.gz
  86. tar xvf $CWD/$CLUSTALOMEGA.tar.gz
  87. tar xvf $CWD/$DOMAINATRIX.tar.gz
  88. tar xvf $CWD/$DOMALIGN.tar.gz
  89. tar xvf $CWD/$DOMSEARCH.tar.gz
  90. tar xvf $CWD/$EMNU.tar.gz
  91. tar xvf $CWD/$ESIM4.tar.gz
  92. tar xvf $CWD/$HMMER.tar.gz
  93. tar xvf $CWD/$IPRSCAN.tar.gz
  94. tar xvf $CWD/$MEME.tar.gz
  95. tar xvf $CWD/$MSE.tar.gz
  96. tar xvf $CWD/$MYEMBOSS.tar.gz
  97. tar xvf $CWD/$MYEMBOSSDEMO.tar.gz
  98. tar xvf $CWD/$PHYLIPNEW.tar.gz
  99. tar xvf $CWD/$SIGNATURE.tar.gz
  100. tar xvf $CWD/$STRUCTURE.tar.gz
  101. tar xvf $CWD/$TOPO.tar.gz
  102. tar xvf $CWD/$VIENNA.tar.gz
  103. chown -R root:root .
  104. find -L . \
  105. \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
  106. -o -perm 511 \) -exec chmod 755 {} \; -o \
  107. \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
  108. -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
  109. # Build CBSTOOLS
  110. cd $TMP/$PRGNAM-$VERSION/$CBSTOOLS
  111. CFLAGS="$SLKCFLAGS" \
  112. CXXFLAGS="$SLKCFLAGS" \
  113. ./configure \
  114. --prefix=/usr \
  115. --libdir=/usr/lib${LIBDIRSUFFIX} \
  116. --sysconfdir=/etc \
  117. --localstatedir=/var \
  118. --mandir=/usr/man \
  119. --docdir=/usr/doc/$PRGNAM-$VERSION/CBSTOOLS \
  120. --build=$ARCH-slackware-linux
  121. make
  122. make install DESTDIR=$PKG
  123. # Build CLUSTALOMEGA
  124. cd $TMP/$PRGNAM-$VERSION/$CLUSTALOMEGA
  125. CFLAGS="$SLKCFLAGS" \
  126. CXXFLAGS="$SLKCFLAGS" \
  127. ./configure \
  128. --prefix=/usr \
  129. --libdir=/usr/lib${LIBDIRSUFFIX} \
  130. --sysconfdir=/etc \
  131. --localstatedir=/var \
  132. --mandir=/usr/man \
  133. --docdir=/usr/doc/$PRGNAM-$VERSION/CLUSTALOMEGA \
  134. --build=$ARCH-slackware-linux
  135. make
  136. make install DESTDIR=$PKG
  137. # Build DOMAINATRIX
  138. cd $TMP/$PRGNAM-$VERSION/$DOMAINATRIX
  139. CFLAGS="$SLKCFLAGS" \
  140. CXXFLAGS="$SLKCFLAGS" \
  141. ./configure \
  142. --prefix=/usr \
  143. --libdir=/usr/lib${LIBDIRSUFFIX} \
  144. --sysconfdir=/etc \
  145. --localstatedir=/var \
  146. --mandir=/usr/man \
  147. --docdir=/usr/doc/$PRGNAM-$VERSION/DOMAINATRIX \
  148. --build=$ARCH-slackware-linux
  149. make
  150. make install DESTDIR=$PKG
  151. # Build DOMALIGN
  152. cd $TMP/$PRGNAM-$VERSION/$DOMALIGN
  153. CFLAGS="$SLKCFLAGS" \
  154. CXXFLAGS="$SLKCFLAGS" \
  155. ./configure \
  156. --prefix=/usr \
  157. --libdir=/usr/lib${LIBDIRSUFFIX} \
  158. --sysconfdir=/etc \
  159. --localstatedir=/var \
  160. --mandir=/usr/man \
  161. --docdir=/usr/doc/$PRGNAM-$VERSION/DOMALIGN \
  162. --build=$ARCH-slackware-linux
  163. make
  164. make install DESTDIR=$PKG
  165. # Build DOMSEARCH
  166. cd $TMP/$PRGNAM-$VERSION/$DOMSEARCH
  167. CFLAGS="$SLKCFLAGS" \
  168. CXXFLAGS="$SLKCFLAGS" \
  169. ./configure \
  170. --prefix=/usr \
  171. --libdir=/usr/lib${LIBDIRSUFFIX} \
  172. --sysconfdir=/etc \
  173. --localstatedir=/var \
  174. --mandir=/usr/man \
  175. --docdir=/usr/doc/$PRGNAM-$VERSION/DOMSEARCH \
  176. --build=$ARCH-slackware-linux
  177. make
  178. make install DESTDIR=$PKG
  179. # Build EMNU
  180. cd $TMP/$PRGNAM-$VERSION/$EMNU
  181. CFLAGS="$SLKCFLAGS" \
  182. CXXFLAGS="$SLKCFLAGS" \
  183. ./configure \
  184. --prefix=/usr \
  185. --libdir=/usr/lib${LIBDIRSUFFIX} \
  186. --sysconfdir=/etc \
  187. --localstatedir=/var \
  188. --mandir=/usr/man \
  189. --docdir=/usr/doc/$PRGNAM-$VERSION/EMNU \
  190. --build=$ARCH-slackware-linux
  191. make
  192. make install DESTDIR=$PKG
  193. # Build ESIM4
  194. cd $TMP/$PRGNAM-$VERSION/$ESIM4
  195. CFLAGS="$SLKCFLAGS" \
  196. CXXFLAGS="$SLKCFLAGS" \
  197. ./configure \
  198. --prefix=/usr \
  199. --libdir=/usr/lib${LIBDIRSUFFIX} \
  200. --sysconfdir=/etc \
  201. --localstatedir=/var \
  202. --mandir=/usr/man \
  203. --docdir=/usr/doc/$PRGNAM-$VERSION/ESIM4 \
  204. --build=$ARCH-slackware-linux
  205. make
  206. make install DESTDIR=$PKG
  207. # Build HMMER
  208. cd $TMP/$PRGNAM-$VERSION/$HMMER
  209. CFLAGS="$SLKCFLAGS" \
  210. CXXFLAGS="$SLKCFLAGS" \
  211. ./configure \
  212. --prefix=/usr \
  213. --libdir=/usr/lib${LIBDIRSUFFIX} \
  214. --sysconfdir=/etc \
  215. --localstatedir=/var \
  216. --mandir=/usr/man \
  217. --docdir=/usr/doc/$PRGNAM-$VERSION/HMMER \
  218. --build=$ARCH-slackware-linux
  219. make
  220. make install DESTDIR=$PKG
  221. # Build IPRSCAN
  222. cd $TMP/$PRGNAM-$VERSION/$IPRSCAN
  223. CFLAGS="$SLKCFLAGS" \
  224. CXXFLAGS="$SLKCFLAGS" \
  225. ./configure \
  226. --prefix=/usr \
  227. --libdir=/usr/lib${LIBDIRSUFFIX} \
  228. --sysconfdir=/etc \
  229. --localstatedir=/var \
  230. --mandir=/usr/man \
  231. --docdir=/usr/doc/$PRGNAM-$VERSION/IPRSCAN \
  232. --build=$ARCH-slackware-linux
  233. make
  234. make install DESTDIR=$PKG
  235. # Build MEME
  236. cd $TMP/$PRGNAM-$VERSION/$MEME
  237. CFLAGS="$SLKCFLAGS" \
  238. CXXFLAGS="$SLKCFLAGS" \
  239. ./configure \
  240. --prefix=/usr \
  241. --libdir=/usr/lib${LIBDIRSUFFIX} \
  242. --sysconfdir=/etc \
  243. --localstatedir=/var \
  244. --mandir=/usr/man \
  245. --docdir=/usr/doc/$PRGNAM-$VERSION/MEME \
  246. --build=$ARCH-slackware-linux
  247. make
  248. make install DESTDIR=$PKG
  249. # Build MSE
  250. cd $TMP/$PRGNAM-$VERSION/$MSE
  251. CFLAGS="$SLKCFLAGS" \
  252. CXXFLAGS="$SLKCFLAGS" \
  253. ./configure \
  254. --prefix=/usr \
  255. --libdir=/usr/lib${LIBDIRSUFFIX} \
  256. --sysconfdir=/etc \
  257. --localstatedir=/var \
  258. --mandir=/usr/man \
  259. --docdir=/usr/doc/$PRGNAM-$VERSION/MSE \
  260. --build=$ARCH-slackware-linux
  261. make
  262. make install DESTDIR=$PKG
  263. # Build MYEMBOSS
  264. cd $TMP/$PRGNAM-$VERSION/$MYEMBOSS
  265. CFLAGS="$SLKCFLAGS" \
  266. CXXFLAGS="$SLKCFLAGS" \
  267. ./configure \
  268. --prefix=/usr \
  269. --libdir=/usr/lib${LIBDIRSUFFIX} \
  270. --sysconfdir=/etc \
  271. --localstatedir=/var \
  272. --mandir=/usr/man \
  273. --docdir=/usr/doc/$PRGNAM-$VERSION/MYEMBOSS \
  274. --build=$ARCH-slackware-linux
  275. make
  276. make install DESTDIR=$PKG
  277. # Build MYEMBOSSDEMO
  278. cd $TMP/$PRGNAM-$VERSION/$MYEMBOSSDEMO
  279. CFLAGS="$SLKCFLAGS" \
  280. CXXFLAGS="$SLKCFLAGS" \
  281. ./configure \
  282. --prefix=/usr \
  283. --libdir=/usr/lib${LIBDIRSUFFIX} \
  284. --sysconfdir=/etc \
  285. --localstatedir=/var \
  286. --mandir=/usr/man \
  287. --docdir=/usr/doc/$PRGNAM-$VERSION/MYEMBOSSDEMO \
  288. --build=$ARCH-slackware-linux
  289. make
  290. make install DESTDIR=$PKG
  291. # Build PHYLIPNEW
  292. cd $TMP/$PRGNAM-$VERSION/$PHYLIPNEW
  293. CFLAGS="$SLKCFLAGS -fcommon" \
  294. CXXFLAGS="$SLKCFLAGS -fcommon" \
  295. ./configure \
  296. --prefix=/usr \
  297. --libdir=/usr/lib${LIBDIRSUFFIX} \
  298. --sysconfdir=/etc \
  299. --localstatedir=/var \
  300. --mandir=/usr/man \
  301. --docdir=/usr/doc/$PRGNAM-$VERSION/PHYLIPNEW \
  302. --build=$ARCH-slackware-linux
  303. make
  304. make install DESTDIR=$PKG
  305. # Build SIGNATURE
  306. cd $TMP/$PRGNAM-$VERSION/$SIGNATURE
  307. CFLAGS="$SLKCFLAGS" \
  308. CXXFLAGS="$SLKCFLAGS" \
  309. ./configure \
  310. --prefix=/usr \
  311. --libdir=/usr/lib${LIBDIRSUFFIX} \
  312. --sysconfdir=/etc \
  313. --localstatedir=/var \
  314. --mandir=/usr/man \
  315. --docdir=/usr/doc/$PRGNAM-$VERSION/SIGNATURE \
  316. --build=$ARCH-slackware-linux
  317. make
  318. make install DESTDIR=$PKG
  319. # Build STRUCTURE
  320. cd $TMP/$PRGNAM-$VERSION/$STRUCTURE
  321. CFLAGS="$SLKCFLAGS" \
  322. CXXFLAGS="$SLKCFLAGS" \
  323. ./configure \
  324. --prefix=/usr \
  325. --libdir=/usr/lib${LIBDIRSUFFIX} \
  326. --sysconfdir=/etc \
  327. --localstatedir=/var \
  328. --mandir=/usr/man \
  329. --docdir=/usr/doc/$PRGNAM-$VERSION/STRUCTURE \
  330. --build=$ARCH-slackware-linux
  331. make
  332. make install DESTDIR=$PKG
  333. # Build TOPO
  334. cd $TMP/$PRGNAM-$VERSION/$TOPO
  335. CFLAGS="$SLKCFLAGS" \
  336. CXXFLAGS="$SLKCFLAGS" \
  337. ./configure \
  338. --prefix=/usr \
  339. --libdir=/usr/lib${LIBDIRSUFFIX} \
  340. --sysconfdir=/etc \
  341. --localstatedir=/var \
  342. --mandir=/usr/man \
  343. --docdir=/usr/doc/$PRGNAM-$VERSION/TOPO \
  344. --build=$ARCH-slackware-linux
  345. make
  346. make install DESTDIR=$PKG
  347. # Build VIENNA
  348. cd $TMP/$PRGNAM-$VERSION/$VIENNA
  349. # -std=gnu89 fixes build with gcc-5.2 (inline functions HairpinE and LoopEnergy)
  350. CFLAGS="$SLKCFLAGS -std=gnu89" \
  351. CXXFLAGS="$SLKCFLAGS -std=gnu89" \
  352. ./configure \
  353. --prefix=/usr \
  354. --libdir=/usr/lib${LIBDIRSUFFIX} \
  355. --sysconfdir=/etc \
  356. --localstatedir=/var \
  357. --mandir=/usr/man \
  358. --docdir=/usr/doc/$PRGNAM-$VERSION/VIENNA \
  359. --build=$ARCH-slackware-linux
  360. make
  361. make install DESTDIR=$PKG
  362. find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
  363. | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
  364. mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
  365. cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
  366. cat $CWD/CONTENTS > $PKG/usr/doc/$PRGNAM-$VERSION/CONTENTS
  367. rm -f $PKG/usr/lib*/*.la
  368. mkdir -p $PKG/install
  369. cat $CWD/slack-desc > $PKG/install/slack-desc
  370. cd $PKG
  371. /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE