]> Pileus Git - ~andy/sunrise/blob - sys-fs/aufs/aufs-20080207-r1.ebuild
Add missing space before || in src_compile
[~andy/sunrise] / sys-fs / aufs / aufs-20080207-r1.ebuild
1 # Copyright 1999-2008 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 inherit eutils linux-mod
6
7 DESCRIPTION="An entirely re-designed and re-implemented Unionfs."
8 HOMEPAGE="http://aufs.sourceforge.net/"
9 SRC_URI="http://dev.gentooexperimental.org/~tommy/${P}.tar.bz2"
10
11 LICENSE="GPL-2"
12 SLOT="0"
13 KEYWORDS="~amd64 ~x86"
14 IUSE="hinotify"
15
16 S="${WORKDIR}"/aufs
17
18 MODULE_NAMES="aufs(addon/fs/${PN}:)"
19
20 pkg_setup() {
21         # kernel version check
22         if kernel_is lt 2 6 16 ; then
23                 eerror "${PN} is being developed and tested on linux-2.6.16 and later."
24                 eerror "Make sure you have a proper kernel version!"
25                 die "Wrong kernel version"
26         fi
27
28         linux-mod_pkg_setup
29 }
30
31 src_unpack(){
32         unpack ${A}
33         cd "${S}"
34
35         epatch "${FILESDIR}/${P}-disable_security_inode_permission.patch"
36
37         # Enable hinotify in priv_def.mk
38         if use hinotify && kernel_is ge 2 6 18 ; then
39                 echo "CONFIG_AUFS_HINOTIFY = y" >> priv_def.mk || die "setting hinotify in priv_def.mk failed!"
40         fi
41
42         # Disable SYSAUFS for kernel less than 2.6.18
43         if kernel_is lt 2 6 18 ; then
44                 echo "CONFIG_AUFS_SYSAUFS = " >> priv_def.mk || die "unsetting sysaufs in priv_def.mk failed!"
45         fi
46
47         # Check if a vserver-kernel is installed
48         if [[ -e ${KV_DIR}/include/linux/vserver ]] ; then
49                 einfo "vserver kernel seems to be installed"
50                 einfo "using vserver patch"
51                 echo "AUFS_DEF_CONFIG = -DVSERVER" >> priv_def.mk || die "setting vserver in priv_def.mk failed!"
52         fi
53 }
54
55 src_compile() {
56         use x86 && ARCH=i386
57         use amd64 && ARCH=x86_64
58         emake KDIR=${KV_DIR} -f local.mk || die "emake failed"
59 }
60
61 src_install() {
62         cd util
63         exeinto /sbin
64         exeopts -m0500
65         doexe mount.aufs umount.aufs auplink aulchown
66         doman aufs.5
67         linux-mod_src_install
68 }
69
70 pkg_postinst() {
71         elog "To be able to use aufs, you have to load the kernel module by typing:"
72         elog "modprobe aufs"
73         elog "For further information refer to the aufs man page"
74
75         linux-mod_pkg_postinst
76 }