*/*: Specify EAPI=0 explicitly, to ease greps
[gentoo.git] / sys-fs / lufs / lufs-0.9.7-r3.ebuild
1 # Copyright 1999-2018 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=0
5
6 inherit eutils autotools
7
8 DESCRIPTION="User-mode filesystem implementation"
9 HOMEPAGE="https://sourceforge.net/projects/lufs/"
10 SRC_URI="mirror://sourceforge/lufs/${P}.tar.gz"
11
12 LICENSE="GPL-2"
13 SLOT="0"
14 KEYWORDS="x86 ppc ~amd64"
15 IUSE="debug"
16
17 RDEPEND="sys-fs/lufis"
18 DEPEND="${RDEPEND}"
19
20 src_unpack() {
21         unpack ${A}
22         cd "${S}"
23
24         epatch "${FILESDIR}"/${P}-fPIC.patch
25         epatch "${FILESDIR}"/lufs-automount-port.diff
26         epatch "${FILESDIR}"/${P}-enable-gnome-2.patch
27         epatch "${FILESDIR}"/lufs-no-kernel.patch
28         epatch "${FILESDIR}"/${P}-gcc43.patch
29
30         filesystems="ftpfs localfs"
31         use amd64 || filesystems+=" sshfs"
32
33         eautoreconf
34 }
35
36 src_compile() {
37         einfo "Compiling for ${filesystems}"
38         unset ARCH
39         econf $(use_enable debug) || die
40
41         cd filesystems
42         local i
43         for i in ${filesystems} ; do
44                 cd ${i}
45                 emake || die "emake ${i} failed"
46                 cd ..
47         done
48 }
49
50 src_install() {
51         cd filesystems
52         local i
53         for i in ${filesystems} ; do
54                 cd ${i}
55                 emake DESTDIR="${D}" install || die "emake install ${i} failed"
56                 cd ..
57         done
58 }
59
60 pkg_postinst() {
61         ewarn "Lufs Kernel support and lufsd,lufsmnt have been disabled in favour"
62         ewarn "of lufis, please use lufis to mount lufs-filesystems, eg:"
63         if use amd64; then
64                 elog "# lufis fs=ftpfs,host=ftp.kernel.org /mnt/lufis/ -s"
65         else
66                 elog "# lufis fs=sshfs,host=dev.gentoo.org,username=genstef /mnt/lufis/ -s"
67         fi
68         ewarn "If something does not work for you with this setup please"
69         ewarn "complain to bugs.gentoo.org"
70         einfo "Note: There is also the native sshfs implementation now"
71         use amd64 && ewarn "lufs-sshfs does not work on amd64 and is disabled there."
72 }