updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / spirit-git / PKGBUILD
blob65919cfa3388a4105e58fe34574ff56255566c6d
1 # Contributor: Matthew Bauer <mjbauer95@gmail.com>
2 _pkgname=spirit
3 pkgname=$_pkgname-git
4 pkgver=20100618
5 pkgrel=1
6 pkgdesc='Linux port of the "Spirit" jailbreak using libimobiledevice. Works on most iDevices (iPod Touch, iPhone, iPad). To jailbreak your device run "spirit"'
7 arch=('i686' 'x86_64')
8 url="http://spiritjb.com/"
9 license=('GPL')
10 groups=()
11 depends=('libimobiledevice')
12 makedepends=('git' 'gcc' 'make')
13 provides=("$pkgname")
14 conflicts=("$pkgname")
15 replaces=("$pkgname")
16 backup=()
17 options=()
18 install=
19 source=()
20 noextract=()
21 md5sums=() #generate with 'makepkg -g'
23 _gitroot="git://github.com/posixninja/spirit-linux.git"
24 _gitname="$_pkgname-linux"
26 build() {
27         cd "$srcdir"
28         msg "Connecting to GIT server...."
30         if [ -d $_gitname ] ; then
31                 cd $_gitname && git pull origin
32                 msg "The local files are updated."
33         else
34                 git clone $_gitroot $_gitname
35         fi
37         msg "GIT checkout done or server timeout"
38         msg "Starting make..."
40         rm -rf "$srcdir/$_gitname-build"
41         git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
42         cd "$srcdir/$_gitname-build"
44         make || return 1
46         mkdir -p "$pkgdir/usr/share/$_pkgname"
47         cp -r igor resources "$pkgdir/usr/share/$_pkgname"
48         cp "$_pkgname" "$pkgdir/usr/share/$_pkgname"
50         mkdir -p "$pkgdir/usr/bin"
51         echo -e '#!/bin/sh\ncd /usr/share/'$_pkgname'\n./'$_pkgname | tee "$pkgdir/usr/bin/$_pkgname" > /dev/null
52         chmod +x "$pkgdir/usr/bin/$_pkgname"
53