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}"
|
---|
14 | fi
|
---|
15 |
|
---|
16 | unpack_tarball samba-${MYSQL_VER}
|
---|
17 |
|
---|
18 | # TODO, set --with-libdir here only when biarch...
|
---|
19 | # remove from configure below
|
---|
20 | cd ${PKGDIR}/source
|
---|
21 |
|
---|
22 | max_log_init samba ${MYSQL_VER} "blfs (shared)" ${CONFLOGS} ${LOG}
|
---|
23 | CC="${CC-gcc} ${ARCH_CFLAGS}" \
|
---|
24 | CXX="${CXX-g++} ${ARCH_CFLAGS}" \
|
---|
25 | CFLAGS="${TGT_CFLAGS}" \
|
---|
26 | CXXLAGS="${TGT_CFLAGS}" \
|
---|
27 | ./configure --prefix=/usr ${extra_conf} \
|
---|
28 | --with-libdir=/usr/${libdirname}/samba \
|
---|
29 | --sysconfdir=/etc \
|
---|
30 | --with-configdir=/etc/samba \
|
---|
31 | --localstatedir=/var \
|
---|
32 | --with-piddir=/var/run \
|
---|
33 | --with-fhs \
|
---|
34 | --with-smbmount \
|
---|
35 | --with-automount \
|
---|
36 | --with-python=python${suffix} \
|
---|
37 | --with-pam \
|
---|
38 | --with-expsam=xml,mysql \
|
---|
39 | >> ${LOGFILE} 2>&1 &&
|
---|
40 | echo " o Configure OK" &&
|
---|
41 |
|
---|
42 | min_log_init ${BUILDLOGS} &&
|
---|
43 | make ${PMFLAGS} \
|
---|
44 | >> ${LOGFILE} 2>&1 &&
|
---|
45 | echo " o Build OK" &&
|
---|
46 |
|
---|
47 | min_log_init ${INSTLOGS} &&
|
---|
48 | make install \
|
---|
49 | >> ${LOGFILE} 2>&1 &&
|
---|
50 | echo " o ALL OK" || barf
|
---|
51 |
|
---|
52 | mv /usr/${libdirname}/samba/libsmbclient.so /usr/${libdirname} &&
|
---|
53 | ln -sf ../libsmbclient.so /usr/${libdirname}/samba &&
|
---|
54 | #chmod 644 /usr/include/libsmbclient.h \
|
---|
55 | # /usr/${libdir}/samba/libsmbclient.a &&
|
---|
56 | chmod 644 /usr/include/libsmbclient.h &&
|
---|
57 | install -m755 nsswitch/libnss_win{s,bind}.so /${libdirname} &&
|
---|
58 | ln -sf libnss_winbind.so /${libdirname}/libnss_winbind.so.2 &&
|
---|
59 | ln -sf libnss_wins.so /${libdirname}/libnss_wins.so.2 &&
|
---|
60 | cp ../examples/smb.conf.default /etc/samba &&
|
---|
61 | install -m644 ../docs/*.pdf /usr/share/samba &&
|
---|
62 | if [ -f nsswitch/pam_winbind.so ]; then
|
---|
63 | install -m755 nsswitch/pam_winbind.so /${libdirname}/security
|
---|
64 | fi
|
---|