Advertisement
Guest User

diaspora

a guest
Sep 20th, 2010
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.55 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement