Want more features on Pastebin? Sign Up, it's FREE!
Guest

Alice3 PKGBUILD

By: ZiphTech on Nov 5th, 2012  |  syntax: None  |  size: 2.91 KB  |  views: 46  |  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: Xiao-Long Chen <chenxiaolong@cxl.epac.to>
  2. pkgname=alice3
  3. pkgver=3.1.37.0.0
  4. pkgrel=1
  5. pkgdesc="An Educational Software that teaches students computer programming in a 3D environment"
  6. arch=('i686' 'x86_64')
  7. url="http://www.alice.org/"
  8. license=('custom')
  9. depends=('java-runtime')
  10. source=("http://alice.org/downloads/installers/Alice3_${pkgver}.zip")
  11. sha512sums=('04b986b1a22d213478c51f7863e83c8904514ea2361f8ab890954d75e0b9fda9c41810a85b85fdbc465f68b7f561a5d66efa1276e649b37044e7eee806b2df1c')
  12.  
  13. #This won't go in a repository. No need to waste time or CPU cycles
  14. #  compressing the package.
  15. PKGEXT=".pkg.tar"
  16.  
  17. #Install prefix
  18. PREFIX="/opt/Alice3"
  19.  
  20. package() {
  21.   cd "${srcdir}/Alice3"
  22.  
  23.   #Remove stuff not required for Alice on Linux
  24.   #  (created by a diff of: )
  25.   #  find /tmp/Alice3/installed/ | sort
  26.   #  find /tmp/Alice3/extracted/ | sort
  27.     #Windows stuff
  28.     msg "Removing Windows specific files..."
  29.       rm Alice3Icon.ico
  30.       rm Alice3.bat
  31.       rm -r application/windows-amd64/
  32.       rm -r application/windows-i586/
  33.       #JRE
  34.         rm -r auxiliary/jre1.6.0_21/
  35.     #Mac OS X stuff
  36.     msg "Removing Mac OS X specific files..."
  37.       rm -r Alice3.app/
  38.       rm -r application/macosx-10.4/
  39.       rm -r application/macosx-universal/
  40.       rm auxiliary/auxiliary/MacAuxiliary.txt
  41.  
  42.   #Other platform specific stuff
  43.     #Windows stuff
  44.     msg "Removing jogl libraries for Windows..."
  45.       rm -r ext/jogl/lib/windows-amd64/
  46.       rm -r ext/jogl/lib/windows-i586/
  47.     #Mac OS X stuff
  48.     msg "Removing jogl libraries for Mac OS X..."
  49.       rm -r ext/jogl/lib/macosx-universal/
  50.     #Solaris stuff
  51.     msg "Removing jogl libraries for Solaris..."
  52.       rm -r ext/jogl/lib/solaris-amd64/
  53.       rm -r ext/jogl/lib/solaris-i586/
  54.       rm -r ext/jogl/lib/solaris-sparc/
  55.       rm -r ext/jogl/lib/solaris-sparcv9/
  56.  
  57.   #Architecture specific files
  58.   if [ "${CARCH}" == "x86_64" ]; then
  59.     rm -r ext/jogl/lib/linux-i586/
  60.     rm -r application/linux-i586/
  61.     rm alice3.sh
  62.     mv alice364bit.sh alice3.sh
  63.   fi
  64.   if [ "${CARCH}" == "i586" ]; then
  65.     rm -r ext/jogl/lib/linux-amd64/
  66.     rm -r application/linux-amd64/
  67.     rm alice64bit.sh
  68.   fi
  69.  
  70.   #Install files
  71.   #Spaces don't work with this method
  72.   #for i in $(find . -type f); do
  73.   #  #Java does not require that the files are executable (644)
  74.   #  install -Dm644 "${i}" "${pkgdir}${i#.}"
  75.   #done
  76.   msg "Copying Alice to package directory..."
  77.   find . -type f -exec install -Dm644 "{}" "${pkgdir}${PREFIX}/{}" \;
  78.  
  79.   #Make launch script executable
  80.   chmod +x "${pkgdir}${PREFIX}/alice3.sh"
  81.  
  82.   #Install launch script
  83.   msg "Creating launcher script: /usr/bin/alice3..."
  84.   install -dm755 "${pkgdir}/usr/bin/"
  85.   echo '#!/bin/bash' > "${pkgdir}/usr/bin/alice3"
  86.   echo "cd \"${PREFIX}\"" >> "${pkgdir}/usr/bin/alice3"
  87.   echo "./alice3.sh" >> "${pkgdir}/usr/bin/alice3"
  88.   chmod +x "${pkgdir}/usr/bin/alice3"
  89. }
  90.  
  91. # vim:set ts=2 sw=2 et:
clone this paste RAW Paste Data