]> Pileus Git - ~andy/sunrise/blob - sys-fs/ntfs3g-ar/ntfs3g-ar-2011.4.12.7.ebuild
sunrise/ net-nntp/nzbperl/Manifest: Update copyright line to satisfy repoman
[~andy/sunrise] / sys-fs / ntfs3g-ar / ntfs3g-ar-2011.4.12.7.ebuild
1 # Copyright 1999-2012 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)AR.$(get_version_component_range 4)"
10 MY_P="${MY_PN}_ntfsprogs-${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 crypt debug +external-fuse ntfsprogs  static-libs suid xattr udev"
20
21 RDEPEND="external-fuse? ( >=sys-fs/fuse-2.8.0 )
22         ntfsprogs? ( !!sys-fs/ntfsprogs )
23         crypt? ( net-libs/gnutls )"
24
25 DEPEND="${RDEPEND}
26         dev-util/pkgconfig
27         sys-apps/attr"
28
29 S="${WORKDIR}/${MY_P}"
30
31 pkg_setup() {
32         if use external-fuse && use kernel_linux; then
33                 if kernel_is lt 2 6 9; then
34                         die "Your kernel is too old."
35                 fi
36                 CONFIG_CHECK="~FUSE_FS"
37                 FUSE_FS_WARNING="You need to have FUSE module built to use ntfs-3g"
38                 linux-info_pkg_setup
39         fi
40 }
41
42 src_configure() {
43         econf \
44                 --docdir="/usr/share/doc/${PF}" \
45                 --enable-ldscript \
46                 --disable-ldconfig \
47                 --with-fuse=$(use external-fuse && echo external || echo internal) \
48                 $(use_enable ntfsprogs) \
49                 $(use_enable crypt crypto) \
50                 $(use_enable acl posix-acls) \
51                 $(use_enable xattr xattr-mappings)      \
52                 $(use_enable static-libs static) \
53                 $(use_enable debug)
54 }
55
56 src_install() {
57         emake DESTDIR="${D}" install || die "install failed"
58
59         dodoc AUTHORS ChangeLog CREDITS README || die "doc failed"
60
61         use suid && { fperms u+s "/bin/${MY_PN}" || die "set suid failed" ; }
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         find "${D}" -name '*.la' -delete
69 }
70
71 pkg_postinst() {
72         ewarn "This is an advanced features release of the ntfs-3g package. It"
73         ewarn "passes standard tests on i386 and x86_64 CPUs but users should"
74         ewarn "still backup their data.  More info at:"
75         ewarn "http://pagesperso-orange.fr/b.andre/advanced-ntfs-3g.html"
76
77         if use suid; then
78                 ewarn
79                 ewarn "You have chosen to install ${PN} with the binary setuid root. This"
80                 ewarn "means that if there any undetected vulnerabilities in the binary,"
81                 ewarn "then local users may be able to gain root access on your machine."
82         fi
83 }