]> Pileus Git - ~andy/sunrise/blob - sys-fs/ntfs3g-ar/ntfs3g-ar-2012.1.15.8.ebuild
sys-fs/ntfs3g-ar: replace rm -rf on sbin with rmdir, add missing 'die' statement...
[~andy/sunrise] / sys-fs / ntfs3g-ar / ntfs3g-ar-2012.1.15.8.ebuild
1 # Copyright 1999-2013 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 EAPI=5
6 inherit eutils 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://jp-andre.pagesperso-orange.fr/advanced-ntfs-3g.html"
14 SRC_URI="http://jp-andre.pagesperso-orange.fr/${MY_P}.tgz"
15
16 LICENSE="GPL-2"
17 SLOT="0"
18 KEYWORDS="~amd64 ~x86"
19 IUSE="acl crypt debug +external-fuse extras +ntfsprogs static-libs suid +udev xattr"
20
21 RDEPEND="!<sys-apps/util-linux-2.19
22         !sys-fs/ntfsprogs
23         crypt? (
24                 >=dev-libs/libgcrypt-1.2.2
25                 >=net-libs/gnutls-1.4.4
26                 )
27         external-fuse? ( >=sys-fs/fuse-2.8.0 )"
28 DEPEND="${RDEPEND}
29         virtual/pkgconfig
30         sys-apps/attr"
31
32 S="${WORKDIR}/${MY_P}"
33
34 DOCS="AUTHORS ChangeLog CREDITS README"
35
36 pkg_setup() {
37         if use external-fuse && use kernel_linux; then
38                 if kernel_is lt 2 6 9; then
39                         die "Your kernel is too old."
40                 fi
41                 CONFIG_CHECK="~FUSE_FS"
42                 FUSE_FS_WARNING="You need to have FUSE module built to use ntfs-3g"
43                 linux-info_pkg_setup
44         fi
45 }
46
47 src_configure() {
48         econf \
49                 --exec-prefix="${EPREFIX}/usr" \
50                 --docdir="${EPREFIX}/usr/share/doc/${PF}" \
51                 $(use_enable debug) \
52                 --enable-ldscript \
53                 --disable-ldconfig \
54                 $(use_enable acl posix-acls) \
55                 $(use_enable xattr xattr-mappings) \
56                 $(use_enable crypt crypto) \
57                 $(use_enable ntfsprogs) \
58                 $(use_enable extras) \
59                 $(use_enable static-libs static) \
60                 --with-fuse=$(use external-fuse && echo external || echo internal)
61 }
62
63 src_install() {
64         default
65
66         use suid && fperms u+s /usr/bin/${MY_PN}
67
68         if use udev; then
69                 insinto /lib/udev/rules.d
70                 doins "${FILESDIR}"/99-ntfs3g.rules
71         fi
72
73         prune_libtool_files
74
75         # http://bugs.gentoo.org/398069
76         dodir /usr/sbin
77         mv "${D}"/sbin/* "${ED}"/usr/sbin || die
78         rmdir "${D}"/sbin || die 'rmdir failed'
79
80         dosym mount.ntfs-3g /usr/sbin/mount.ntfs #374197
81 }
82
83 pkg_postinst() {
84         ewarn "This is an advanced features release of the ntfs-3g package. It"
85         ewarn "passes standard tests on i386 and x86_64 CPUs but users should"
86         ewarn "still backup their data.  More info at:"
87         ewarn "http://pagesperso-orange.fr/b.andre/advanced-ntfs-3g.html"
88 }