# James Dingwall # ebuild for yubico-pam module # https://github.com/Yubico/yubico-pam # References # eclass autotools :: http://devmanual.gentoo.org/eclass-reference/autotools.eclass/index.html # eclass git-2 :: http://devmanual.gentoo.org/eclass-reference/git-2.eclass/index.html inherit eutils git-2 autotools pam DESCRIPTION="Yubico PAM module" HOMEPAGE="https://github.com/Yubico/yubic-pam" EAPI="4" LICENSE="BSD" SLOT="0" KEYWORDS="amd64" IUSE="doc ldap static-libs" DEPEND="sys-auth/ykclient sys-auth/libyubikey sys-auth/ykpers virtual/pam" RDEPEND="${DEPEND}" EGIT_REPO_URI="git://github.com/Yubico/yubico-pam.git" EGIT_COMMIT="${PV}" EGIT_HAS_SUBMODULES="true" WANT_AUTOMAKE="1.11.1" src_unpack() { # Fetch the git repository and move to tag ${EGIT_COMMIT} git-2_src_unpack } src_prepare() { eautoreconf --install || die eautoreconf failed } src_configure() { local myconf if ! use ldap ; then myconf="${mconf} --without-ldap" fi econf \ $(use_enable static-libs static) \ ${myconf} } src_compile() { emake || die make failed } src_test() { emake check || die tests failed } src_install() { emake DESTDIR="${D}" install # If USE=static-libs the .la file is required otherwise remove it use static-libs || find "${ED}" -name '*.la' -exec rm -f {} + # Default install action installs PAM .so to /usr, use pam eclass to # install to / and then remove /usr/lib from image newpammod .libs/pam_yubico.so pam_yubico.so rm -rf "${D}/usr/lib" #AUTHORS exist in git but not 2.9 release dodoc README NEWS COPYING if use doc ; then docinto doc dodoc doc/* fi }