EMBASSY.SlackBuild 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395
  1. #!/bin/sh
  2. # Slackware build script for EMBASSY
  3. # Copyright 2011-2013 Petar Petrov, petar.petrov@student.oulu.fi
  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. PRGNAM=EMBASSY
  23. VERSION=${VERSION:-6.6.0} # Keep this the same version as EMBOSS
  24. BUILD=${BUILD:-1}
  25. TAG=${TAG:-_SBo}
  26. if [ -z "$ARCH" ]; then
  27. case "$( uname -m )" in
  28. i?86) ARCH=i486 ;;
  29. arm*) ARCH=arm ;;
  30. *) ARCH=$( uname -m ) ;;
  31. esac
  32. fi
  33. CWD=$(pwd)
  34. TMP=${TMP:-/tmp/SBo}
  35. PKG=$TMP/package-$PRGNAM
  36. OUTPUT=${OUTPUT:-/tmp}
  37. if [ "$ARCH" = "i486" ]; then
  38. SLKCFLAGS="-O2 -march=i486 -mtune=i686"
  39. LIBDIRSUFFIX=""
  40. elif [ "$ARCH" = "i686" ]; then
  41. SLKCFLAGS="-O2 -march=i686 -mtune=i686"
  42. LIBDIRSUFFIX=""
  43. elif [ "$ARCH" = "x86_64" ]; then
  44. SLKCFLAGS="-O2 -fPIC"
  45. LIBDIRSUFFIX="64"
  46. else
  47. SLKCFLAGS="-O2"
  48. LIBDIRSUFFIX=""
  49. fi
  50. # EMBASSY components and their versions
  51. CBSTOOLS=CBSTOOLS-1.0.0.650
  52. CLUSTALOMEGA=CLUSTALOMEGA-1.1.0
  53. DOMAINATRIX=DOMAINATRIX-0.1.650
  54. DOMALIGN=DOMALIGN-0.1.650
  55. DOMSEARCH=DOMSEARCH-0.1.650
  56. EMNU=EMNU-1.05.650
  57. ESIM4=ESIM4-1.0.0.650
  58. HMMER=HMMER-2.3.2.650
  59. IPRSCAN=IPRSCAN-4.3.1.650
  60. MEME=MEME-4.7.650
  61. MSE=MSE-3.0.0.650
  62. MYEMBOSS=MYEMBOSS-6.5.1
  63. MYEMBOSSDEMO=MYEMBOSSDEMO-6.5.0
  64. PHYLIPNEW=PHYLIPNEW-3.69.650
  65. SIGNATURE=SIGNATURE-0.1.650
  66. STRUCTURE=STRUCTURE-0.1.650
  67. TOPO=TOPO-2.0.650
  68. VIENNA=VIENNA-1.7.2.650
  69. set -e
  70. rm -rf $PKG
  71. mkdir -p $TMP $PKG $OUTPUT
  72. cd $TMP
  73. rm -rf $PRGNAM-$VERSION
  74. mkdir $TMP/$PRGNAM-$VERSION
  75. cd $TMP/$PRGNAM-$VERSION
  76. # Extract the components
  77. tar xvf $CWD/$CBSTOOLS.tar.gz
  78. tar xvf $CWD/$CLUSTALOMEGA.tar.gz
  79. tar xvf $CWD/$DOMAINATRIX.tar.gz
  80. tar xvf $CWD/$DOMALIGN.tar.gz
  81. tar xvf $CWD/$DOMSEARCH.tar.gz
  82. tar xvf $CWD/$EMNU.tar.gz
  83. tar xvf $CWD/$ESIM4.tar.gz
  84. tar xvf $CWD/$HMMER.tar.gz
  85. tar xvf $CWD/$IPRSCAN.tar.gz
  86. tar xvf $CWD/$MEME.tar.gz
  87. tar xvf $CWD/$MSE.tar.gz
  88. tar xvf $CWD/$MYEMBOSS.tar.gz
  89. tar xvf $CWD/$MYEMBOSSDEMO.tar.gz
  90. tar xvf $CWD/$PHYLIPNEW.tar.gz
  91. tar xvf $CWD/$SIGNATURE.tar.gz
  92. tar xvf $CWD/$STRUCTURE.tar.gz
  93. tar xvf $CWD/$TOPO.tar.gz
  94. tar xvf $CWD/$VIENNA.tar.gz
  95. chown -R root:root .
  96. find -L . \
  97. \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
  98. -o -perm 511 \) -exec chmod 755 {} \; -o \
  99. \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
  100. -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
  101. # Build CBSTOOLS
  102. cd $TMP/$PRGNAM-$VERSION/$CBSTOOLS
  103. CFLAGS="$SLKCFLAGS" \
  104. CXXFLAGS="$SLKCFLAGS" \
  105. ./configure \
  106. --prefix=/usr \
  107. --libdir=/usr/lib${LIBDIRSUFFIX} \
  108. --sysconfdir=/etc \
  109. --localstatedir=/var \
  110. --mandir=/usr/man \
  111. --docdir=/usr/doc/$PRGNAM-$VERSION/CBSTOOLS \
  112. --build=$ARCH-slackware-linux
  113. make
  114. make install DESTDIR=$PKG
  115. # Build CLUSTALOMEGA
  116. cd $TMP/$PRGNAM-$VERSION/$CLUSTALOMEGA
  117. CFLAGS="$SLKCFLAGS" \
  118. CXXFLAGS="$SLKCFLAGS" \
  119. ./configure \
  120. --prefix=/usr \
  121. --libdir=/usr/lib${LIBDIRSUFFIX} \
  122. --sysconfdir=/etc \
  123. --localstatedir=/var \
  124. --mandir=/usr/man \
  125. --docdir=/usr/doc/$PRGNAM-$VERSION/CLUSTALOMEGA \
  126. --build=$ARCH-slackware-linux
  127. make
  128. make install DESTDIR=$PKG
  129. # Build DOMAINATRIX
  130. cd $TMP/$PRGNAM-$VERSION/$DOMAINATRIX
  131. CFLAGS="$SLKCFLAGS" \
  132. CXXFLAGS="$SLKCFLAGS" \
  133. ./configure \
  134. --prefix=/usr \
  135. --libdir=/usr/lib${LIBDIRSUFFIX} \
  136. --sysconfdir=/etc \
  137. --localstatedir=/var \
  138. --mandir=/usr/man \
  139. --docdir=/usr/doc/$PRGNAM-$VERSION/DOMAINATRIX \
  140. --build=$ARCH-slackware-linux
  141. make
  142. make install DESTDIR=$PKG
  143. # Build DOMALIGN
  144. cd $TMP/$PRGNAM-$VERSION/$DOMALIGN
  145. CFLAGS="$SLKCFLAGS" \
  146. CXXFLAGS="$SLKCFLAGS" \
  147. ./configure \
  148. --prefix=/usr \
  149. --libdir=/usr/lib${LIBDIRSUFFIX} \
  150. --sysconfdir=/etc \
  151. --localstatedir=/var \
  152. --mandir=/usr/man \
  153. --docdir=/usr/doc/$PRGNAM-$VERSION/DOMALIGN \
  154. --build=$ARCH-slackware-linux
  155. make
  156. make install DESTDIR=$PKG
  157. # Build DOMSEARCH
  158. cd $TMP/$PRGNAM-$VERSION/$DOMSEARCH
  159. CFLAGS="$SLKCFLAGS" \
  160. CXXFLAGS="$SLKCFLAGS" \
  161. ./configure \
  162. --prefix=/usr \
  163. --libdir=/usr/lib${LIBDIRSUFFIX} \
  164. --sysconfdir=/etc \
  165. --localstatedir=/var \
  166. --mandir=/usr/man \
  167. --docdir=/usr/doc/$PRGNAM-$VERSION/DOMSEARCH \
  168. --build=$ARCH-slackware-linux
  169. make
  170. make install DESTDIR=$PKG
  171. # Build EMNU
  172. cd $TMP/$PRGNAM-$VERSION/$EMNU
  173. CFLAGS="$SLKCFLAGS" \
  174. CXXFLAGS="$SLKCFLAGS" \
  175. ./configure \
  176. --prefix=/usr \
  177. --libdir=/usr/lib${LIBDIRSUFFIX} \
  178. --sysconfdir=/etc \
  179. --localstatedir=/var \
  180. --mandir=/usr/man \
  181. --docdir=/usr/doc/$PRGNAM-$VERSION/EMNU \
  182. --build=$ARCH-slackware-linux
  183. make
  184. make install DESTDIR=$PKG
  185. # Build ESIM4
  186. cd $TMP/$PRGNAM-$VERSION/$ESIM4
  187. CFLAGS="$SLKCFLAGS" \
  188. CXXFLAGS="$SLKCFLAGS" \
  189. ./configure \
  190. --prefix=/usr \
  191. --libdir=/usr/lib${LIBDIRSUFFIX} \
  192. --sysconfdir=/etc \
  193. --localstatedir=/var \
  194. --mandir=/usr/man \
  195. --docdir=/usr/doc/$PRGNAM-$VERSION/ESIM4 \
  196. --build=$ARCH-slackware-linux
  197. make
  198. make install DESTDIR=$PKG
  199. # Build HMMER
  200. cd $TMP/$PRGNAM-$VERSION/$HMMER
  201. CFLAGS="$SLKCFLAGS" \
  202. CXXFLAGS="$SLKCFLAGS" \
  203. ./configure \
  204. --prefix=/usr \
  205. --libdir=/usr/lib${LIBDIRSUFFIX} \
  206. --sysconfdir=/etc \
  207. --localstatedir=/var \
  208. --mandir=/usr/man \
  209. --docdir=/usr/doc/$PRGNAM-$VERSION/HMMER \
  210. --build=$ARCH-slackware-linux
  211. make
  212. make install DESTDIR=$PKG
  213. # Build IPRSCAN
  214. cd $TMP/$PRGNAM-$VERSION/$IPRSCAN
  215. CFLAGS="$SLKCFLAGS" \
  216. CXXFLAGS="$SLKCFLAGS" \
  217. ./configure \
  218. --prefix=/usr \
  219. --libdir=/usr/lib${LIBDIRSUFFIX} \
  220. --sysconfdir=/etc \
  221. --localstatedir=/var \
  222. --mandir=/usr/man \
  223. --docdir=/usr/doc/$PRGNAM-$VERSION/IPRSCAN \
  224. --build=$ARCH-slackware-linux
  225. make
  226. make install DESTDIR=$PKG
  227. # Build MEME
  228. cd $TMP/$PRGNAM-$VERSION/$MEME
  229. CFLAGS="$SLKCFLAGS" \
  230. CXXFLAGS="$SLKCFLAGS" \
  231. ./configure \
  232. --prefix=/usr \
  233. --libdir=/usr/lib${LIBDIRSUFFIX} \
  234. --sysconfdir=/etc \
  235. --localstatedir=/var \
  236. --mandir=/usr/man \
  237. --docdir=/usr/doc/$PRGNAM-$VERSION/MEME \
  238. --build=$ARCH-slackware-linux
  239. make
  240. make install DESTDIR=$PKG
  241. # Build MSE
  242. cd $TMP/$PRGNAM-$VERSION/$MSE
  243. CFLAGS="$SLKCFLAGS" \
  244. CXXFLAGS="$SLKCFLAGS" \
  245. ./configure \
  246. --prefix=/usr \
  247. --libdir=/usr/lib${LIBDIRSUFFIX} \
  248. --sysconfdir=/etc \
  249. --localstatedir=/var \
  250. --mandir=/usr/man \
  251. --docdir=/usr/doc/$PRGNAM-$VERSION/MSE \
  252. --build=$ARCH-slackware-linux
  253. make
  254. make install DESTDIR=$PKG
  255. # Build MYEMBOSS
  256. cd $TMP/$PRGNAM-$VERSION/$MYEMBOSS
  257. CFLAGS="$SLKCFLAGS" \
  258. CXXFLAGS="$SLKCFLAGS" \
  259. ./configure \
  260. --prefix=/usr \
  261. --libdir=/usr/lib${LIBDIRSUFFIX} \
  262. --sysconfdir=/etc \
  263. --localstatedir=/var \
  264. --mandir=/usr/man \
  265. --docdir=/usr/doc/$PRGNAM-$VERSION/MYEMBOSS \
  266. --build=$ARCH-slackware-linux
  267. make
  268. make install DESTDIR=$PKG
  269. # Build MYEMBOSSDEMO
  270. cd $TMP/$PRGNAM-$VERSION/$MYEMBOSSDEMO
  271. CFLAGS="$SLKCFLAGS" \
  272. CXXFLAGS="$SLKCFLAGS" \
  273. ./configure \
  274. --prefix=/usr \
  275. --libdir=/usr/lib${LIBDIRSUFFIX} \
  276. --sysconfdir=/etc \
  277. --localstatedir=/var \
  278. --mandir=/usr/man \
  279. --docdir=/usr/doc/$PRGNAM-$VERSION/MYEMBOSSDEMO \
  280. --build=$ARCH-slackware-linux
  281. make
  282. make install DESTDIR=$PKG
  283. # Build PHYLIPNEW
  284. cd $TMP/$PRGNAM-$VERSION/$PHYLIPNEW
  285. CFLAGS="$SLKCFLAGS" \
  286. CXXFLAGS="$SLKCFLAGS" \
  287. ./configure \
  288. --prefix=/usr \
  289. --libdir=/usr/lib${LIBDIRSUFFIX} \
  290. --sysconfdir=/etc \
  291. --localstatedir=/var \
  292. --mandir=/usr/man \
  293. --docdir=/usr/doc/$PRGNAM-$VERSION/PHYLIPNEW \
  294. --build=$ARCH-slackware-linux
  295. make
  296. make install DESTDIR=$PKG
  297. # Build SIGNATURE
  298. cd $TMP/$PRGNAM-$VERSION/$SIGNATURE
  299. CFLAGS="$SLKCFLAGS" \
  300. CXXFLAGS="$SLKCFLAGS" \
  301. ./configure \
  302. --prefix=/usr \
  303. --libdir=/usr/lib${LIBDIRSUFFIX} \
  304. --sysconfdir=/etc \
  305. --localstatedir=/var \
  306. --mandir=/usr/man \
  307. --docdir=/usr/doc/$PRGNAM-$VERSION/SIGNATURE \
  308. --build=$ARCH-slackware-linux
  309. make
  310. make install DESTDIR=$PKG
  311. # Build STRUCTURE
  312. cd $TMP/$PRGNAM-$VERSION/$STRUCTURE
  313. CFLAGS="$SLKCFLAGS" \
  314. CXXFLAGS="$SLKCFLAGS" \
  315. ./configure \
  316. --prefix=/usr \
  317. --libdir=/usr/lib${LIBDIRSUFFIX} \
  318. --sysconfdir=/etc \
  319. --localstatedir=/var \
  320. --mandir=/usr/man \
  321. --docdir=/usr/doc/$PRGNAM-$VERSION/STRUCTURE \
  322. --build=$ARCH-slackware-linux
  323. make
  324. make install DESTDIR=$PKG
  325. # Build TOPO
  326. cd $TMP/$PRGNAM-$VERSION/$TOPO
  327. CFLAGS="$SLKCFLAGS" \
  328. CXXFLAGS="$SLKCFLAGS" \
  329. ./configure \
  330. --prefix=/usr \
  331. --libdir=/usr/lib${LIBDIRSUFFIX} \
  332. --sysconfdir=/etc \
  333. --localstatedir=/var \
  334. --mandir=/usr/man \
  335. --docdir=/usr/doc/$PRGNAM-$VERSION/TOPO \
  336. --build=$ARCH-slackware-linux
  337. make
  338. make install DESTDIR=$PKG
  339. # Build VIENNA
  340. cd $TMP/$PRGNAM-$VERSION/$VIENNA
  341. CFLAGS="$SLKCFLAGS" \
  342. CXXFLAGS="$SLKCFLAGS" \
  343. ./configure \
  344. --prefix=/usr \
  345. --libdir=/usr/lib${LIBDIRSUFFIX} \
  346. --sysconfdir=/etc \
  347. --localstatedir=/var \
  348. --mandir=/usr/man \
  349. --docdir=/usr/doc/$PRGNAM-$VERSION/VIENNA \
  350. --build=$ARCH-slackware-linux
  351. make
  352. make install DESTDIR=$PKG
  353. find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
  354. | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
  355. mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
  356. cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
  357. cat $CWD/CONTENTS > $PKG/usr/doc/$PRGNAM-$VERSION/CONTENTS
  358. mkdir -p $PKG/install
  359. cat $CWD/slack-desc > $PKG/install/slack-desc
  360. cd $PKG
  361. /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}