1 require samba-essential.inc
6 SRC_URI = "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"
15 INITSCRIPT_NAME = "samba"
16 # No dependencies, goes in at level 20 (NOTE: take care with the
17 # level, later levels put the shutdown later too - see the links
18 # in rc6.d, the shutdown must precede network shutdown).
19 INITSCRIPT_PARAMS = "defaults"
20 CONFFILES_${PN} = "${sysconfdir}/samba/smb.conf"
22 # The file system settings --foodir=dirfoo and overridden unconditionally
23 # in the samba config by --with-foodir=dirfoo - even if the --with is not
24 # specified! Fix that here. Set the privatedir to /etc/samba/private.
26 --with-configdir=${sysconfdir}/samba \
27 --with-privatedir=${sysconfdir}/samba/private \
28 --with-lockdir=${localstatedir}/lock \
29 --with-piddir=${localstatedir}/run \
30 --with-logfilebase=${localstatedir}/log \
31 --with-libdir=${libdir} \
32 --with-mandir=${mandir} \
36 install -d "${D}${localstatedir}/log"
37 rm -f ${D}/sbin/mount.smbfs
39 install -d "${D}${sysconfdir}/init.d"
40 install -d "${D}${sysconfdir}/samba/private"
42 install -c -m 755 ${WORKDIR}/init-essential ${D}${sysconfdir}/init.d/samba
44 install -d "${D}${sysconfdir}/samba"
45 install -d "${D}/usr/share/samba/help"
47 install -m 0644 ${WORKDIR}/smb-essential-inactive.conf "${D}${sysconfdir}/samba/"
48 install -m 0644 ${WORKDIR}/smb-essential.conf "${D}${sysconfdir}/samba/smb.conf"
50 install -m 0644 ${WORKDIR}/Managing-Samba.txt ${D}/usr/share/samba/help
54 do_configure_append() {
55 distro_up="`echo "${DISTRO}" | awk '{printf("%s\n",toupper($0))}'`"
57 cat ${WORKDIR}/smb-essential-inactive.conf | sed "s/MYWORKGROUP/${distro_up}/" > ${WORKDIR}/smb-essential-inactive.conf_
58 mv ${WORKDIR}/smb-essential-inactive.conf_ ${WORKDIR}/smb-essential-inactive.conf
60 cat ${WORKDIR}/smb-essential.conf | sed "s/MYWORKGROUP/${distro_up}/" > ${WORKDIR}/smb-essential.conf_
61 mv ${WORKDIR}/smb-essential.conf_ ${WORKDIR}/smb-essential.conf
64 FILES_${PN} = "${bindir}/smbpasswd \