Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

scrivener

By: a guest on Apr 24th, 2012  |  syntax: Bash  |  size: 1.61 KB  |  views: 55  |  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.  
  2. pkgname=scrivener
  3. pkgver=1.1.0
  4. pkgrel=1
  5. pkgdesc="A powerful content-generation tool for writers."
  6. arch=(i686 x86_64)
  7. url="http://literatureandlatte.com/scrivener.php"
  8. license=('custom:scrivener')
  9. if [ $CARCH == i686 ]; then
  10.     depends=(qt gstreamer0.10-base)
  11. elif [ $CARCH == x86_64 ]; then
  12.     depends=(lib32-qt lib32-gstreamer0.10-base)
  13. fi
  14. options=('!emptydirs')
  15. source=("http://www.literatureandlatte.com/scrivenerforlinux/$pkgname-$pkgver-beta.deb")
  16. md5sums=('33fd09dd0d7aae1d61428bbbe1a39cef')
  17.  
  18. build() {
  19.   ar p $pkgname-$pkgver-beta.deb data.tar.gz | tar xz
  20.  
  21.   install -d -m755 "$pkgdir/opt/$pkgname"
  22.   mv usr/share/scrivener/bin/* "$pkgdir/opt/$pkgname/"
  23.   mv usr/share/scrivener/lib "$pkgdir/opt/$pkgname/"
  24.  
  25.   # Change Dir to save some "$pkgdir"
  26.   cd "$pkgdir"
  27.   mv "${srcdir}"/usr/ .
  28.   rm -rf usr/share/menu
  29.  
  30.   # license, copyright and docs
  31.   mkdir -p usr/share/licenses/$pkgname
  32.   mv usr/share/scrivener/licence.htm usr/share/licenses/$pkgname/
  33.   mv usr/share/doc/scrivener/copyright usr/share/licenses/$pkgname/
  34.   rm usr/share/doc/$pkgname/changelog.gz
  35.   mv usr/share/scrivener/readme.txt usr/share/doc/$pkgname/
  36.  
  37.   # fix the dirs in the script
  38.   cat > usr/bin/Scrivener << EOF
  39. #!/bin/sh
  40. LD_LIBRARY_PATH=/opt/$pkgname/lib /opt/$pkgname/Scrivener
  41. EOF
  42.  
  43.  # These filenames are bugged, messing up my compilation. Will someone miss them if removed?
  44.  rm opt/scrivener/Aspell/dict/portugu*s.alias
  45.  rm opt/scrivener/Aspell/dict/espa*ol.alias
  46.  rm opt/scrivener/Aspell/dict/rom*ne*te.alias
  47.  rm opt/scrivener/Aspell/dict/f*royskt.alias
  48.  
  49.  # libtool files, what for?
  50.  rm opt/scrivener/lib/*.la
  51.  
  52. }