]> Pileus Git - ~andy/sunrise/blob - sys-fs/ntfs3g-ar/ntfs3g-ar-2010.5.22.6.ebuild
sys-fs/ntfs3g-ar: version bump ntfs-3g ar, thx sedzimir[mgorny]
[~andy/sunrise] / sys-fs / ntfs3g-ar / ntfs3g-ar-2010.5.22.6.ebuild
1 # Copyright 1999-2010 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 EAPI=2
6 inherit linux-info versionator
7
8 MY_PN="${PN/3g-ar/-3g}"
9 MY_PV="$(get_version_component_range 1-3)AC.$(get_version_component_range 4)"
10 MY_P="${MY_PN}-${MY_PV}"
11
12 DESCRIPTION="NTFS-3G variant supporting ACLs, junction points, compression and more"
13 HOMEPAGE="http://pagesperso-orange.fr/b.andre/advanced-ntfs-3g.html"
14 SRC_URI="http://pagesperso-orange.fr/b.andre/${MY_P}.tgz"
15
16 LICENSE="GPL-2"
17 SLOT="0"
18 KEYWORDS="~amd64 ~x86"
19 IUSE="acl debug external-fuse hal suid udev"
20
21 RDEPEND="external-fuse? ( >=sys-fs/fuse-2.8.0 )
22         hal? ( sys-apps/hal )
23         !sys-fs/ntfs3g
24         sys-apps/attr"
25 DEPEND="${RDEPEND}"
26
27 S="${WORKDIR}/${MY_P}"
28
29 pkg_setup() {
30         if use external-fuse && use kernel_linux; then
31                 if kernel_is lt 2 6 9; then
32                         die "Your kernel is too old."
33                 fi
34                 CONFIG_CHECK="~FUSE_FS"
35                 FUSE_FS_WARNING="You need to have FUSE module built to use ntfs-3g"
36                 linux-info_pkg_setup
37         fi
38 }
39
40 src_configure() {
41         econf \
42                 --docdir="/usr/share/doc/${PF}" \
43                 --enable-ldscript \
44                 --disable-ldconfig \
45                 --with-fuse=$(use external-fuse && echo external || echo internal) \
46                 $(use_enable acl posix-acls) \
47                 $(use_enable debug)
48 }
49
50 src_install() {
51         emake DESTDIR="${D}" install || die "install failed"
52
53         prepalldocs || die "prepalldocs failed"
54         dodoc AUTHORS ChangeLog CREDITS || die "dodoc failed"
55
56         use suid && { fperms u+s "/bin/${MY_PN}" || die "set suid failed" ; }
57
58         if use hal; then
59                 insinto /etc/hal/fdi/policy/
60                 newins "${FILESDIR}/10-ntfs3g.fdi.2009-r1" "10-ntfs3g.fdi" || die "hal fdi install failed"
61         fi
62
63         if use udev; then
64                 insinto /etc/udev/rules.d/
65                 doins "${FILESDIR}/99-ntfs3g.rules" || die "udev rules install failed"
66         fi
67 }
68
69 pkg_postinst() {
70         ewarn "This is an advanced features release of the ntfs-3g package. It"
71         ewarn "passes standard tests on i386 and x86_64 CPUs but users should"
72         ewarn "still backup their data.  More info at:"
73         ewarn "http://pagesperso-orange.fr/b.andre/advanced-ntfs-3g.html"
74
75         if use suid; then
76                 ewarn
77                 ewarn "You have chosen to install ${PN} with the binary setuid root. This"
78                 ewarn "means that if there any undetected vulnerabilities in the binary,"
79                 ewarn "then local users may be able to gain root access on your machine."
80         fi
81 }