| 1 |
# Copyright 1999-2013 Gentoo Foundation
|
| 2 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
# $Header: /var/cvsroot/gentoo-x86/sys-auth/munge/munge-0.5.10-r1.ebuild,v 1.2 2012/05/24 05:04:28 vapier Exp $
|
| 4 |
|
| 5 |
EAPI=4
|
| 6 |
inherit user
|
| 7 |
|
| 8 |
DESCRIPTION="An authentication service for creating and validating credentials"
|
| 9 |
HOMEPAGE="http://code.google.com/p/munge/"
|
| 10 |
SRC_URI="http://munge.googlecode.com/files/${P}.tar.bz2"
|
| 11 |
|
| 12 |
LICENSE="GPL-3"
|
| 13 |
SLOT="0"
|
| 14 |
KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
|
| 15 |
IUSE="gcrypt"
|
| 16 |
|
| 17 |
DEPEND="app-arch/bzip2
|
| 18 |
sys-libs/zlib
|
| 19 |
gcrypt? ( dev-libs/libgcrypt )
|
| 20 |
!gcrypt? ( dev-libs/openssl )"
|
| 21 |
RDEPEND="${DEPEND}"
|
| 22 |
|
| 23 |
pkg_setup() {
|
| 24 |
enewgroup munge
|
| 25 |
enewuser munge -1 -1 /var/lib/munge munge
|
| 26 |
}
|
| 27 |
|
| 28 |
src_configure() {
|
| 29 |
local conf=""
|
| 30 |
|
| 31 |
if use gcrypt; then
|
| 32 |
conf="${conf} --with-crypto-lib=libgcrypt"
|
| 33 |
else
|
| 34 |
conf="${conf} --with-crypto-lib=openssl"
|
| 35 |
fi
|
| 36 |
|
| 37 |
econf ${conf} \
|
| 38 |
--localstatedir=/var
|
| 39 |
}
|
| 40 |
|
| 41 |
src_install() {
|
| 42 |
emake DESTDIR="${D}" install || die
|
| 43 |
|
| 44 |
# 450830
|
| 45 |
if [ -d "${D}"/var/run ]; then
|
| 46 |
rm -rf "${D}"/var/run || die
|
| 47 |
fi
|
| 48 |
|
| 49 |
diropts -o munge -g munge -m700
|
| 50 |
dodir /etc/munge || die
|
| 51 |
|
| 52 |
[ -d "${D}"/etc/init.d ] && rm -r "${D}"/etc/init.d
|
| 53 |
[ -d "${D}"/etc/default ] && rm -r "${D}"/etc/default
|
| 54 |
[ -d "${D}"/etc/sysconfig ] && rm -r "${D}"/etc/sysconfig
|
| 55 |
|
| 56 |
newconfd "${FILESDIR}"/${PN}d.confd ${PN}d || die
|
| 57 |
newinitd "${FILESDIR}"/${PN}d.initd ${PN}d || die
|
| 58 |
}
|
| 59 |
|
| 60 |
src_test() {
|
| 61 |
emake check || die
|
| 62 |
}
|