summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOyvind Repvik <nail@nslu2-linux.org>2006-09-02 17:55:23 +0000
committerOyvind Repvik <nail@nslu2-linux.org>2006-09-02 17:55:23 +0000
commit358f48301ec25e4f35daf798eb41cfd767f2cab8 (patch)
treeb64da2515af15b6bacfe25a7ef4f15ad808b2fd9
parent13f062b8488b5e53ae1c74f140ed421550ee8923 (diff)
samba: upstream upgrade to 3.0.23c. Add MAINTAINER and LICENCE fields
-rw-r--r--packages/samba/samba-3.0.23c/.mtn2git_empty0
-rw-r--r--packages/samba/samba-3.0.23c/Managing-Samba.txt40
-rw-r--r--packages/samba/samba-3.0.23c/cifs.patch10
-rw-r--r--packages/samba/samba-3.0.23c/config-lfs.patch47
-rw-r--r--packages/samba/samba-3.0.23c/configure.patch170
-rw-r--r--packages/samba/samba-3.0.23c/init58
-rw-r--r--packages/samba/samba-3.0.23c/init-essential68
-rw-r--r--packages/samba/samba-3.0.23c/quota.patch11
-rw-r--r--packages/samba/samba-3.0.23c/smb-essential-inactive.conf34
-rw-r--r--packages/samba/samba-3.0.23c/smb-essential.conf82
-rw-r--r--packages/samba/samba_3.0.23c.bb55
11 files changed, 575 insertions, 0 deletions
diff --git a/packages/samba/samba-3.0.23c/.mtn2git_empty b/packages/samba/samba-3.0.23c/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/samba/samba-3.0.23c/.mtn2git_empty
diff --git a/packages/samba/samba-3.0.23c/Managing-Samba.txt b/packages/samba/samba-3.0.23c/Managing-Samba.txt
new file mode 100644
index 0000000000..01f7592824
--- /dev/null
+++ b/packages/samba/samba-3.0.23c/Managing-Samba.txt
@@ -0,0 +1,40 @@
+This device is running a bare-bone Samba server which allows easy
+transfer of files and directories between any networked desktop PC and
+your networked PDA.
+
+Since it is generally a bad idea to allow everyone read and write access
+to your PDA, you will have to configure at least one user to get access to
+any shared folder.
+
+How to create a Samba user with password:
+
+- If you haven't already created a non-root user, do so now:
+ root@poodle:/usr/bin# adduser testuser
+ Changing password for testuser
+ Enter the new password (minimum of 5, maximum of 8 characters)
+ Please use a combination of upper and lower case letters and numbers.
+ Enter new password:
+ Bad password: too short.
+
+ Warning: weak password (continuing).
+ Re-enter new password:
+ Password changed.
+ root@poodle:/usr/bin#
+
+- Note that the password you entered will _not_ be your samba password.
+ Samba uses its own password database.
+
+- Add a Samba password for your user:
+ root@poodle:/usr/bin# smbpasswd -a testuser
+ New SMB password:
+ Retype new SMB password:
+ Added user testuser.
+ root@poodle:/usr/bin#
+
+- After you have added your new samba user, you'll have to restart the samba
+ server by running "/etc/init.d/samba restart" or by rebooting the device
+
+- Use the newly created username / password combination to access your network
+ shares. Please note the the Samba username must also exist as a unix username!
+
+
diff --git a/packages/samba/samba-3.0.23c/cifs.patch b/packages/samba/samba-3.0.23c/cifs.patch
new file mode 100644
index 0000000000..ee6dab567f
--- /dev/null
+++ b/packages/samba/samba-3.0.23c/cifs.patch
@@ -0,0 +1,10 @@
+--- source/client/mount.cifs.c.old 2004-11-28 02:33:52.000000000 +1030
++++ source/client/mount.cifs.c 2004-11-28 02:33:59.000000000 +1030
+@@ -36,6 +36,7 @@
+ #include <string.h>
+ #include <mntent.h>
+ #include <fcntl.h>
++#include <linux/limits.h>
+
+ #define MOUNT_CIFS_VERSION_MAJOR "1"
+ #define MOUNT_CIFS_VERSION_MINOR "2"
diff --git a/packages/samba/samba-3.0.23c/config-lfs.patch b/packages/samba/samba-3.0.23c/config-lfs.patch
new file mode 100644
index 0000000000..b37ed690ce
--- /dev/null
+++ b/packages/samba/samba-3.0.23c/config-lfs.patch
@@ -0,0 +1,47 @@
+Cache the check for Linux LFS support, so it can be prepopulated from
+the site cache for configure variables for cross-compiling. Without this,
+samba gets the idea that it can use dirent64 and friends without defining
+the flags it needs to get it, such as _GNU_SOURCE and _LARGEFILE64_SOURCE.
+
+Symptoms of getting the configuration wrong on cross-compile inculde
+warnings such as
+
+ smbd/trans2.c: In function `get_lanman2_dir_entry':
+ smbd/trans2.c:1065: warning: right shift count >= width of type
+
+and errors like
+
+ smbd/vfs.c:630: error: dereferencing pointer to incomplete type
+
+(when trying to dereference dirent64.)
+
+--- source/configure.in.orig 2005-05-29 14:46:18.000000000 -0700
++++ source/configure.in 2005-05-29 14:51:57.000000000 -0700
+@@ -588,7 +588,7 @@
+ # Tests for linux LFS support. Need kernel 2.4 and glibc2.2 or greater support.
+ #
+ *linux*)
+- AC_MSG_CHECKING([for LFS support])
++ AC_CACHE_CHECK([for LFS support], samba_cv_LINUX_LFS_SUPPORT,[
+ old_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
+ AC_TRY_RUN([
+@@ -627,15 +627,14 @@
+ exit(1);
+ #endif
+ }
+-], [LINUX_LFS_SUPPORT=yes], [LINUX_LFS_SUPPORT=no], [LINUX_LFS_SUPPORT=cross])
+- CPPFLAGS="$old_CPPFLAGS"
+- if test x$LINUX_LFS_SUPPORT = xyes ; then
++], [samba_cv_LINUX_LFS_SUPPORT=yes], [samba_cv_LINUX_LFS_SUPPORT=no], [samba_cv_LINUX_LFS_SUPPORT=cross])
++ CPPFLAGS="$old_CPPFLAGS"])
++ if test x"$samba_cv_LINUX_LFS_SUPPORT" = x"yes" ; then
+ CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
+ AC_DEFINE(_LARGEFILE64_SOURCE, 1, [Whether to enable large file support])
+ AC_DEFINE(_FILE_OFFSET_BITS, 64, [File offset bits])
+ AC_DEFINE(_GNU_SOURCE, 1, [Whether to use GNU libc extensions])
+ fi
+- AC_MSG_RESULT([$LINUX_LFS_SUPPORT])
+ ;;
+
+ #
diff --git a/packages/samba/samba-3.0.23c/configure.patch b/packages/samba/samba-3.0.23c/configure.patch
new file mode 100644
index 0000000000..0366efb314
--- /dev/null
+++ b/packages/samba/samba-3.0.23c/configure.patch
@@ -0,0 +1,170 @@
+
+#
+# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
+#
+
+--- source/configure.in~configure 2003-12-14 22:36:25.000000000 -0500
++++ source/configure.in 2004-01-26 14:33:15.000000000 -0500
+@@ -959,7 +959,7 @@
+ #endif
+ exit(0);
+ }
+-], [linux_getgrouplist_ok=yes], [linux_getgrouplist_ok=no])
++], [linux_getgrouplist_ok=yes], [linux_getgrouplist_ok=no], [linux_getgrouplist_ok=cross])
+ if test x"$linux_getgrouplist_ok" = x"yes"; then
+ AC_DEFINE(HAVE_GETGROUPLIST, 1, [Have good getgrouplist])
+ fi
+--- source/aclocal.m4~configure 2004-01-26 14:33:15.000000000 -0500
++++ source/aclocal.m4 2004-01-26 17:34:28.000000000 -0500
+@@ -2,7 +2,7 @@
+ dnl if the cache file is inconsistent with the current host,
+ dnl target and build system types, execute CMD or print a default
+ dnl error message.
+-AC_DEFUN(AC_VALIDATE_CACHE_SYSTEM_TYPE, [
++AC_DEFUN([AC_VALIDATE_CACHE_SYSTEM_TYPE], [
+ AC_REQUIRE([AC_CANONICAL_SYSTEM])
+ AC_MSG_CHECKING([config.cache system type])
+ if { test x"${ac_cv_host_system_type+set}" = x"set" &&
+@@ -24,7 +24,7 @@
+
+
+ dnl test whether dirent has a d_off member
+-AC_DEFUN(AC_DIRENT_D_OFF,
++AC_DEFUN([AC_DIRENT_D_OFF],
+ [AC_CACHE_CHECK([for d_off in dirent], ac_cv_dirent_d_off,
+ [AC_TRY_COMPILE([
+ #include <unistd.h>
+@@ -38,7 +38,7 @@
+
+ dnl Mark specified module as shared
+ dnl SMB_MODULE(name,static_files,shared_files,subsystem,whatif-static,whatif-shared)
+-AC_DEFUN(SMB_MODULE,
++AC_DEFUN([SMB_MODULE],
+ [
+ AC_MSG_CHECKING([how to build $1])
+ if test "$[MODULE_][$1]"; then
+@@ -68,7 +68,7 @@
+ fi
+ ])
+
+-AC_DEFUN(SMB_SUBSYSTEM,
++AC_DEFUN([SMB_SUBSYSTEM],
+ [
+ AC_SUBST($1_STATIC)
+ AC_SUBST($1_MODULES)
+@@ -77,7 +77,7 @@
+ ])
+
+ dnl AC_PROG_CC_FLAG(flag)
+-AC_DEFUN(AC_PROG_CC_FLAG,
++AC_DEFUN([AC_PROG_CC_FLAG],
+ [AC_CACHE_CHECK(whether ${CC-cc} accepts -$1, ac_cv_prog_cc_$1,
+ [echo 'void f(){}' > conftest.c
+ if test -z "`${CC-cc} -$1 -c conftest.c 2>&1`"; then
+@@ -91,7 +91,7 @@
+ dnl see if a declaration exists for a function or variable
+ dnl defines HAVE_function_DECL if it exists
+ dnl AC_HAVE_DECL(var, includes)
+-AC_DEFUN(AC_HAVE_DECL,
++AC_DEFUN([AC_HAVE_DECL],
+ [
+ AC_CACHE_CHECK([for $1 declaration],ac_cv_have_$1_decl,[
+ AC_TRY_COMPILE([$2],[int i = (int)$1],
+@@ -223,7 +223,7 @@
+
+ dnl Define an AC_DEFINE with ifndef guard.
+ dnl AC_N_DEFINE(VARIABLE [, VALUE])
+-define(AC_N_DEFINE,
++define([AC_N_DEFINE],
+ [cat >> confdefs.h <<\EOF
+ [#ifndef] $1
+ [#define] $1 ifelse($#, 2, [$2], $#, 3, [$2], 1)
+@@ -233,14 +233,14 @@
+
+ dnl Add an #include
+ dnl AC_ADD_INCLUDE(VARIABLE)
+-define(AC_ADD_INCLUDE,
++define([AC_ADD_INCLUDE],
+ [cat >> confdefs.h <<\EOF
+ [#include] $1
+ EOF
+ ])
+
+ dnl Copied from libtool.m4
+-AC_DEFUN(AC_PROG_LD_GNU,
++AC_DEFUN([AC_PROG_LD_GNU],
+ [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
+ [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
+ if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
+@@ -259,7 +259,7 @@
+ dnl AM_PATH_XML2([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
+ dnl Test for XML, and define XML_CFLAGS and XML_LIBS
+ dnl
+-AC_DEFUN(AM_PATH_XML2,[
++AC_DEFUN([AM_PATH_XML2],[
+ AC_ARG_WITH(xml-prefix,
+ [ --with-xml-prefix=PFX Prefix where libxml is installed (optional)],
+ xml_config_prefix="$withval", xml_config_prefix="")
+@@ -443,7 +443,7 @@
+ dnl AM_PATH_MYSQL([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
+ dnl Test for MYSQL, and define MYSQL_CFLAGS and MYSQL_LIBS
+ dnl
+-AC_DEFUN(AM_PATH_MYSQL,
++AC_DEFUN([AM_PATH_MYSQL],
+ [dnl
+ dnl Get the cflags and libraries from the mysql_config script
+ dnl
+@@ -485,7 +485,7 @@
+ ])
+
+ dnl Removes -I/usr/include/? from given variable
+-AC_DEFUN(CFLAGS_REMOVE_USR_INCLUDE,[
++AC_DEFUN([CFLAGS_REMOVE_USR_INCLUDE],[
+ ac_new_flags=""
+ for i in [$]$1; do
+ case [$]i in
+@@ -497,7 +497,7 @@
+ ])
+
+ dnl Removes -L/usr/lib/? from given variable
+-AC_DEFUN(LIB_REMOVE_USR_LIB,[
++AC_DEFUN([LIB_REMOVE_USR_LIB],[
+ ac_new_flags=""
+ for i in [$]$1; do
+ case [$]i in
+@@ -510,7 +510,7 @@
+
+ dnl From Bruno Haible.
+
+-AC_DEFUN(jm_ICONV,
++AC_DEFUN([jm_ICONV],
+ [
+ dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
+ dnl those with the standalone portable libiconv installed).
+@@ -607,7 +607,7 @@
+ fi
+ ])
+
+-AC_DEFUN(rjs_CHARSET,[
++AC_DEFUN([rjs_CHARSET],[
+ dnl Find out if we can convert from $1 to UCS2-LE
+ AC_MSG_CHECKING([can we convert from $1 to UCS2-LE?])
+ AC_TRY_RUN([
+@@ -625,7 +625,7 @@
+
+ dnl CFLAGS_ADD_DIR(CFLAGS, $INCDIR)
+ dnl This function doesn't add -I/usr/include into CFLAGS
+-AC_DEFUN(CFLAGS_ADD_DIR,[
++AC_DEFUN([CFLAGS_ADD_DIR],[
+ if test "$2" != "/usr/include" ; then
+ $1="$$1 -I$2"
+ fi
+@@ -633,7 +633,7 @@
+
+ dnl LIB_ADD_DIR(LDFLAGS, $LIBDIR)
+ dnl This function doesn't add -L/usr/lib into LDFLAGS
+-AC_DEFUN(LIB_ADD_DIR,[
++AC_DEFUN([LIB_ADD_DIR],[
+ if test "$2" != "/usr/lib" ; then
+ $1="$$1 -L$2"
+ fi
diff --git a/packages/samba/samba-3.0.23c/init b/packages/samba/samba-3.0.23c/init
new file mode 100644
index 0000000000..cb57b17de4
--- /dev/null
+++ b/packages/samba/samba-3.0.23c/init
@@ -0,0 +1,58 @@
+#! /bin/sh
+#
+# This is an init script for openembedded
+# Copy it to /etc/init.d/samba and type
+# > update-rc.d samba defaults 60
+#
+
+
+smbd=/usr/sbin/smbd
+test -x "$smbd" || exit 0
+nmbd=/usr/sbin/nmbd
+test -x "$nmbd" || exit 0
+
+
+case "$1" in
+ start)
+ echo -n "Starting Samba: smbd"
+ start-stop-daemon --start --quiet --exec $smbd
+ echo -n " nmbd"
+ start-stop-daemon --start --quiet --exec $nmbd
+ echo "."
+ ;;
+ stop)
+ echo -n "Stopping Samba: smbd"
+ start-stop-daemon --stop --quiet --pidfile /var/run/smbd.pid
+ echo -n " nmbd"
+ start-stop-daemon --stop --quiet --pidfile /var/run/nmbd.pid
+ echo "."
+ ;;
+ reload|force-reload)
+ start-stop-daemon --stop --quiet --signal 1 --exec $smbd
+ start-stop-daemon --stop --quiet --signal 1 --exec $nmbd
+ ;;
+ restart)
+ echo -n "Stopping Samba: smbd"
+ start-stop-daemon --stop --quiet --pidfile /var/run/smbd.pid
+ echo -n " nmbd"
+ start-stop-daemon --stop --quiet --pidfile /var/run/nmbd.pid
+ echo ""
+ echo -n "Waiting for samba processes to die off"
+ for i in 1 2 3 ;
+ do
+ sleep 1
+ echo -n "."
+ done
+ echo ""
+ echo -n "Starting Samba: smbd"
+ start-stop-daemon --start --quiet --exec $smbd
+ echo -n " nmbd"
+ start-stop-daemon --start --quiet --exec $nmbd
+ echo "."
+ ;;
+ *)
+ echo "Usage: /etc/init.d/samba {start|stop|reload|restart|force-reload}"
+ exit 1
+esac
+
+exit 0 \ No newline at end of file
diff --git a/packages/samba/samba-3.0.23c/init-essential b/packages/samba/samba-3.0.23c/init-essential
new file mode 100644
index 0000000000..59184ce733
--- /dev/null
+++ b/packages/samba/samba-3.0.23c/init-essential
@@ -0,0 +1,68 @@
+#! /bin/sh
+#
+# This is an init script for openembedded
+# Copy it to /etc/init.d/samba and type
+# > update-rc.d samba defaults 60
+#
+
+
+smbd=/usr/sbin/smbd
+test -x "$smbd" || exit 0
+nmbd=/usr/sbin/nmbd
+test -x "$nmbd" || exit 0
+
+
+if test -e /etc/samba/private/smbpasswd
+then
+ if test -n "`cat /etc/samba/private/smbpasswd`"
+ then
+ CONFIG_FILE="/etc/samba/smb.conf"
+ fi
+fi
+
+test -z "$CONFIG_FILE" && CONFIG_FILE="/etc/samba/smb-essential-inactive.conf"
+
+case "$1" in
+ start)
+ echo -n "Starting Samba: smbd"
+ start-stop-daemon --start --quiet --exec $smbd -- -s $CONFIG_FILE
+ echo -n " nmbd"
+ start-stop-daemon --start --quiet --exec $nmbd -- -s $CONFIG_FILE
+ echo "."
+ ;;
+ stop)
+ echo -n "Stopping Samba: smbd"
+ start-stop-daemon --stop --quiet --pidfile /var/run/smbd.pid
+ echo -n " nmbd"
+ start-stop-daemon --stop --quiet --pidfile /var/run/nmbd.pid
+ echo "."
+ ;;
+ reload|force-reload)
+ start-stop-daemon --stop --quiet --signal 1 --exec $smbd -- -s $CONFIG_FILE
+ start-stop-daemon --stop --quiet --signal 1 --exec $nmbd -- -s $CONFIG_FILE
+ ;;
+ restart)
+ echo -n "Stopping Samba: smbd"
+ start-stop-daemon --stop --quiet --pidfile /var/run/smbd.pid
+ echo -n " nmbd"
+ start-stop-daemon --stop --quiet --pidfile /var/run/nmbd.pid
+ echo ""
+ echo -n "Waiting for samba processes to die off"
+ for i in 1 2 3 ;
+ do
+ sleep 1
+ echo -n "."
+ done
+ echo ""
+ echo -n "Starting Samba: smbd"
+ start-stop-daemon --start --quiet --exec $smbd -- -s $CONFIG_FILE
+ echo -n " nmbd"
+ start-stop-daemon --start --quiet --exec $nmbd -- -s $CONFIG_FILE
+ echo "."
+ ;;
+ *)
+ echo "Usage: /etc/init.d/samba {start|stop|reload|restart|force-reload}"
+ exit 1
+esac
+
+exit 0
diff --git a/packages/samba/samba-3.0.23c/quota.patch b/packages/samba/samba-3.0.23c/quota.patch
new file mode 100644
index 0000000000..6f42ff868f
--- /dev/null
+++ b/packages/samba/samba-3.0.23c/quota.patch
@@ -0,0 +1,11 @@
+--- lib/sysquotas_4A.c.old 2005-07-03 17:16:00.000000000 +0200
++++ lib/sysquotas_4A.c 2005-07-03 17:10:09.000000000 +0200
+@@ -28,6 +28,8 @@
+ /* long quotactl(int cmd, char *special, qid_t id, caddr_t addr) */
+ /* this is used by: HPUX,IRIX */
+
++ #define _LINUX_QUOTA_VERSION 1
++
+ #ifdef HAVE_SYS_TYPES_H
+ #include <sys/types.h>
+ #endif
diff --git a/packages/samba/samba-3.0.23c/smb-essential-inactive.conf b/packages/samba/samba-3.0.23c/smb-essential-inactive.conf
new file mode 100644
index 0000000000..d42d63cb9a
--- /dev/null
+++ b/packages/samba/samba-3.0.23c/smb-essential-inactive.conf
@@ -0,0 +1,34 @@
+
+
+[global]
+ workgroup = MYWORKGROUP
+ server string = OpenZaurus Samba Server
+
+ netbios name = %L-INACTIVE
+
+ security = share
+
+ load printers = no
+
+ socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
+
+ dns proxy = yes
+
+
+#============================ Share Definitions ==============================
+
+[Samba-Help]
+ comment = How to enable Samba
+ path = /usr/share/samba/help
+ writable = no
+ public = yes
+ printable = no
+
+[printers]
+ comment = All Printers
+ path = /usr/spool/samba
+ guest ok = no
+ writable = no
+ printable = yes
+ browseable = no
+
diff --git a/packages/samba/samba-3.0.23c/smb-essential.conf b/packages/samba/samba-3.0.23c/smb-essential.conf
new file mode 100644
index 0000000000..24cb2a56cb
--- /dev/null
+++ b/packages/samba/samba-3.0.23c/smb-essential.conf
@@ -0,0 +1,82 @@
+
+
+[global]
+ workgroup = MYWORKGROUP
+ server string = OpenZaurus Samba Server
+
+ security = user
+
+ load printers = no
+
+; guest account = pcguest
+
+ log file = /var/log.%m
+
+ max log size = 50
+
+ socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
+
+ dns proxy = yes
+
+
+#============================ Share Definitions ==============================
+[homes]
+ comment = Home Directory for %U
+ browseable = no
+ writable = yes
+ follow symlinks = yes
+ include = /etc/test.%U
+
+# This one is useful for people to share files
+;[tmp]
+; comment = Temporary file space
+; path = /tmp
+; read only = no
+; public = yes
+
+[printers]
+ comment = All Printers
+ path = /usr/spool/samba
+ guest ok = no
+ writable = no
+ printable = yes
+ browseable = no
+
+[CompactFlash]
+ comment = Compact Flash Storage
+ path = /media/cf
+ writable = yes
+ printable = no
+ public = no
+
+[SD-MMC]
+ comment = SD & MMC Storage
+ path = /media/card
+ writable = yes
+ printable = no
+ public = no
+
+[RootFS]
+ comment = Zaurus Rootfs
+ path = /
+ writable = yes
+ printable = no
+ public = no
+ follow symlinks = yes
+
+[Home]
+ comment = "User Home Directories"
+ path = /home
+ writable = yes
+ printable = no
+ public = no
+ follow symlinks = yes
+
+[Samba-Help]
+ comment = How to configure Samba
+ path = /usr/share/samba/help
+ writable = no
+ public = yes
+ printable = no
+
+
diff --git a/packages/samba/samba_3.0.23c.bb b/packages/samba/samba_3.0.23c.bb
new file mode 100644
index 0000000000..e129b241b3
--- /dev/null
+++ b/packages/samba/samba_3.0.23c.bb
@@ -0,0 +1,55 @@
+LICENCE="GPL-2"
+MAINTAINER="Oyvind Repvik <nail@nslu2-linux.org>"
+PR = "r0"
+
+SRC_URI = "http://us2.samba.org/samba/ftp/stable/samba-${PV}.tar.gz \
+ file://configure.patch;patch=1 \
+ file://cifs.patch;patch=1 \
+ file://config-lfs.patch;patch=1 \
+ file://init \
+ file://quota.patch;patch=1;pnum=0 \
+ "
+S = ${WORKDIR}/${P}/source
+
+include samba.inc
+inherit update-rc.d
+
+INITSCRIPT_NAME = "samba"
+# No dependencies, goes in at level 20 (NOTE: take care with the
+# level, later levels put the shutdown later too - see the links
+# in rc6.d, the shutdown must precede network shutdown).
+INITSCRIPT_PARAMS = "defaults"
+CONFFILES_${PN} = "${sysconfdir}/samba/smb.conf"
+
+# The file system settings --foodir=dirfoo and overridden unconditionally
+# in the samba config by --with-foodir=dirfoo - even if the --with is not
+# specified! Fix that here. Set the privatedir to /etc/samba/private.
+EXTRA_OECONF += "\
+ samba_cv_struct_timespec=yes \
+ --with-configdir=${sysconfdir}/samba \
+ --with-privatedir=${sysconfdir}/samba/private \
+ --with-lockdir=${localstatedir}/lock \
+ --with-piddir=${localstatedir}/run \
+ --with-logfilebase=${localstatedir}/log \
+ --with-libdir=${libdir} \
+ --with-mandir=${mandir} \
+ --with-swatdir=${datadir}/swat \
+ "
+
+do_install_append() {
+ install -d "${D}${localstatedir}/log"
+ rm -f ${D}/sbin/mount.smbfs
+ ln -sf smbmount ${D}${sbindir}/mount.smbfs
+ install -d "${D}${sysconfdir}/init.d"
+ install -c -m 755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/samba
+ install -d "${D}${sysconfdir}/samba"
+ install -c -m 644 ../examples/smb.conf.default ${D}${sysconfdir}/samba/smb.conf
+}
+
+PACKAGES =+ "swat"
+
+FILES_swat = "${sbindir}/swat ${datadir}/swat ${libdir}/*.msg"
+FILES_${PN} += "${libdir}/vfs/*.so ${libdir}/charset/*.so ${libdir}/*.dat ${libdir}/auth/*.so"
+#
+# bug fix for samba.inc:
+FILES_cifs-doc = "${mandir}/man8/mount.cifs.8"