]> Pileus Git - ~andy/sunrise/blob - sys-fs/ntfs3g-ar/ntfs3g-ar-2009.4.4_pre16.ebuild
sys-fs/ntfs3g-ar: New Ebuild for bug 235966 thanks to TommyD and chutzpah
[~andy/sunrise] / sys-fs / ntfs3g-ar / ntfs3g-ar-2009.4.4_pre16.ebuild
1 # Copyright 1999-2009 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 inherit linux-info
6
7 MY_P=${PN/3g-ar/-3g}-${PV/_pre/AR.}
8
9 DESCRIPTION="Open source read-write NTFS driver that runs under FUSE"
10 HOMEPAGE="http://www.ntfs-3g.org"
11 SRC_URI="http://pagesperso-orange.fr/b.andre/${MY_P}.tgz"
12
13 LICENSE="GPL-2"
14 SLOT="0"
15 KEYWORDS="~amd64 ~x86"
16 IUSE="debug hal suid"
17
18 [[ ${KERNEL} == "linux" ]] && IUSE="${IUSE} fuse"
19
20 RDEPEND="hal? ( sys-apps/hal )"
21
22 DEPEND="${RDEPEND}
23         !sys-fs/ntfs3g
24         !kernel_linux? ( sys-fs/fuse )
25         fuse? ( sys-fs/fuse )"
26
27 S="${WORKDIR}/${MY_P}"
28
29 pkg_setup() {
30         if use kernel_linux ; then
31                 CONFIG_CHECK="~FUSE_FS"
32                 WARNING_FUSE_FS="This build of ntfs-3g will continue but your kernel needs to be built
33                         with FUSE support for it to function at runtime."
34                 linux-info_pkg_setup
35         fi
36 }
37
38 src_compile() {
39         local myconf
40
41         use fuse && myconf="--with-fuse=external"
42
43         econf \
44                 --docdir="/usr/share/doc/${PF}" \
45                 --enable-ldscript \
46                 --disable-ldconfig \
47                 $(use_enable debug) \
48                 ${myconf}
49         emake || die "emake failed"
50 }
51
52 src_install() {
53         emake DESTDIR="${D}" install || die "install failed"
54
55         prepalldocs || die "prepalldocs failed"
56         dodoc AUTHORS ChangeLog CREDITS || die "dodoc failed"
57
58         use suid && fperms u+s "/bin/${MY_PN}" || die "could not chage file permisions"
59
60         if use hal; then
61                 insinto /etc/hal/fdi/policy/
62                 newins "${FILESDIR}/10-ntfs3g.fdi.2009" "10-ntfs3g.fdi" || die "installation of 10-ntfs3g.fdi.2009 failed"
63         fi
64 }
65
66 pkg_postinst() {
67         ewarn
68         ewarn "This is an advanced features release of the ntfs-3g package. It"
69         ewarn "passes standard tests on i386 and x86_64 CPUs but users should"
70         ewarn "still backup their data.  More info at:"
71         ewarn "http://pagesperso-orange.fr/b.andre/advanced-ntfs-3g.html"
72         ewarn
73
74         if  use fuse || ! use kernel_linux ; then
75                 ewarn
76                 ewarn "ntfs-3g has been built with external FUSE support."
77                 ewarn "If your system's FUSE package gets updated please rebuild ntfs-3g,"
78                 ewarn "as failure to do so may break ntfs-3g functionality."
79                 ewarn
80         fi
81
82         if use suid; then
83                 ewarn
84                 ewarn "You have chosen to install ntfs-3g with the binary setuid root. This"
85                 ewarn "means that if there any undetected vulnerabilities in the binary,"
86                 ewarn "then local users may be able to gain root access on your machine."
87                 ewarn
88         fi
89 }