updated on Mon Jan 23 12:00:23 UTC 2012
[aur-mirror.git] / wave-in-a-box / PKGBUILD
blob103901806c4edd1b05607e7ef2770126c310694c
1 # Contributor: Tim Besard <tim.besard@gmail.com>
3 pkgname=wave-in-a-box
4 pkgver=1.0
5 pkgrel=1
6 pkgdesc="A software framework centered on online real-time collaborative editing."
7 arch=('i686' 'x86_64')
8 license=('GPL')
9 url=('https://wave.google.com/wave/')
10 depends=('mongodb' 'jdk')
11 makedepends=('mercurial' 'apache-ant')
12 source=('wave-in-a-box')
13 noextract=()
14 md5sums=('e135909101a1c3ecf84a1f6025807d79')
16 merc_root='https://wave-protocol.googlecode.com/hg/'
17 merc_repo='wave-protocol'
19 build() {
20   msg "Connecting to Mercurial server...."
22   if [ -d $merc_repo ] ; then
23     cd $merc_repo
24     hg pull -u
25     msg "The local files are updated."
26   else
27     msg "hg clone $merc_root $merc_repo" 
28     hg clone $merc_root $merc_repo
29   fi
31   msg "Mercurial checkout done or server timeout"
32   
33   msg "Starting make..."
34   rm -rf "$srcdir/$merc_repo-build"
35   cp -r "$srcdir/$merc_repo" "$srcdir/$merc_repo-build"
36   cd "$srcdir/$merc_repo-build"
37   /usr/share/java/apache-ant/bin/ant
40 package() {
41   cd "$srcdir/$merc_repo-build"
42   msg "Starting build"
43   
44   mkdir -p "$pkgdir/usr/share/"
45   cp "$srcdir/$merc_repo-build/dist" "$pkgdir/usr/share/wave-in-a-box" -R
46   cp "$srcdir/$merc_repo-build/process-script-args.sh" "$pkgdir/usr/share/wave-in-a-box/"
47   cp "$srcdir/$merc_repo-build/build.properties" "$pkgdir/usr/share/wave-in-a-box/"
48   
49   mkdir -p "$pkgdir/etc/wave-in-a-box/"
50   cp "$srcdir/$merc_repo-build/server.config.example" "$pkgdir/etc/wave-in-a-box/"
51   
52   mkdir -p "$pkgdir/usr/bin"
53   cp "$srcdir/../$pkgname" "$pkgdir/usr/bin/$pkgname"
54   chmod a+x "$pkgdir/usr/bin/$pkgname"
55