Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Dec 13th, 2011  |  syntax: None  |  size: 1.75 KB  |  views: 21  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. # Contributor & Maintainer: machoo02 <ichthyoboy@gmail.com>
  2. # Contributor: mutlu_inek <mutlu_inek@yahoo.de>
  3.  
  4. pkgname=bibus
  5. pkgver=1.5.2
  6. pkgrel=1
  7. pkgdesc="A bibliographic database that can directly insert references in \
  8. OpenOffice.org and generate the bibliographic index."
  9. url="http://sourceforge.net/projects/bibus-biblio/"
  10. license="GPL"
  11. arch=('any')
  12. depends=('python-pysqlite' 'wxpython' 'pyxml' 'unixodbc' 'hicolor-icon-theme')
  13. optdepends=('libreoffice' 'openoffice-base-bin')
  14. source=(http://downloads.sourceforge.net/project/${pkgname}-biblio/${pkgname}-biblio/${pkgname}-${pkgver}/${pkgname}_${pkgver}.orig.tar.gz)
  15.  
  16. md5sums=('5bb8b26d0980ebb72a2882b618fbe62c')
  17. install=${pkgname}.install
  18. backup=(etc/bibus.config)
  19.  
  20. package() {
  21.   cd "$srcdir/$pkgname-$pkgver"
  22.  
  23.   if [[ -d /usr/lib/libreoffice ]]; then
  24.         export oopath=/usr/lib/libreoffice/program
  25.         export ooure=/usr/lib/libreoffice/basis-link/ure-link/lib
  26.         export oobasis=/usr/lib/libreoffice/basis-link/program
  27.   elif [[ -d /opt/openoffice.org3 ]]; then
  28.         export oopath=/opt/openoffice.org3/program
  29.         export ooure=/opt/openoffice.org3/basis-link/ure-link/lib
  30.         export oobasis=/opt/openoffice.org3/basis-link/program
  31.   fi
  32.  
  33.   make -f Setup/Makefile DESTDIR="$pkgdir/usr" python=/usr/bin/python2 \
  34.         sysconfdir="$pkgdir/etc" oopath=$oopath ooure=$ooure oobasis=$oobasis install
  35.   rm "$pkgdir/usr/bin/bibus"
  36.   ln -s /usr/share/bibus/bibusStart.py "$pkgdir/usr/bin/bibus"
  37.   rm "$pkgdir/usr/share/bibus/Setup/uninstall.sh"
  38.  
  39.   ## Fix .py files for python2
  40.   sed -i -e "s|#![ ]*/usr/bin/python$|#!/usr/bin/python2|" \
  41.       -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \
  42.       $(find $pkgdir -name '*.py')
  43.      
  44.   sed -i -e "s|${pkgdir}||g" "${pkgdir}/usr/share/bibus/bibus.cfg"
  45. }
  46.  
  47.  
  48.  
clone this paste RAW Paste Data