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

darteditor-pkgbuild-21658

By: a guest on Apr 19th, 2013  |  syntax: Bash  |  size: 2.49 KB  |  hits: 24  |  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 : T. Jameson Little <t.jameson.little@gmail.com>
  2. # Maintainer: Julien Nicoulaud <julien.nicoulaud@gmail.com>
  3. pkgname=dart-editor
  4. _pkgname=DartEditor
  5. pkgver=0.4.7.1_r21658
  6. pkgrel=1
  7. pkgdesc="Editor for the Dart programming language."
  8. arch=('i686' 'x86_64')
  9. url="http://www.dartlang.org/docs/editor/getting-started"
  10. license=('EPL')
  11. depends=('java-runtime>=6' 'gtk2' 'desktop-file-utils' 'gconf')
  12. makedepends=('unzip')
  13. backup=("opt/${pkgname}/${_pkgname}.ini")
  14. changelog=Changelog
  15.  
  16. if [[ ${CARCH} = x86_64 ]]; then
  17.         source=("https://storage.googleapis.com/dart-editor-archive-integration/21658/darteditor-linux-64.zip")
  18.     md5sums=('e58e908b42058bd93db4d27795718894')
  19. else
  20.         source=("https://storage.googleapis.com/dart-editor-archive-integration/21658/darteditor-linux-32.zip")
  21.         md5sums=('b58240c5caae793f60f8fc28879eaaf3')
  22. fi
  23.  
  24. build() {
  25.   msg2 "Generate desktop application entry..."
  26.   cat > "${srcdir}"/${pkgname}.desktop << EOF
  27. [Desktop Entry]
  28. Version=${pkgver}
  29. Encoding=UTF-8
  30. Name=Dart editor
  31. Comment=${pkgdesc}
  32. Exec=/usr/bin/${pkgname}
  33. Icon=/opt/${pkgname}/icon.xpm
  34. Terminal=false
  35. Type=Application
  36. Categories=Development;
  37. EOF
  38. }
  39.  
  40. package() {
  41.   msg2 "Install the assembly at /opt/${pkgname}..."
  42.   install -dm755           "${pkgdir}"/opt/${pkgname}
  43.   cp -a "${srcdir}"/dart/* "${pkgdir}"/opt/${pkgname}
  44.  
  45.   msg2 "Fix permissions"
  46.   chmod -R +r "${pkgdir}"/opt/${pkgname}/dart-sdk
  47.   chmod -R +r "${pkgdir}"/opt/${pkgname}/chromium
  48.   chmod +x "${pkgdir}"/opt/${pkgname}/dart-sdk/bin/*
  49.  
  50.   msg2 "Install links to the executables in /usr/bin..."
  51.   install -dm755                    "${pkgdir}"/usr/bin
  52.   ln -s /opt/${pkgname}/${_pkgname} "${pkgdir}"/usr/bin/${pkgname}
  53.   ln -s /opt/${pkgname}/${_pkgname} "${pkgdir}"/usr/bin/${_pkgname}
  54.  
  55.   msg2 "Install links to the documentation resources in /usr/share/doc/${pkgname}..."
  56.   install -dm755                    "${pkgdir}"/usr/share/doc/${pkgname}
  57.   ln -s /opt/${pkgname}/samples     "${pkgdir}"/usr/share/doc/${pkgname}/
  58.   ln -s /opt/${pkgname}/about.html  "${pkgdir}"/usr/share/doc/${pkgname}/
  59.   ln -s /opt/${pkgname}/about_files "${pkgdir}"/usr/share/doc/${pkgname}/
  60.  
  61.   msg2 "Install link to the config file in /etc..."
  62.   install -dm755                        "${pkgdir}"/etc
  63.   ln -s /opt/${pkgname}/${_pkgname}.ini "${pkgdir}"/etc/${pkgname}.ini
  64.  
  65.   msg2 "Install desktop application entry in /usr/share/applications..."
  66.   install -Dm644 "${srcdir}"/${pkgname}.desktop "${pkgdir}"/usr/share/applications/${pkgname}.desktop
  67. }