updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / zfs-behlendorf-git / PKGBUILD
blob3814f35ceadfc242a94a122d1fcd24efc6f795cf
1 # Maintainer: Zubkov Alexander <green@msu.ru>
2 pkgname=zfs-behlendorf-git
3 pkgver=20110324
4 pkgrel=1
5 pkgdesc="Native ZFS for Linux (behlendorf)"
6 arch=(x86_64)
7 url="https://github.com/behlendorf"
8 license=('GPL' 'CDDL')
9 depends=('util-linux')
10 makedepends=('git')
11 backup=('etc/zfs/zdev.conf')
12 provides=('zfs')
13 options=(!libtool)
15 _modules=('spl' 'zfs')
16 _gitroot="https://github.com/behlendorf"
17 _gitname=stub
19 build() {
20     cd "$srcdir"
22     for _gitname in ${_modules[*]}
23     do
24         (
25         msg "Connecting to GIT server ($_gitname)...."
26         if [ -d $_gitname ] ; then
27             cd $_gitname && git pull origin
28             msg "The local files are updated."
29         else
30             git clone "$_gitroot/$_gitname.git" $_gitname
31         fi
33         msg "GIT checkout done or server timeout"
34         )
35     done
37     for _gitname in ${_modules[*]}
38     do
39         (
40         msg "Starting make ($_gitname)..."
42         rm -rf "$srcdir/$_gitname-build"
43         git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
44         cd "$srcdir/$_gitname-build"
46         _conf_opt=
47         case $_gitname in
48         zfs)
49             _conf_opt="--with-spl=$srcdir/spl-build/"
50             ;;
51         esac
53         ./configure \
54             --prefix=/usr \
55             --sysconfdir=/etc \
56             --libexecdir=/usr/lib \
57             $_conf_opt
58         make
59         )
60     done
63 package() {
64     for _gitname in ${_modules[*]}
65     do
66         (
67         msg "Installing ($_gitname)..."
68         cd "$srcdir/$_gitname-build"
69         make DESTDIR="$pkgdir/" install
70         )
71     done
72