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

Untitled

By: a guest on Aug 3rd, 2011  |  syntax: Bash  |  size: 1.79 KB  |  views: 166  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
This paste has a previous version, view the difference. Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. # Maintainer: Gadget3000 <gadget3000 at msn dot com>
  2. # Contributor: jimmy-6 <jakub.jarozek at gmail dot com>
  3.  
  4. pkgname=cogs
  5. pkgver=3
  6. pkgrel=1
  7. pkgdesc="A game in which you build machines from sliding tiles"
  8. arch=('i686' 'x86_64')
  9. url="http://www.cogsgame.com/"
  10. license=('unknown')
  11. depends=('gcc-libs' 'sdl<1.3' 'openal')
  12. makedepends=('unzip')
  13. groups=('humblebundle3' 'humblebundles')
  14. source=(cogs.desktop)
  15. md5sums=('425530cd26af362c2e98d4bf720b4372') #generate with 'makepkg -g'
  16.  
  17. _archive="cogs-installer-build${pkgver}"
  18. _archive_md5="0c1c584c39bbc5c81343e413f8e1c0e5"
  19.  
  20. build() {
  21.   install -Dd ${srcdir}/extractedInstaller
  22.   cd $srcdir
  23.  
  24.   if [ ! -f ${_archive} ]; then
  25.   echo Please place ${_archive} into $(pwd)
  26.   echo Press Enter to continue
  27.   read -a _unused
  28.   fi
  29.  
  30.   if ! echo "${_archive_md5}  ${_archive}" | md5sum -c --quiet; then
  31.     echo "Invalid checksum for ${_archive}"
  32.     return 1
  33.   fi
  34.  
  35.   install -Dd ${pkgdir}/opt/
  36.   unzip -qqo ${_archive} -x guis/* meta/* scripts/* -d ${srcdir}/extractedInstaller/ && msg Finished Extracting
  37.   install -Dd ${pkgdir}/opt/cogs
  38.   mv ${srcdir}/extractedInstaller/data/* ${pkgdir}/opt/cogs/
  39.   if [ "${CARCH}" = "x86_64" ]; then
  40.     rm -rf ${pkgdir}/opt/cogs/x86
  41.     rm -rf ${pkgdir}/opt/cogs/Cogs-x86
  42.   else
  43.     rm -rf ${pkgdir}/opt/cogs/amd64
  44.     rm -rf ${pkgdir}/opt/cogs/Cogs-amd64
  45.   fi
  46.   install -Dd ${pkgdir}/usr/bin
  47.  
  48.   #Create launcher
  49.   echo \#\!/bin/sh > ${pkgdir}/usr/bin/cogs
  50.   echo cd /opt/cogs/ >> ${pkgdir}/usr/bin/cogs
  51.   cat ${pkgdir}/opt/cogs/Cogs | tail -n $[$(cat ${pkgdir}/opt/cogs/Cogs | wc -l)-1] >> ${pkgdir}/usr/bin/cogs
  52.   chmod +x ${pkgdir}/usr/bin/cogs
  53.  
  54.   # install menu entry
  55.   install -Dd ${pkgdir}/usr/share/applications
  56.   install -m 644 'cogs.desktop' "${pkgdir}/usr/share/applications/cogs.desktop"
  57. }