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

retext 4.0.1 PKGBUILD

By: a guest on Mar 26th, 2013  |  syntax: Bash  |  size: 2.26 KB  |  views: 67  |  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. # Maintainer:   Bartosz Chmura <chmurli@gmail.com>
  2. # Contributor: Alessio Sergi <asergi at archlinux dot us>
  3. # Contributor: alfplayer
  4.  
  5. pkgname=retext
  6. pkgver=4.0.1
  7. _pkgver=4.0
  8. pkgrel=1
  9. pkgdesc="A simple editor for Markdown and ReStructuredText markup languages"
  10. arch=('any')
  11. url="http://retext.sourceforge.net/"
  12. license=('GPL3')
  13. # for desktop integration: 'shared-mime-info' 'xdg-utils' 'desktop-file-utils'
  14. # for toolbar icons (see http://sourceforge.net/p/retext/tickets/44/): 'gconf'
  15. depends=('pyqt' 'python-markups' 'shared-mime-info' 'xdg-utils' 'desktop-file-utils' 'gconf')
  16. makedepends=('imagemagick')
  17. optdepends=('python-markdown: for Markdown language support'
  18.             'python-docutils: for reStructuredText language support'
  19.             'python-pyenchant: for spell checking support')
  20. source=("http://downloads.sourceforge.net/project/$pkgname/ReText-${_pkgver}/ReText-${pkgver}.tar.gz"
  21.         "$pkgname.desktop"
  22.         "x-retext-markdown.xml"
  23.         "x-retext-rst.xml")
  24. install="$pkgname".install
  25. sha256sums=('547f4d4cd6ca826963799a55e124ee22bbd2c1dc33fd11dc0d891cb66af8b77e'
  26.             '7782f4402fe62e48335c1bdd5c1fd5cbb48c408fabaf4f018a074f8b3eef838e'
  27.             'b51611479d3224eec2b58264ed91ace3eccb502b7b806dae3e7a3ab4aab8c4b8'
  28.             '6fef80cccb14813d9cc74810c397a6cd7831d1ca243536759a47c6e8b6cc977a')
  29.  
  30. package () {
  31.   cd "$srcdir/ReText-${pkgver}"
  32.   python setup.py install --root="$pkgdir"
  33.  
  34.   # rename bin scripts
  35.   mv $pkgdir/usr/bin/$pkgname.py $pkgdir/usr/bin/$pkgname
  36.   mv $pkgdir/usr/bin/wpgen.py $pkgdir/usr/bin/wpgen
  37.  
  38.   # create /usr/share/* dirs
  39.   _SHAREDIR="$pkgdir/usr/share"
  40.   install -d -m 755 $_SHAREDIR/{applications,mime/packages}
  41.  
  42.   # install icons
  43.   _ICONSDIR="$_SHAREDIR/icons/hicolor"
  44.   for size in 16 22 24 32 48 128; do
  45.     install -d -m 755 $_ICONSDIR/${size}x${size}/apps
  46.     convert -resize $size icons/$pkgname.png $_ICONSDIR/${size}x${size}/apps/$pkgname.png
  47.   done
  48.   install -d -m 755 $_ICONSDIR/scalable/apps
  49.   install -m 644 icons/$pkgname.svg $_ICONSDIR/scalable/apps/$pkgname.svg
  50.  
  51.   # install mime files
  52.   install -m 644 $srcdir/x-retext-{markdown,rst}.xml $_SHAREDIR/mime/packages/
  53.  
  54.   # install desktop file
  55.   install -m 644 $srcdir/$pkgname.desktop $_SHAREDIR/applications/$pkgname.desktop
  56. }