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
|
---|
13 | extra_conf="--libdir=/usr/${libdirname}/samba"
|
---|
14 | fi
|
---|
15 |
|
---|
16 | unpack_tarball samba-${SAMBA_VER}
|
---|
17 |
|
---|
18 | cd ${PKGDIR}/source
|
---|
19 |
|
---|
20 | max_log_init samba ${SAMBA_VER} "blfs (shared)" ${CONFLOGS} ${LOG}
|
---|
21 | CC="${CC-gcc} ${ARCH_CFLAGS}" \
|
---|
22 | CXX="${CXX-g++} ${ARCH_CFLAGS}" \
|
---|
23 | CFLAGS="-O2 -pipe ${TGT_CFLAGS}" \
|
---|
24 | CXXLAGS="-O2 -pipe ${TGT_CFLAGS}" \
|
---|
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 \
|
---|
33 | --with-python \
|
---|
34 | --with-pam \
|
---|
35 | --with-expsam=xml,mysql,pgsql \
|
---|
36 | >> ${LOGFILE} 2>&1 &&
|
---|
37 | echo " o Configure OK" &&
|
---|
38 |
|
---|
39 | # BAH, samba doesn't seem to want to honour --libdir
|
---|
40 | min_log_init ${BUILDLOGS} &&
|
---|
41 | make LIBDIR=/usr/${libdirname}/samba \
|
---|
42 | >> ${LOGFILE} 2>&1 &&
|
---|
43 | echo " o Build OK" &&
|
---|
44 |
|
---|
45 | min_log_init ${INSTLOGS} &&
|
---|
46 | make LIBDIR=/usr/${libdirname}/samba install \
|
---|
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 &&
|
---|
58 | cp ../examples/smb.conf.default /tmp/${PKGDIR}-${BUILDENV}/etc/samba &&
|
---|
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
|
---|