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>
8 pkgdesc="Cloud9 IDE - Your code anywhere, anytime. Open Source Javascript Cloud9 IDE"
10 url="https://github.com/ajaxorg/cloud9"
16 source=(runcloud9 middleware.patch)
18 md5sums=(c9013ed5f0dd6b7b5852118a72f88856 6c6664ccb741a5152771556add84d115)
19 install=(cloud9.install)
22 _gitroot="https://github.com/ajaxorg/${_gitname}"
23 _gitcommit="c888577f4888609c6bd4c2a9c8be5ef1e909d9cc"
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."
33 git clone $_gitroot $_gitname
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"
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"