#!/bin/env beesh

# BEE_VERSION Linux-PAM-1.3.0-0

SRCURL[0]="http://linux-pam.org/library/Linux-PAM-${PKGVERSION}.tar.bz2"

# PATCHURL+=()

# EXCLUDE=""

#SBINDIR=/lib/security
#LIBDIR=/lib
INCLUDEDIR=/usr/include/security

#mee_patch() {
#    bee_patch "${@}"
#}

mee_configure() {
    bee_configure \
       --enable-read-both-confs \
       --disable-cracklib
}

#mee_build() {
#    bee_build
#}

mee_install() {
    bee_install

    # until we fixed consolekit , systemd and gnome-keyring to put their stuff into
    # /usr/lib/security instead of /lib/security

    ln -s /lib/security/pam_systemd.so       $D$LIBDIR/security/
    ln -s /lib/security/pam_ck_connector.so  $D$LIBDIR/security/
    ln -s /lib/security/pam_gnome_keyring.so $D$LIBDIR/security/

    # just samples, to not overwrite config

    for i in ${SYSCONFDIR}/environment ${SYSCONFDIR}/security/{access.conf,group.conf,limits.conf,namespace.conf,namespace.init,pam_env.conf,time.conf} ; do
        mv -v ${D}${i}{,.sample}
    done
}