/[gentoo-x86]/dev-perl/mogilefs-server/mogilefs-server-2.37.ebuild
Gentoo

Contents of /dev-perl/mogilefs-server/mogilefs-server-2.37.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Sun Jun 3 16:31:19 2012 UTC (2 years, 2 months ago) by tove
Branch: MAIN
Changes since 1.3: +3 -3 lines
Inherit user.eclass for enewuser

(Portage version: 2.2.0_alpha109/cvs/Linux x86_64)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/dev-perl/mogilefs-server/mogilefs-server-2.37.ebuild,v 1.3 2011/12/16 19:53:22 swegener Exp $
4
5 EAPI=2
6 MODULE_AUTHOR="DORMANDO"
7 MY_PN=mogilefs-server
8 MY_P="${MY_PN}-${PV}"
9 MODULE_A="${MY_P}.tar.gz"
10 inherit user perl-module
11
12 DESCRIPTION="Server for the MogileFS distributed file system"
13 HOMEPAGE="http://www.danga.com/mogilefs/"
14
15 IUSE="mysql sqlite postgres"
16
17 SLOT="0"
18 LICENSE="|| ( Artistic GPL-2 )"
19 KEYWORDS="~amd64 ~ppc ~x86"
20
21 # Upstream site recommends this,
22 # but it breaks Perlbal
23 # dev-perl/Perlbal-XS-HTTPHeaders
24 RDEPEND="dev-perl/Net-Netmask
25 >=dev-perl/Danga-Socket-1.61
26 >=dev-perl/Sys-Syscall-0.22
27 >=dev-perl/Perlbal-1.74
28 dev-perl/IO-AIO
29 dev-perl/libwww-perl
30 >=dev-perl/MogileFS-Client-1.11
31 >=dev-perl/MogileFS-Utils-2.16
32 dev-perl/Cache-Memcached
33 mysql? ( dev-perl/DBD-mysql )
34 postgres? ( dev-perl/DBD-Pg )
35 sqlite? ( dev-perl/DBD-SQLite )"
36 DEPEND="${RDEPEND}"
37 mydoc="CHANGES TODO"
38
39 # You need a local MySQL or Postgresql server for this
40 #SRC_TEST="do"
41
42 #PATCHES=( )
43
44 MOGILE_USER="mogile"
45
46 pkg_setup() {
47 # Warning! It is important that the uid is constant over Gentoo machines
48 # As mogilefs may be used with non-local block devices that move!
49 enewuser ${MOGILE_USER} 460 -1 -1
50 }
51
52 src_prepare() {
53 for f in Makefile.PL MANIFEST ; do
54 if [ -f "${S}"/${f}.orig ]; then
55 cp -f "${S}"/${f}{.orig,}
56 else
57 cp -f "${S}"/${f}{,.orig}
58 fi
59 done
60 # If we are not in a cutting edge Git source, we would prefer to not install
61 # duplicates of these.
62 sed -i -e '/directory.*mogdeps/d' "${S}"/Makefile.PL
63 sed -i -e '/^lib\/mogdeps/d' "${S}"/MANIFEST
64 mv -f "${S}/lib/mogdeps" "${S}"
65 }
66
67 src_compile() {
68 export MOGILE_NO_BUILTIN_DEPS=1
69 perl-module_src_compile || die "perl-module_src_compile failed"
70 }
71
72 src_install() {
73 export MOGILE_NO_BUILTIN_DEPS=1
74 perl-module_src_install || die "perl-module_src_install failed"
75 cd "${S}"
76
77 newconfd "${FILESDIR}"/mogilefsd-conf.d-2.16 mogilefsd
78 newinitd "${FILESDIR}"/mogilefsd-init.d-2.16 mogilefsd
79
80 newconfd "${FILESDIR}"/mogstored-conf.d-2.30 mogstored
81 newinitd "${FILESDIR}"/mogstored-init.d-2.30 mogstored
82
83 diropts -m 700 -o ${MOGILE_USER}
84 keepdir /var/run/mogile
85 keepdir /var/mogdata
86 diropts -m 755 -o root
87
88 dodir /etc/mogilefs
89 insinto /etc/mogilefs
90 insopts -m 600 -o root -g ${MOGILE_USER}
91 newins "${FILESDIR}"/mogilefsd.conf-2.30 mogilefsd.conf
92 newins "${FILESDIR}"/mogstored.conf-2.16 mogstored.conf
93 }
94
95 pkg_postinst() {
96 chmod 640 "${ROOT}"/etc/mogilefs/{mogilefsd,mogstored}.conf
97 chown root:${MOGILE_USER} "${ROOT}"/etc/mogilefs/{mogilefsd,mogstored}.conf
98 }

  ViewVC Help
Powered by ViewVC 1.1.20