1 SECTION = "console/network"
3 DEPENDS = "readline virtual/libiconv talloc"
5 SRC_URI = "http://samba.org/samba/ftp/stable/samba-${PV}.tar.gz \
6 file://volatiles.03_samba \
12 S = "${WORKDIR}/samba-${PV}/source"
14 inherit autotools update-rc.d
16 FILES_${PN} += "${libdir}/vfs/*.so ${libdir}/charset/*.so ${libdir}/*.dat \
17 ${libdir}/auth/*.so ${libdir}/security/*.so"
18 FILES_${PN}-dbg += "${libdir}/vfs/.debug/*.so ${libdir}/charset/.debug/*.so \
19 ${libdir}/auth/.debug/*.so ${libdir}/security/.debug/*.so"
22 SAMBAMMAP_libc-glibc = "yes"
24 # The file system settings --foodir=dirfoo and overridden unconditionally
25 # in the samba config by --with-foodir=dirfoo - even if the --with is not
26 # specified! Fix that here. Set the privatedir to /etc/samba/private.
27 EXTRA_OECONF='--disable-cups \
28 --with-readline=${STAGING_LIBDIR}/.. \
29 --with-libiconv=${STAGING_LIBDIR}/.. \
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} \
38 --with-swatdir=${datadir}/swat \
41 samba_cv_struct_timespec=yes \
42 libreplace_cv_HAVE_MMAP=${SAMBAMMAP}'
44 INITSCRIPT_NAME = "samba"
45 # No dependencies, goes in at level 20 (NOTE: take care with the
46 # level, later levels put the shutdown later too - see the links
47 # in rc6.d, the shutdown must precede network shutdown).
48 INITSCRIPT_PARAMS = "defaults"
49 CONFFILES_${PN} = "${sysconfdir}/samba/smb.conf"
51 do_configure_prepend () {
53 if [ ! -e acinclude.m4 ]; then
55 cat aclocal.m4 > acinclude.m4
60 oe_runmake proto_exists
65 install -d ${D}${libdir}/pkgconfig/
66 cp ${WORKDIR}/tdb.pc ${D}${libdir}/pkgconfig/
67 mv ${D}${libdir}/libsmbclient.so ${D}${libdir}/libsmbclient.so.0 || true
68 ln -sf libsmbclient.so.0 ${D}${libdir}/libsmbclient.so
69 mkdir -p ${D}${base_sbindir}
70 rm -f ${D}${bindir}/*.old
71 rm -f ${D}${sbindir}/*.old
72 [ -f ${D}${sbindir}/mount.cifs ] && mv ${D}${sbindir}/mount.cifs ${D}${base_sbindir}/
73 [ -f ${D}${sbindir}/umount.cifs ] && mv ${D}${sbindir}/umount.cifs ${D}${base_sbindir}/
75 # This is needed for < 3.2.4
76 rm -f ${D}${sbindir}/mount.smbfs ${D}${base_sbindir}/mount.smbfs
77 if [ -f ${D}${bindir}/smbmount ]; then
78 ln -sf ${bindir}/smbmount ${D}${base_sbindir}/mount.smb
79 ln -sf ${bindir}/smbmount ${D}${base_sbindir}/mount.smbfs
82 install -D -m 755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/samba
83 install -D -m 644 ${WORKDIR}/smb.conf ${D}${sysconfdir}/samba/smb.conf
84 install -D -m 644 ${WORKDIR}/volatiles.03_samba ${D}${sysconfdir}/default/volatiles/volatiles.03_samba
85 install -d ${D}/var/log/samba
86 install -d ${D}/var/spool/samba