samba: remove /var/run, which caused a packaging error
[opendreambox.git] / meta-opendreambox / recipes-connectivity / samba / samba_3.0.37.bbappend
1 SRC_URI += " \
2         file://01samba-kill \
3         file://01samba-start \
4 "
5
6 PACKAGES =+ "smbfs smbfs-doc sambaserver libpopt libtalloc"
7
8 FILES_smbfs = "${bindir}/smbmount ${bindir}/smbumount ${bindir}/smbmnt ${base_sbindir}/mount.smbfs ${base_sbindir}/mount.smb"
9 FILES_smbfs-doc = "${mandir}/man8/smbmount.8 ${mandir}/man8/smbumount.8 ${mandir}/man8/smbmnt.8"
10 FILES_sambaserver = "${sbindir}/smbd ${sbindir}/nmbd ${libdir}/charset/*.so ${libdir}/*.dat \
11         ${sysconfdir}/samba/smb.conf ${sysconfdir}/samba/private \
12         ${sysconfdir}/network/if-up.d/01samba-start ${sysconfdir}/network/if-down.d/01samba-kill"
13 FILES_libpopt = "${libdir}/libpopt.so.*"
14 FILES_libtalloc = "${libdir}/libtalloc.so.*"
15
16 CONFFILES_${PN} = ""
17 CONFFILES_sambaserver = "${sysconfdir}/samba/smb.conf"
18
19 do_install_prepend() {
20         install -c -m 644 ${WORKDIR}/smb.conf ../examples/smb.conf.default
21 }
22
23 do_install_append() {
24         install -d ${D}${sysconfdir}/samba/private
25         install -d ${D}${sysconfdir}/network/if-down.d
26         install -m 0755 ${WORKDIR}/01samba-kill ${D}${sysconfdir}/network/if-down.d
27         install -d ${D}${sysconfdir}/network/if-up.d
28         install -m 0755 ${WORKDIR}/01samba-start ${D}${sysconfdir}/network/if-up.d
29         rmdir ${D}/var/run
30 }
31
32 EXTRA_OECONF += " \
33         samba_cv_LINUX_LFS_SUPPORT=yes \
34         samba_cv_HAVE_OFF64_T=yes \
35         samba_cv_have_longlong=yes \
36         samba_cv_HAVE_UNSIGNED_CHAR=yes \
37         samba_cv_HAVE_GETTIMEOFDAY_TZ=yes \
38         samba_cv_HAVE_C99_VSNPRINTF=yes \
39         samba_cv_HAVE_BROKEN_READDIR=no \
40         samba_cv_HAVE_IFACE_IFCONF=yes \
41 "
42
43 pkg_prerm_sambaserver() {
44         killall -9 smbd nmbd || /bin/true
45 }
46
47 SQUASHFS_IMG_PACKAGES = "sambaserver-sqsh-img"
48 SQUASHFS_IMG_REPLACES = "sambaserver"
49
50 inherit squashfs-img