updated on Fri Jan 20 04:00:45 UTC 2012
[aur-mirror.git] / inferno-os / PKGBUILD
blob4f9e440e3ca8011f5de4c3ea501512925c1d8876
1 # Contributor: Andrej Nandaromovszij <sorosj@gmail.com>
3 pkgname=inferno-os
4 pkgrel=1
5 pkgver=99
6 pkgdesc="Inferno is a distributed operating system initially developped by Bell Labs, now being devlopped by vitanuova ( http://www.vitanuova.com )."
7 arch=('i686')
8 url="http://code.google.com/p/inferno-os"
9 license=('GPL')
10 depends=('xf86-input-keyboard' 'xf86-input-mouse' 'xorg-res-utils' 'xorg-server')
11 makedepends=('make' 'gcc' 'mercurial')
12 source=('acmefonts.patch' 'arch1.patch' 'inferno-os.install' 'inferno-os.sh')
13 md5sums=('624dfd4d12747e0eec7915aeefb62059'
14          '29e19f813afb499ec866fe4d15c358fe'
15          '95119dc792cf2a4a4e8d299b9f977dfb'
16          'e08fd1a20db5114759a4373ac16ae631')
18 install=${pkgname}.install
20 _hgroot=https://inferno-os.googlecode.com/hg/
21 _hgrepo=inferno-os
24 build() {
25   cd $startdir/src
26   
27   mkdir $startdir/pkg/opt/
28   msg "Cloning/updating the repositories"
29   msg "  Cloning acme-sac repo for fonts..."
30   if [ ! -d acme-sac ]; then
31     hg clone https://acme-sac.googlecode.com/hg/ acme-sac
32   else
33     cd acme-sac
34     hg pull -u
35     cd ..
36   fi
37   msg "  Done"
38   msg "Mercurial checkouts done"
40   msg "Exporting the mercurial tree somewhere...please be patient..."
41   cd $_hgrepo
42   hg archive $startdir/pkg/opt/$_hgrepo
43 # make needed directories mercurial tends to drop...
44   mkdir -p $startdir/pkg/opt/inferno-os/Linux/386/lib/ || return 1
45   mkdir $startdir/pkg/opt/inferno-os/tmp
46   cd ..
47   msg "Done"
49   msg "Making mk..."
50   cd $startdir/pkg/opt/$_hgrepo
51   
52   msg "  Patching the makemk file"
53   rm $startdir/arch.patch
54   cat $startdir/arch1.patch | sed 's.\$startdir.'$startdir'.g' > $startdir/arch.patch
55   patch < $startdir/arch.patch || return 1
56   cd lib
57   patch < $startdir/acmefonts.patch || return 1
58   cd ..
59   ./makemk.sh || return 1
60 #sorry, this is ugly, but gotta do it, from now on we use mk!!!
61   export TMPPATH=$PATH
62   export PATH=$PATH:$startdir/pkg/opt/$_hgrepo/Linux/386/bin/
63   msg "Mk made"
65   msg "Nuking all"
66   mk nuke || return 1
67   
68   msg "Building the system, please be patient..."
69   mk install || return 1
70   
71   mkdir -p $startdir/pkg/etc/profile.d/ || return 1
72   cp $startdir/inferno-os.sh $startdir/pkg/etc/profile.d/ || return 1
73   cp -r $startdir/src/acme-sac/fonts/vera $startdir/pkg/opt/$_hgrepo/fonts || return 1
74   cp -r $startdir/src/acme-sac/fonts/10646 $startdir/pkg/opt/$_hgrepo/fonts || return 1
75   
76   ##we need to move this, so makepkg doesn't compress the manpages, we move it back to it's original place in the .install file
77   mv $startdir/pkg/opt/inferno-os/man $startdir/pkg/opt/inferno-os/mtamnp || return 1
78   
79   #well, we do clean up, though...check /etc/profile.d/inferno-os.sh for info about the PATH variable
80   export PATH=$TMPPATH
81   
82   msg "inferno will be installed into the /opt/inferno-os directory, the path, and emu alias are stored in /etc/profile.d/inferno-os.sh"
85 #Use acme!