updated on Tue Jan 10 04:01:21 UTC 2012
[aur-mirror.git] / cloud9-git / PKGBUILD
blobd1d1855c493bd0400ca3f28745846bfac6beb2e1
1 # See http://wiki.archlinux.org/index.php/VCS_PKGBUILD_Guidelines
2 # for more information on packaging from GIT sources.
4 # Maintainer: Leo von Klenze <leo@devel.von-klenze.de>
5 pkgname=cloud9-git
6 pkgver=20111219
7 pkgrel=1
8 pkgdesc="Cloud9 IDE - Your code anywhere, anytime. Open Source Javascript Cloud9 IDE"
9 arch=('i686' 'x86_64')
10 url="https://github.com/ajaxorg/cloud9"
11 license=('GPLv3')
12 depends=(nodejs)
13 makedepends=('git')
14 provides=(cloud9)
15 conflicts=(cloud9)
16 source=(runcloud9 middleware.patch)
17 noextract=()
18 md5sums=(c9013ed5f0dd6b7b5852118a72f88856 6c6664ccb741a5152771556add84d115)
19 install=(cloud9.install)
21 _gitname="cloud9"
22 _gitroot="https://github.com/ajaxorg/${_gitname}"
23 _gitcommit="c888577f4888609c6bd4c2a9c8be5ef1e909d9cc"
25 build() {
26   cd "$srcdir"
27   msg "Connecting to GIT (${_gitroot})"
29   if [ -d $_gitname ] ; then
30     cd $_gitname && git checkout -f master && git pull origin
31     msg "The local files of ${_gitname} were updated."
32   else
33     git clone $_gitroot $_gitname
34     cd $_gitname
35   fi
37   msg "Checking out $_gitcommit"
38   git checkout "$_gitcommit"
40   msg "GIT checkout done or server timeout"
42   git submodule update --init --recursive
44   msg "Patch middleware to avoid writing to program directory..."
45   patch -p 1 < "../../middleware.patch"
48 package() {
49   install -d "$pkgdir/opt/cloud9"
50   install -d "$pkgdir/usr/bin"
52   cp -R $srcdir/$_gitname/* $pkgdir/opt/$_gitname
53   cp $srcdir/runcloud9 $pkgdir/opt/$_gitname/bin
54   sed -ie 's/require.paths/\/\/ require.paths/g' $pkgdir/opt/cloud9/support/paths.js   
55   ln -s "/opt/cloud9/bin/runcloud9" "$pkgdir/usr/bin/cloud9"
56