xfce4-battery-plugin: tune the pandora hack
[openembedded.git] / recipes / samba / samba-essential_3.0.20.bb
1 require samba-essential.inc
2 inherit update-rc.d
3
4 PR = "r7"
5
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"
12
13 RCONFLICTS = "samba"
14
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"
21
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.
25 EXTRA_OECONF += "\
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} \
33         "
34
35 do_install_append() {
36         install -d "${D}${localstatedir}/log"
37         rm -f ${D}/sbin/mount.smbfs
38         rmdir ${D}/sbin
39         install -d "${D}${sysconfdir}/init.d"
40         install -d "${D}${sysconfdir}/samba/private"
41
42         install -c -m 755 ${WORKDIR}/init-essential ${D}${sysconfdir}/init.d/samba
43
44         install -d "${D}${sysconfdir}/samba"
45         install -d "${D}/usr/share/samba/help"
46
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"
49
50         install -m 0644 ${WORKDIR}/Managing-Samba.txt  ${D}/usr/share/samba/help
51
52 }
53
54 do_configure_append() {
55         distro_up="`echo "${DISTRO}" | awk '{printf("%s\n",toupper($0))}'`"
56
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
59
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
62 }
63
64 FILES_${PN} = "${bindir}/smbpasswd \
65                ${sbindir}/nmbd \
66                ${sbindir}/smbd \
67                ${libdir}/charset \
68                ${libdir}/vfs \
69                ${libdir}/*.dat \
70                /usr/share/samba \
71                /etc"