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

Untitled

By: a guest on Jul 13th, 2011  |  syntax: Bash  |  size: 1.57 KB  |  views: 163  |  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. # Contributor: Todd Musall
  2. # Contributor: dront78 (Ivan)
  3. # Contributor: Victor Noel
  4. # Maintainer: Ng Oon-Ee <ngoonee.talk@gmail.com>
  5. pkgname=('heimdall')
  6. pkgver=20111208
  7. pkgrel=1
  8. pkgdesc="Heimdall is a cross-platform open-source utility to flash firmware (aka ROMs) onto Samsung Galaxy S devices."
  9. arch=('i686' 'x86_64')
  10. url="http://www.glassechidna.com.au/products/heimdall/"
  11. license=('MIT')
  12. depends=('libusb' 'qt>=4.6,0')
  13. optdepends=('udev-android-rules: Udev rules to connect Android devices to your linux box')
  14. makedepends=('gcc' 'git')
  15.  
  16. _gitroot="http://github.com/Benjamin-Dobell/Heimdall"
  17. _gitname=heimdall
  18.  
  19. build() {
  20.   cd $srcdir
  21.  
  22.   if [ -d $_gitname ]; then
  23.     cd $_gitname && git pull origin
  24.   else
  25.     git clone $_gitroot $_gitname
  26.   fi
  27.   # Remove old -build
  28.   rm -rf $srcdir/$_gitname-build
  29.  
  30.   cp -r $srcdir/$_gitname $srcdir/$_gitname-build
  31.   cd $srcdir/$_gitname-build/libpit
  32.  
  33.   ./configure --prefix=/usr
  34.   make
  35.  
  36.   cd $srcdir/$_gitname-build/heimdall
  37.  
  38.   ./configure --prefix=/usr
  39.   make
  40.  
  41.   cd $srcdir/$_gitname-build/heimdall-frontend
  42.  
  43.   qmake heimdall-frontend.pro OUTPUTDIR=/usr/bin
  44.   make
  45.  
  46. }
  47.  
  48. package() {
  49.   cd $srcdir/$_gitname-build/heimdall
  50.   # Prevent make install from trying to reload udev
  51.   # We'll do this the Arch way at package install time
  52.   mv Makefile Makefile.orig
  53.   sed -e 's/sudo service udev restart/echo sudo service udev restart/' <Makefile.orig >Makefile
  54.   make DESTDIR="${pkgdir}" install
  55.   cd $srcdir/$_gitname-build/heimdall-frontend
  56.   make INSTALL_ROOT="$pkgdir/" install
  57. }
  58. # vim: set ft=sh ts=2 sw=2 et:
clone this paste RAW Paste Data