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

Molden PKGBUILD (updated)

By: a guest on May 20th, 2012  |  syntax: Bash  |  size: 1.24 KB  |  views: 38  |  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. pkgname=molden
  2. pkgver=5.0
  3. pkgrel=4
  4. changelog=molden.changelog
  5. pkgdesc="Z-matrix molecular builder and viewer of quantum chemical calculations"
  6. arch=('i686' 'x86_64')
  7. url="http://www.cmbi.ru.nl/molden/molden.html"
  8. license=('custom')
  9. depends=('mesa' 'libxmu')
  10. makedepends=('gcc-fortran')
  11. source=($pkgname.desktop)
  12. md5sums=('d49d3dc4b7b3a449bb48c48a679d10b6')
  13.  
  14. build() {
  15.   cd "$srcdir"
  16.  
  17.   _tarball="ftp://ftp.cmbi.ru.nl/pub/molgraph/molden/$pkgname$pkgver.tar.gz"
  18.  
  19.   # download source code (tarball always has a different md5 sum)
  20.   if [[ ! -f $pkgname$pkgver.tar.gz ]]; then
  21.     curl $_tarball -o $pkgname$pkgver.tar.gz
  22.   fi
  23.  
  24.   rm -rf $pkgname$pkgver
  25.   bsdtar -xf $pkgname$pkgver.tar.gz
  26.   cd $pkgname$pkgver
  27.  
  28.   # make
  29.   mv -f CopyRight LICENSE
  30.   make molden gmolden ambfor/{ambfor,ambmd}
  31. }
  32.  
  33. package() {
  34.   cd "$srcdir"/$pkgname$pkgver
  35.  
  36.   # install binaries
  37.   install -m755 -d "$pkgdir"/usr/bin
  38.   install -m755 -t "$pkgdir"/usr/bin molden gmolden ambfor/{ambfor,ambmd}
  39.  
  40.   # install licenses and .desktop file
  41.   install -m755 -d "$pkgdir"/usr/share/{licenses/$pkgname,applications}
  42.   install -m644 -t "$pkgdir"/usr/share/licenses/$pkgname {COMMERCIAL_,}LICENSE
  43.   install -m644 -t "$pkgdir"/usr/share/applications ../$pkgname.desktop
  44. }