Pastebin launched a little side project called HostCabi.net, check it out ;-)Don't like ads? PRO users don't see any ads ;-)
Guest

mendeleydesktop 0.9.7.1 PKGBUILD

By: a guest on Jun 25th, 2010  |  syntax: Bash  |  size: 3.12 KB  |  hits: 160  |  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: Christopher Schwaab -- christopher.schwaab gmail
  2. pkgname=mendeleydesktop
  3. pkgver=0.9.7.1
  4. pkgrel=1
  5. url="http://www.mendeley.com/"
  6. pkgdesc="The desktop client for managing and sharing research papers."
  7. license=('custom:mendeley_eula')
  8. arch=('i686' 'x86_64')
  9. [ $CARCH = 'x86_64' ] && _arch='x86_64'
  10. [ $CARCH = 'i686' ]   && _arch='i486'
  11. source=("http://www.mendeley.com/downloads/linux/$pkgname-$pkgver-linux-$_arch.tar.bz2")
  12. [ $CARCH = 'x86_64' ] && md5sums=('24c7dfd13209e4f781e0fd01f1c7aa03')
  13. [ $CARCH = 'i686' ]   && md5sums=('df77272d6503e67386812790f53fd73f')
  14. depends=('qt' 'openssl' 'sqlite3' 'openssl-compatibility' 'libpng12')
  15. makedepends=('cpio')
  16.  
  17. _use_sys_libs=""
  18. #_use_sys_libs="libQtCore.so.4
  19. #               libQtSvg.so.4
  20. #               libQtGui.so.4
  21. #               libQtXml.so.4
  22. #               libQtNetwork.so.4
  23. #               libQtSql.so.4"
  24. build() {
  25.         cd $srcdir/$pkgname-$pkgver-linux-$_arch
  26.  
  27.         mkdir -p $pkgdir/opt/mendeleydesktop/{bin,lib,plugins}
  28.         mkdir -p $pkgdir/usr/{bin,lib}
  29.  
  30.         rm -f INSTALL README
  31.  
  32.         # install libs
  33.         pushd lib && rm -f $_use_sys_libs && popd || return 1
  34.         mv lib/libMendeley.so lib/libMendeley.so.0.9 \
  35.            $pkgdir/usr/lib/ || return 1
  36.         install -m755 lib/libMendeley.so.0.9.7.1 \
  37.                       lib/libPDFNetC.so \
  38.                       $pkgdir/usr/lib/ || return 1
  39.         install -m755 lib/libpng.so.3 lib/libssl.so.0 \
  40.                       lib/libQtGui.so.4 \
  41.                       lib/libQtSvg.so.4 \
  42.                       lib/libQtNetwork.so.4  \
  43.                       lib/libQtXml.so.4 \
  44.                       lib/libQtCore.so.4 \
  45.                       lib/libQtSql.so.4 \
  46.                       $pkgdir/opt/mendeleydesktop/lib || return 1
  47.  
  48.         # install actual executables with pointer to sqlite plugin
  49.         cat > $pkgdir/opt/mendeleydesktop/bin/qt.conf <<__EOF__
  50. [Paths]
  51. plugins=/opt/mendeleydesktop/plugins
  52. __EOF__
  53.         install -m755 \
  54.            lib/mendeleydesktop/libexec/{Updater,mendeleydesktop.$_arch} \
  55.            $pkgdir/opt/mendeleydesktop/bin || return 1
  56.         tar -cf - -C lib/mendeleydesktop/plugins . | \
  57.           tar -C $pkgdir/opt/mendeleydesktop/plugins/ -xpf - || return 1
  58.         ln -s /usr/share/mendeleydesktop/ $pkgdir/opt/mendeleydesktop/bin/share
  59.  
  60.         # install launcher and fix up path
  61.         sed -i "s~\"\$LOCAL_LIB_PATH\"/mendeleydesktop/libexec/~LD_LIBRARY_PATH=/opt/mendeleydesktop/lib:\$LD_LIBRARY_PATH /opt/mendeleydesktop/bin/~" \
  62.                bin/mendeleydesktop || return 1
  63.         install -D -m755 bin/mendeleydesktop \
  64.                          $pkgdir/usr/bin/mendeleydesktop || return 1
  65.  
  66.         # install license and resources
  67.         install -D -m644 LICENSE \
  68.                          $pkgdir/usr/share/licenses/$pkgname/LICENSE || return 1
  69.         rm -f LICENSE
  70.  
  71.         find share/ | cpio -p -dum $pkgdir/usr || return 1
  72.         install -Dm644 share/icons/hicolor/48x48/apps/mendeleydesktop.png \
  73.                        $pkgdir/usr/share/pixmaps/mendeleydesktop.png || return 1
  74.         rm -rf share/{applications,icons}
  75.  
  76. }