[617118d] | 1 | #!/bin/bash
|
---|
| 2 |
|
---|
| 3 | ### Linux-PAM ###
|
---|
| 4 | cd ${SRC}
|
---|
| 5 |
|
---|
| 6 | LOG=linux-pam-blfs.log
|
---|
| 7 | SELF=`basename ${0}`
|
---|
| 8 | set_buildenv
|
---|
| 9 | set_libdirname
|
---|
| 10 | setup_multiarch
|
---|
| 11 | if [ ! "${libdirname}" = "lib" ]; then
|
---|
| 12 | extra_conf="--libdir=/${libdirname}"
|
---|
| 13 | fi
|
---|
| 14 |
|
---|
| 15 | unpack_tarball Linux-PAM-${LINUX_PAM_VER}
|
---|
| 16 | cd ${PKGDIR}
|
---|
| 17 |
|
---|
| 18 | apply_patch Linux-PAM-0.77-linkage-3
|
---|
| 19 | autoconf
|
---|
| 20 |
|
---|
| 21 | # Fixes
|
---|
| 22 | sed -i -e "s@^LD\(\|_L\)=.*@& ${ARCH_LDFLAGS}@g" Make.Rules.in
|
---|
| 23 | sed -i -e "s@^\(CC\|CC_STATIC\|LD_D\)=.*@& ${ARCH_CFLAGS} -fPIC@g" Make.Rules.in
|
---|
| 24 |
|
---|
| 25 | max_log_init Linux-PAM ${LINUX_PAM_VER} "native (shared)" ${CONFLOGS} ${LOG}
|
---|
| 26 | ./configure --enable-static-libpam --with-mailspool=/var/mail \
|
---|
| 27 | --enable-read-both-confs --sysconfdir=/etc ${extra_conf} \
|
---|
| 28 | >> ${LOGFILE} 2>&1 &&
|
---|
| 29 | echo " o Configure OK" &&
|
---|
| 30 |
|
---|
| 31 | min_log_init ${BUILDLOGS} &&
|
---|
| 32 | make CC="gcc ${ARCH_CFLAGS} -fPIC" \
|
---|
| 33 | >> ${LOGFILE} 2>&1 &&
|
---|
| 34 | echo " o Build OK" &&
|
---|
| 35 |
|
---|
| 36 | min_log_init ${INSTLOGS} &&
|
---|
| 37 | make install \
|
---|
| 38 | >> ${LOGFILE} 2>&1 &&
|
---|
| 39 | echo " o ALL OK" || barf
|
---|
| 40 |
|
---|
| 41 | mv /${libdirname}/libpam.a /${libdirname}/libpam_misc.a /${libdirname}/libpamc.a \
|
---|
| 42 | /usr/${libdirname} &&
|
---|
| 43 |
|
---|
| 44 | ln -sf ../../${libdirname}/libpam.so.0.77 /usr/${libdirname}/libpam.so &&
|
---|
| 45 | ln -sf libpam.so.0.77 /${libdirname}/libpam.so.0 &&
|
---|
| 46 | ln -sf ../../${libdirname}/libpam_misc.so.0.77 /usr/${libdirname}/libpam_misc.so &&
|
---|
| 47 | ln -sf libpam_misc.so.0.77 /${libdirname}/libpam_misc.so.0 &&
|
---|
| 48 | ln -sf ../../${libdirname}/libpamc.so.0.77 /usr/${libdirname}/libpamc.so
|
---|
| 49 | ln -sf libpamc.so.0.77 /${libdirname}/libpamc.so.0
|
---|
| 50 |
|
---|
| 51 | # Create some sample pam files
|
---|
| 52 | mkdir /etc/pam.d
|
---|
| 53 | cat > /etc/pam.d/other <<EOF
|
---|
| 54 | # Begin /etc/pam.d/other
|
---|
| 55 |
|
---|
| 56 | auth required pam_unix.so nullok
|
---|
| 57 | account required pam_unix.so
|
---|
| 58 | session required pam_unix.so
|
---|
| 59 | password required pam_unix.so nullok
|
---|
| 60 |
|
---|
| 61 | # End /etc/pam.d/other
|
---|
| 62 | EOF
|
---|
| 63 |
|
---|
| 64 | cat > /etc/pam.conf <<EOF
|
---|
| 65 | # Begin /etc/pam.conf
|
---|
| 66 |
|
---|
| 67 | other auth required pam_unix.so nullok
|
---|
| 68 | other account required pam_unix.so
|
---|
| 69 | other session required pam_unix.so
|
---|
| 70 | other password required pam_unix.so nullok
|
---|
| 71 |
|
---|
| 72 | # End /etc/pam.conf
|
---|
| 73 | EOF
|
---|
| 74 |
|
---|