| 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-libs/libpwquality/libpwquality-1.2.0.ebuild,v 1.2 2012/08/24 22:00:37 tetromino Exp $
|
| 4 |
|
| 5 |
EAPI="5"
|
| 6 |
PYTHON_DEPEND="python? 2:2.7"
|
| 7 |
|
| 8 |
inherit eutils multilib pam python
|
| 9 |
|
| 10 |
DESCRIPTION="Library for password quality checking and generating random passwords"
|
| 11 |
HOMEPAGE="https://fedorahosted.org/libpwquality/"
|
| 12 |
SRC_URI="https://fedorahosted.org/releases/l/i/${PN}/${P}.tar.bz2"
|
| 13 |
|
| 14 |
LICENSE="|| ( BSD GPL-2 )"
|
| 15 |
SLOT="0"
|
| 16 |
KEYWORDS="~amd64 ~x86"
|
| 17 |
IUSE="pam python static-libs"
|
| 18 |
|
| 19 |
RDEPEND=">=sys-libs/cracklib-2.8
|
| 20 |
pam? ( virtual/pam )"
|
| 21 |
DEPEND="${RDEPEND}
|
| 22 |
sys-devel/libtool
|
| 23 |
virtual/pkgconfig"
|
| 24 |
|
| 25 |
pkg_setup() {
|
| 26 |
if use python; then
|
| 27 |
python_set_active_version 2
|
| 28 |
python_pkg_setup
|
| 29 |
fi
|
| 30 |
}
|
| 31 |
|
| 32 |
src_prepare() {
|
| 33 |
# ensure pkgconfig files go in /usr
|
| 34 |
sed -e 's:\(pkgconfigdir *=\).*:\1 '${EPREFIX}/usr/$(get_libdir)'/pkgconfig:' \
|
| 35 |
-i src/Makefile.{am,in} || die "sed failed"
|
| 36 |
}
|
| 37 |
|
| 38 |
src_configure() {
|
| 39 |
# Install library in /lib for pam
|
| 40 |
local sitedir
|
| 41 |
use python && sitedir="${EPREFIX}$(python_get_sitedir)"
|
| 42 |
econf \
|
| 43 |
--libdir="${EPREFIX}/$(get_libdir)" \
|
| 44 |
$(use_enable pam) \
|
| 45 |
--with-securedir="${EPREFIX}/$(getpam_mod_dir)" \
|
| 46 |
$(use_enable python python-bindings) \
|
| 47 |
--with-pythonsitedir="${sitedir}" \
|
| 48 |
$(use_enable static-libs static)
|
| 49 |
}
|
| 50 |
|
| 51 |
src_install() {
|
| 52 |
default
|
| 53 |
prune_libtool_files --modules
|
| 54 |
}
|