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

diaspora

By: a guest on Sep 20th, 2010  |  syntax: Bash  |  size: 1.55 KB  |  views: 61  |  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: Splashy < splash at open-web dot fr>
  2.  
  3. pkgname=diaspora-git
  4. pkgver=20100920
  5. pkgrel=1
  6. pkgdesc="An open source social network"
  7. arch=('i686' 'x86_64')
  8. url="http://www.joindiaspora.com/"
  9. license=('AGPL3')
  10. depends=('ruby1.8' 'rubygems1.8' 'ruby1.8-bundler' 'ruby1.8-rake' 'mongodb' 'openssl' 'imagemagick' 'libffi' 'libxslt')
  11. makedepends=('git')
  12.  
  13. _gitroot="git://github.com/diaspora/diaspora.git"
  14. _gitname="diaspora"
  15.  
  16. build() {
  17.   msg "Connecting to the GIT server...."
  18.  
  19.   if [[ -d $srcdir/$_gitname ]] ; then
  20.     cd $srcdir/$_gitname
  21.     git pull origin
  22.     msg "The local files are updated..."
  23.   else
  24.     git clone $_gitroot
  25.   fi
  26.  
  27.   msg "GIT checkout done."
  28.   msg "Start making..."
  29.  
  30.   sed -i -e "s/bundle /bundle-1.8 /" \
  31.     -e "s/ruby /ruby-1.8 /" \
  32.     ./script/server
  33.  
  34.   install -d $srcdir/diaspora-gems/
  35.   cd $srcdir/diaspora
  36.   GEM_HOME=$srcdir/diaspora-gems bundle-1.8 install
  37. }
  38.  
  39. package() {
  40.   install -d $pkgdir/{usr/bin,opt}
  41.   cp -r $srcdir/diaspora $pkgdir/opt/
  42.   cp -r $srcdir/diaspora-gems $pkgdir/opt/
  43.  
  44.   # The PATH added is to make sure that ruby version 1.8 will be invoked
  45.   # instead of the newer one.
  46.   echo "cd /opt/diaspora && PATH=/opt/ruby1.8/bin:$PATH GEM_HOME=/opt/diaspora-gems ./script/server" \
  47.     >$pkgdir/usr/bin/diaspora
  48.   chmod 755 $pkgdir/usr/bin/diaspora
  49.  
  50.   msg "To login as a sample user:"
  51.   msg "sudo /etc/rc.d/mongodb start"
  52.   msg "cd /opt/diaspora"
  53.   msg "sudo rake-1.8 db:seed:tom"
  54.   msg "sudo diaspora"
  55.   msg "Go to http://localhost:3000/ then login with user tom and password evankorth"
  56. }