daily pastebin goal
8%
SHARE
TWEET

Untitled

a guest Sep 28th, 2015 12 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #Maintainer: allencch <allencch at hotmail dot com>
  2. #Contributor: Charles E. Vejnar
  3. pkgname=meme
  4. pkgver=4.10.2
  5. pkgrel=1
  6. pkgdesc="The MEME suite provides tools for discovering and using protein and DNA sequence motifs"
  7. arch=("i686" "x86_64")
  8. url="http://meme-suite.org/"
  9. license=("custom")
  10. depends=(perl-html-template tcsh python2 perl-xml-parser openmpi)
  11. source=("http://meme-suite.org/meme-software/${pkgver}/meme_${pkgver}.tar.gz"
  12.         "python27.patch")
  13. sha1sums=("230a52664c4739354f2ac79ace9b55f3dd2fde8d"
  14.           "737b1ef7cb277412c2fff692a2e9b2a261e1b532")
  15.  
  16. prepare() {
  17.     cd $srcdir/${pkgname}_${pkgver%_*}
  18.  
  19.     patch -p1 -i "${srcdir}/python27.patch"
  20. }
  21.  
  22. build() {
  23.     cd $srcdir/${pkgname}_${pkgver%_*}
  24.  
  25.     LDFLAGS="-Wl,--allow-multiple-definition" ./configure --prefix=/usr --program-prefix="meme-" --docdir='${prefix}'/usr/share/doc/meme --sysconfdir='${prefix}'/../etc/meme --with-python=/usr/bin/python2.7
  26.  
  27.     make
  28. }
  29.  
  30. package() {
  31.     cd "${srcdir}/${pkgname}_${pkgver%_*}"
  32.  
  33.     make prefix="${pkgdir}/usr" install
  34.  
  35.     # Move Python modules to a more standard location
  36.     install -dm755 ${pkgdir}/usr/lib/python2.7/site-packages
  37.     for fname in $(ls -1 ${pkgdir}/usr/lib/python2.7/); do
  38.         if [[ $fname = *.py ]]; then
  39.             mv ${pkgdir}/usr/lib/python2.7/$fname ${pkgdir}/usr/lib/python2.7/site-packages/${fname#meme-}
  40.         fi
  41.     done
  42.  
  43.     # Rename Perl modules
  44.     for fname in $(ls -1 ${pkgdir}/usr/lib/perl/); do
  45.         if [[ $fname = meme-*.pm ]]; then
  46.             mv ${pkgdir}/usr/lib/perl/$fname ${pkgdir}/usr/lib/perl/${fname#meme-}
  47.         fi
  48.     done
  49.  
  50.     sed -i -e "s/\(PROG => \)/\1'meme-'./g" "${pkgdir}/usr/bin/meme-meme-chip"
  51.  
  52.     # get_meme_bin_file in src/utils.c does not deal well with meme- prefixes.
  53.     # It is being called three times in the source code:
  54.     # > grep 'get_meme_bin_file' src/meme_4.10.2/src/*.c
  55.     # src/meme_4.10.2/src/glam2_glam2.c:  glam2html = get_meme_bin_file("glam2html");
  56.     # src/meme_4.10.2/src/glam2_glam2.c:  glam2psfm = get_meme_bin_file("glam2psfm");
  57.     # src/meme_4.10.2/src/meme.c:    prog = get_meme_bin_file("meme_xml_to_html");
  58.     # Add symlinks for those files:
  59.     ln -s "${pkgdir}/usr/bin/meme-meme_xml_to_html" "${pkgdir}/usr/bin/meme_xml_to_html"
  60.     ln -s "${pkgdir}/usr/bin/meme-glam2html" "${pkgdir}/usr/bin/glam2html"
  61.     ln -s "${pkgdir}/usr/bin/meme-glam2psfm" "${pkgdir}/usr/bin/glam2psfm"
  62. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top