wok-stable rev 2190

Add samba-pam
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Feb 09 10:01:41 2009 +0000 (2009-02-09)
parents 938072585546
children f5d6508f734f
files samba-pam/receipt samba-pam/stuff/etc/init.d/samba samba-pam/stuff/etc/samba/smb.conf samba-pam/stuff/smbclient.files-list samba/receipt
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/samba-pam/receipt	Mon Feb 09 10:01:41 2009 +0000
     1.3 @@ -0,0 +1,71 @@
     1.4 +# SliTaz package receipt.
     1.5 +
     1.6 +PACKAGE="samba-pam"
     1.7 +VERSION="3.2.1"
     1.8 +CATEGORY="system-tools"
     1.9 +SHORT_DESC="File and print services with SMB/CIFS using PAM."
    1.10 +MAINTAINER="pascal.bellard@slitaz.org"
    1.11 +SOURCE="samba"
    1.12 +TARBALL="$SOURCE-$VERSION.tar.gz"
    1.13 +WEB_SITE="http://samba.org/"
    1.14 +WGET_URL="${WEB_SITE}$PACKAGE/ftp/stable/$TARBALL"
    1.15 +BUILD_DEPENDS="libldap openldap-dev cups cups-dev pam pam-dev"
    1.16 +DEPENDS="libldap smbclient perl cups glibc-extra-samba pam"
    1.17 +CONFIG_FILES="/etc/samba"
    1.18 +PROVIDE="samba:pam"
    1.19 +BUGS="Open directory needs MIT kerberos support (krb5)"
    1.20 +
    1.21 +# Rules to configure and make the package.
    1.22 +compile_rules()
    1.23 +{
    1.24 +	cd $src/source
    1.25 +	./configure --prefix=/usr --infodir=/usr/share/info \
    1.26 +	--with-piddir=/var/run/samba --with-lockdir=/var/run/samba \
    1.27 +	--with-winbind --with-ldap --with-fhs --enable-cups --enable-swat \
    1.28 +	--enable-shared-libs --with-libtalloc --with-libtdb \
    1.29 +	--with-libsmbsharemodes --with-libsmbclient \
    1.30 +	--with-pam --with-pammodulesdir=/lib/security \
    1.31 +	--sysconfdir=/etc --localstatedir=/var \
    1.32 +	--mandir=/usr/share/man $CONFIGURE_ARGS &&
    1.33 +	make &&
    1.34 +	make DESTDIR=$PWD/../_pkg install || return 1
    1.35 +	rm -f ../_pkg/usr/*bin/*.old
    1.36 +	ln -s libwbclient.so $PWD/../_pkg/usr/lib/libwbclient.so.0
    1.37 +	cp ../../stuff/*.files-list ..
    1.38 +}
    1.39 +
    1.40 +# Rules to gen a SliTaz package suitable for Tazpkg.
    1.41 +genpkg_rules()
    1.42 +{
    1.43 +	mkdir -p $fs/usr
    1.44 +	cp -a $_pkg/etc $fs
    1.45 +	cp -a $_pkg/var $fs
    1.46 +	cp -a $_pkg/usr/lib $fs/usr
    1.47 +	cp -a $_pkg/usr/sbin $fs/usr
    1.48 +	cp -a $_pkg/usr/bin $fs/usr
    1.49 +	cp -a stuff/etc $fs
    1.50 +	cat $src/*.files-list | while read file; do
    1.51 +		rm -rf $fs$file
    1.52 +	done
    1.53 +	# Package all samba pkgs
    1.54 +	for i in $(cd $WOK; grep -l '^WANTED="samba"$' */receipt)
    1.55 +	do
    1.56 +    		tazwok cook ${i%/receipt}
    1.57 +	done
    1.58 +}
    1.59 +
    1.60 +# Pre and post install commands for Tazpkg.
    1.61 +post_install()
    1.62 +{
    1.63 +	cat <<EOF
    1.64 +----
    1.65 +The main configuration file is /etc/samba/smb.conf
    1.66 +----
    1.67 +To start $PACKAGE server you can run :
    1.68 +
    1.69 +    /etc/init.d/$PACKAGE start
    1.70 +
    1.71 +Or add $PACKAGE to RUN_DAEMONS in /etc/rcS.conf
    1.72 +----
    1.73 +EOF
    1.74 +}
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/samba-pam/stuff/etc/init.d/samba	Mon Feb 09 10:01:41 2009 +0000
     2.3 @@ -0,0 +1,76 @@
     2.4 +#!/bin/sh
     2.5 +# /etc/init.d/samba : Start, stop and restart Samba server on SliTaz, at 
     2.6 +# boot time or with the command line.
     2.7 +#
     2.8 +# To start Samba server at boot time, just put samba in the $RUN_DAEMONS
     2.9 +# variable of /etc/rcS.conf and configure options with /etc/daemons.conf
    2.10 +#
    2.11 +. /etc/init.d/rc.functions
    2.12 +. /etc/daemons.conf
    2.13 +
    2.14 +NAME=Samba
    2.15 +DESC="Samba server"
    2.16 +SMBD=/usr/sbin/smbd
    2.17 +NMBD=/usr/sbin/nmbd
    2.18 +NMBPIDFILE=/var/run/samba/nmbd.pid
    2.19 +SMBPIDFILE=/var/run/samba/smbd.pid
    2.20 +
    2.21 +case "$1" in
    2.22 +  start)
    2.23 +    if [ -f $SMBPIDFILE ] ; then
    2.24 +      echo "$NAME already running."
    2.25 +      exit 1
    2.26 +    fi
    2.27 +    echo -n "Starting $DESC: $SMBD... "
    2.28 +    $SMBD -D
    2.29 +    status
    2.30 +    echo -n "Starting $DESC: $NMBD... "
    2.31 +    $NMBD -D
    2.32 +    status
    2.33 +    ;;
    2.34 +  stop)
    2.35 +    if [ ! -f $SMBPIDFILE ] ; then
    2.36 +      echo "$NAME is not running."
    2.37 +      exit 1
    2.38 +    fi
    2.39 +    echo -n "Stopping $DESC: $SMBD... "
    2.40 +    kill `cat $SMBPIDFILE`
    2.41 +    status
    2.42 +    echo -n "Stopping $DESC: $NMBD... "
    2.43 +    kill `cat $NMBPIDFILE`
    2.44 +    status
    2.45 +    ;;
    2.46 +  restart)
    2.47 +    if [ ! -f $SMBPIDFILE ] ; then
    2.48 +      echo "$NAME is not running."
    2.49 +      exit 1
    2.50 +    fi
    2.51 +    echo -n "Restarting $DESC: $SMBD... "
    2.52 +    kill `cat $SMBPIDFILE`
    2.53 +    sleep 2
    2.54 +    $SMBD -D
    2.55 +    status
    2.56 +    echo -n "Restarting $DESC: $NMBD... "
    2.57 +    kill `cat $NMBPIDFILE`
    2.58 +    sleep 2
    2.59 +    $NMBD -D
    2.60 +    status
    2.61 +    ;;
    2.62 +  reload)
    2.63 +    if [ ! -f $SMBPIDFILE ] ; then
    2.64 +      echo "$NAME is not running."
    2.65 +      exit 1
    2.66 +    fi
    2.67 +    echo -n "Reloading $DESC: $SMBD... "
    2.68 +    kill -HUP `cat $SMBPIDFILE`
    2.69 +    status
    2.70 +    ;;
    2.71 +  *)
    2.72 +    echo ""
    2.73 +    echo -e "\033[1mUsage:\033[0m /etc/init.d/`basename $0` [start|stop|restart!reload]"
    2.74 +    echo ""
    2.75 +    exit 1
    2.76 +    ;;
    2.77 +esac
    2.78 +
    2.79 +exit 0
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/samba-pam/stuff/etc/samba/smb.conf	Mon Feb 09 10:01:41 2009 +0000
     3.3 @@ -0,0 +1,10 @@
     3.4 +[global]
     3.5 +workgroup = SLITAZ
     3.6 +security = SHARE
     3.7 +
     3.8 +[homes]
     3.9 +comment = Home Directories
    3.10 +valid users = %S
    3.11 +read only = No
    3.12 +browseable = No
    3.13 +
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/samba-pam/stuff/smbclient.files-list	Mon Feb 09 10:01:41 2009 +0000
     4.3 @@ -0,0 +1,9 @@
     4.4 +/usr/lib/libwbclient.so*
     4.5 +/usr/bin/smbclient
     4.6 +/usr/bin/smbspool
     4.7 +/usr/bin/smbget
     4.8 +/usr/bin/smbtree
     4.9 +/usr/bin/smbcacls
    4.10 +/usr/bin/smbcquotas
    4.11 +/usr/bin/smbtar
    4.12 +/usr/bin/rpcclient
     5.1 --- a/samba/receipt	Mon Feb 09 09:58:01 2009 +0000
     5.2 +++ b/samba/receipt	Mon Feb 09 10:01:41 2009 +0000
     5.3 @@ -21,7 +21,7 @@
     5.4  	--with-piddir=/var/run/samba --with-lockdir=/var/run/samba \
     5.5  	--with-winbind --with-ldap --with-fhs --enable-cups --enable-swat \
     5.6  	--enable-shared-libs --with-libtalloc --with-libtdb \
     5.7 -	--with-libsmbsharemodes --with-libsmbclient \
     5.8 +	--with-libsmbsharemodes --with-libsmbclient --without-pam \
     5.9  	--sysconfdir=/etc --localstatedir=/var \
    5.10  	--mandir=/usr/share/man $CONFIGURE_ARGS &&
    5.11  	make &&