1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
7 inherit autotools elisp-common eutils multilib versionator
9 DESCRIPTION="GlusterFS is a powerful network/cluster filesystem"
10 HOMEPAGE="http://www.gluster.org/"
11 SRC_URI="http://ftp.gluster.com/pub/gluster/${PN}/$(get_version_component_range '1-2')/${PV}/${P}.tar.gz"
15 KEYWORDS="amd64 ~ppc ~ppc64 x86"
16 IUSE="emacs extras +fuse infiniband static-libs vim-syntax"
18 RDEPEND="emacs? ( virtual/emacs )
19 fuse? ( >=sys-fs/fuse-2.7.0 )
20 infiniband? ( sys-infiniband/libibverbs )"
26 SITEFILE="50${PN}-mode-gentoo.el"
29 epatch "${FILESDIR}/${PN}-3.1.0-parallel-build.patch" \
30 "${FILESDIR}/${PN}-docdir.patch" \
31 "${FILESDIR}/glusterd-workdir.patch"
32 sed -i -e "s/ -ggdb3//g" argp-standalone/configure.ac || die
38 $(use_enable fuse fuse-client) \
39 $(use_enable infiniband ibverbs) \
40 $(use_enable static-libs static) \
42 --docdir=/usr/share/doc/${PF} \
49 elisp-compile extras/glusterfs-mode.el || die
54 emake DESTDIR="${D}" install || die
57 elisp-install ${PN} extras/glusterfs-mode.el* || die
58 elisp-site-file-install "${FILESDIR}/${SITEFILE}"
61 if use vim-syntax ; then
62 insinto /usr/share/vim/vimfiles/ftdetect; doins "${FILESDIR}/glusterfs.vim" || die
63 insinto /usr/share/vim/vimfiles/syntax; doins extras/glusterfs.vim || die
67 newbin extras/volgen/glusterfs-volgen glusterfs-volgen || die
68 newbin extras/backend-xattr-sanitize.sh glusterfs-backend-xattr-sanitize || die
69 newbin extras/migrate-unify-to-distribute.sh glusterfs-migrate-unify-to-distribute || die
72 dodoc AUTHORS ChangeLog NEWS README THANKS || die
74 newinitd "${FILESDIR}/${PN}.initd" glusterfsd || die
75 newinitd "${FILESDIR}/glusterd.initd" glusterd || die
76 newconfd "${FILESDIR}/${PN}.confd" glusterfsd || die
78 keepdir /var/log/${PN} || die
79 keepdir /var/lib/glusterd || die
83 elog "Starting with ${PN}-3.1.0, you can use the glusterd daemon to configure your"
84 elog "volumes dynamically. To do so, simply use the gluster CLI after running:"
85 elog " /etc/init.d/glusterd start"
87 elog "For static configurations, the glusterfsd startup script can be multiplexed."
88 elog "The default startup script uses /etc/conf.d/glusterfsd to configure the"
89 elog "separate service. To create additional instances of the glusterfsd service"
90 elog "simply create a symlink to the glusterfsd startup script."
93 elog " # ln -s glusterfsd /etc/init.d/glusterfsd2"
94 elog " # ${EDITOR} /etc/glusterfs/glusterfsd2.vol"
95 elog "You can now treat glusterfsd2 like any other service"
97 elog "For more information on how to mount exported GlusterFS filesystems visit:"
98 elog "http://www.gluster.org/docs/index.php/Mounting_a_GlusterFS_Volume"
100 elog "If you are upgrading from glusterfs 3.0.x please read:"
101 elog "http://www.gluster.com/community/documentation/index.php/Gluster_3.0_to_3.1_Upgrade_Guide"
103 ewarn "You need to use a ntp client to keep the clocks synchronized across all"
104 ewarn "of your servers. Setup a NTP synchronizing service before attempting to"
105 ewarn "run GlusterFS."
107 use emacs && elisp-site-regen
111 use emacs && elisp-site-regen