exherbo-denkn/packages/sys-auth/munge/munge-0.5.11.exheres-0

73 lines
1.6 KiB
Bash
Raw Normal View History

# 2015 Denis Knauf
2015-03-22 21:42:05 +01:00
# based on:
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-auth/munge/munge-0.5.10-r1.ebuild,v 1.12 2014/03/01 22:38:37 mgorny Exp $
require systemd-service
SUMMARY="An authentication service for creating and validating credentials"
HOMEPAGE="http://dun.github.io/munge/"
DOWNLOADS="https://github.com/dun/munge/releases/download/${PNV}/${PNV}.tar.bz2"
2015-03-22 21:42:05 +01:00
SLOT="0"
#LICENSES="GPL-3"
PLATFORMS="~amd64 ~x86"
MYOPTIONS="gcrypt systemd"
DEPENDENCIES="
gcrypt? ( dev-libs/libgcrypt )
!gcrypt? ( dev-libs/openssl )
2015-03-22 21:42:05 +01:00
group/munge
user/munge
"
src_configure() {
local conf=""
if option gcrypt; then
conf="${conf} --with-crypto-lib=libgcrypt"
else
conf="${conf} --with-crypto-lib=openssl"
fi
econf ${conf} --localstatedir=/var
}
2015-03-22 23:40:55 +01:00
munge_remove() {
2015-03-23 13:56:59 +01:00
for d in "$@"; do
dir="${IMAGE}/$d"
[ -e "${dir}" ] && edo rm -rf "${dir}"
done
2015-03-22 21:42:05 +01:00
}
2015-03-22 23:40:55 +01:00
pkg_setup() {
exdirectory --allow /run
}
2015-03-22 21:42:05 +01:00
src_install() {
emake DESTDIR="${IMAGE}" install
2015-03-23 13:56:59 +01:00
munge_remove /var/run /etc/init.d /etc/default /etc/sysconfig
2015-03-22 21:42:05 +01:00
2015-03-23 13:56:59 +01:00
diropts -o munge -g munge -m 700
keepdir /run/munge /var/lib/munge /etc/munge
2015-03-22 21:42:05 +01:00
insinto /etc/munge
doins "${FILES}"/munged.conf
2015-10-01 22:35:05 +02:00
diropts -o munge -g munge -m 750
2015-03-23 13:56:59 +01:00
keepdir /var/log/munge
2015-03-22 21:42:05 +01:00
if option systemd
then
install_systemd_files
insinto /usr/$(exhost --target)/lib/tmpfiles.d
2015-03-22 21:42:05 +01:00
hereins munge.conf <<EOF
D /run/munge 0770 munge munge -
EOF
fi
}
src_test() {
emake check
}