[617118d] | 1 | #!/bin/bash
|
---|
| 2 |
|
---|
| 3 | ### samba ###
|
---|
| 4 |
|
---|
| 5 | cd ${SRC}
|
---|
| 6 | LOG=samba-blfs.log
|
---|
| 7 |
|
---|
| 8 | SELF=`basename ${0}`
|
---|
| 9 | set_buildenv
|
---|
| 10 | set_libdirname
|
---|
| 11 | setup_multiarch
|
---|
| 12 | if [ ! "${libdirname}" = "lib" ]; then
|
---|
[4e71b7e] | 13 | extra_conf="--libdir=/usr/${libdirname}/samba"
|
---|
[617118d] | 14 | fi
|
---|
| 15 |
|
---|
[4e71b7e] | 16 | unpack_tarball samba-${SAMBA_VER}
|
---|
[617118d] | 17 |
|
---|
| 18 | cd ${PKGDIR}/source
|
---|
| 19 |
|
---|
[4e71b7e] | 20 | max_log_init samba ${SAMBA_VER} "blfs (shared)" ${CONFLOGS} ${LOG}
|
---|
[617118d] | 21 | CC="${CC-gcc} ${ARCH_CFLAGS}" \
|
---|
| 22 | CXX="${CXX-g++} ${ARCH_CFLAGS}" \
|
---|
[4e71b7e] | 23 | CFLAGS="-O2 -pipe ${TGT_CFLAGS}" \
|
---|
| 24 | CXXLAGS="-O2 -pipe ${TGT_CFLAGS}" \
|
---|
[617118d] | 25 | ./configure --prefix=/usr ${extra_conf} \
|
---|
| 26 | --sysconfdir=/etc \
|
---|
| 27 | --with-configdir=/etc/samba \
|
---|
| 28 | --localstatedir=/var \
|
---|
| 29 | --with-piddir=/var/run \
|
---|
| 30 | --with-fhs \
|
---|
| 31 | --with-smbmount \
|
---|
| 32 | --with-automount \
|
---|
[4e71b7e] | 33 | --with-python \
|
---|
[617118d] | 34 | --with-pam \
|
---|
[4e71b7e] | 35 | --with-expsam=xml,mysql,pgsql \
|
---|
[617118d] | 36 | >> ${LOGFILE} 2>&1 &&
|
---|
| 37 | echo " o Configure OK" &&
|
---|
| 38 |
|
---|
[4e71b7e] | 39 | # BAH, samba doesn't seem to want to honour --libdir
|
---|
[617118d] | 40 | min_log_init ${BUILDLOGS} &&
|
---|
[4e71b7e] | 41 | make LIBDIR=/usr/${libdirname}/samba \
|
---|
[617118d] | 42 | >> ${LOGFILE} 2>&1 &&
|
---|
| 43 | echo " o Build OK" &&
|
---|
| 44 |
|
---|
| 45 | min_log_init ${INSTLOGS} &&
|
---|
[4e71b7e] | 46 | make LIBDIR=/usr/${libdirname}/samba install \
|
---|
[617118d] | 47 | >> ${LOGFILE} 2>&1 &&
|
---|
| 48 | echo " o ALL OK" || barf
|
---|
| 49 |
|
---|
| 50 | mv /usr/${libdirname}/samba/libsmbclient.so /usr/${libdirname} &&
|
---|
| 51 | ln -sf ../libsmbclient.so /usr/${libdirname}/samba &&
|
---|
| 52 | #chmod 644 /usr/include/libsmbclient.h \
|
---|
| 53 | # /usr/${libdir}/samba/libsmbclient.a &&
|
---|
| 54 | chmod 644 /usr/include/libsmbclient.h &&
|
---|
| 55 | install -m755 nsswitch/libnss_win{s,bind}.so /${libdirname} &&
|
---|
| 56 | ln -sf libnss_winbind.so /${libdirname}/libnss_winbind.so.2 &&
|
---|
| 57 | ln -sf libnss_wins.so /${libdirname}/libnss_wins.so.2 &&
|
---|
[4e71b7e] | 58 | cp ../examples/smb.conf.default /tmp/${PKGDIR}-${BUILDENV}/etc/samba &&
|
---|
[617118d] | 59 | install -m644 ../docs/*.pdf /usr/share/samba &&
|
---|
| 60 | if [ -f nsswitch/pam_winbind.so ]; then
|
---|
| 61 | install -m755 nsswitch/pam_winbind.so /${libdirname}/security
|
---|
| 62 | fi
|
---|