3 SRC_URI = "http://us2.samba.org/samba/ftp/stable/samba-${PV}.tar.gz \
4 file://configure.patch;patch=1 \
5 file://cifs.patch;patch=1 \
6 file://config-lfs.patch;patch=1 \
7 file://init-essential \
8 file://quota.patch;patch=1;pnum=0 \
9 file://smb-essential.conf \
10 file://smb-essential-inactive.conf \
11 file://Managing-Samba.txt"
13 S := "${WORKDIR}/samba-${PV}/source"
17 require samba-essential.inc
20 INITSCRIPT_NAME = "samba"
21 # No dependencies, goes in at level 20 (NOTE: take care with the
22 # level, later levels put the shutdown later too - see the links
23 # in rc6.d, the shutdown must precede network shutdown).
24 INITSCRIPT_PARAMS = "defaults"
25 CONFFILES_${PN} = "${sysconfdir}/samba/smb.conf"
27 # The file system settings --foodir=dirfoo and overridden unconditionally
28 # in the samba config by --with-foodir=dirfoo - even if the --with is not
29 # specified! Fix that here. Set the privatedir to /etc/samba/private.
31 --with-configdir=${sysconfdir}/samba \
32 --with-privatedir=${sysconfdir}/samba/private \
33 --with-lockdir=${localstatedir}/lock \
34 --with-piddir=${localstatedir}/run \
35 --with-logfilebase=${localstatedir}/log \
36 --with-libdir=${libdir} \
37 --with-mandir=${mandir} \
41 install -d "${D}${localstatedir}/log"
42 rm -f ${D}/sbin/mount.smbfs
44 install -d "${D}${sysconfdir}/init.d"
45 install -d "${D}${sysconfdir}/samba/private"
47 install -c -m 755 ${WORKDIR}/init-essential ${D}${sysconfdir}/init.d/samba
49 install -d "${D}${sysconfdir}/samba"
50 install -d "${D}/usr/share/samba/help"
52 install -m 0644 ${WORKDIR}/smb-essential-inactive.conf "${D}${sysconfdir}/samba/"
53 install -m 0644 ${WORKDIR}/smb-essential.conf "${D}${sysconfdir}/samba/smb.conf"
55 install -m 0644 ${WORKDIR}/Managing-Samba.txt ${D}/usr/share/samba/help
59 do_configure_append() {
60 distro_up="`echo "${DISTRO}" | awk '{printf("%s\n",toupper($0))}'`"
62 cat ${WORKDIR}/smb-essential-inactive.conf | sed "s/MYWORKGROUP/${distro_up}/" > ${WORKDIR}/smb-essential-inactive.conf_
63 mv ${WORKDIR}/smb-essential-inactive.conf_ ${WORKDIR}/smb-essential-inactive.conf
65 cat ${WORKDIR}/smb-essential.conf | sed "s/MYWORKGROUP/${distro_up}/" > ${WORKDIR}/smb-essential.conf_
66 mv ${WORKDIR}/smb-essential.conf_ ${WORKDIR}/smb-essential.conf
69 FILES_${PN} = "${bindir}/smbpasswd \