wok-next rev 1250
Add samba
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Tue Aug 12 15:43:10 2008 +0000 (2008-08-12) |
parents | e87cddeb92a1 |
children | 2cfec27e2d9c |
files | samba-dev/receipt samba/receipt samba/stuff/etc/init.d/samba samba/stuff/etc/samba/smb.conf samba/stuff/smbclient.files-list smbclient/receipt swat/receipt swat/stuff/swat.desktop |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/samba-dev/receipt Tue Aug 12 15:43:10 2008 +0000 1.3 @@ -0,0 +1,17 @@ 1.4 +# SliTaz package receipt. 1.5 + 1.6 +PACKAGE="samba-dev" 1.7 +VERSION="3.2.1" 1.8 +CATEGORY="development" 1.9 +SHORT_DESC="File and print services with SMB/CIFS, development files." 1.10 +MAINTAINER="pascal.bellard@slitaz.org" 1.11 +WEB_SITE="http://samba.org/" 1.12 +WANTED="samba" 1.13 + 1.14 +# Rules to gen a SliTaz package suitable for Tazpkg. 1.15 +genpkg_rules() 1.16 +{ 1.17 + mkdir -p $fs/usr 1.18 + cp -a $_pkg/usr/include $fs/usr 1.19 +} 1.20 +
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/samba/receipt Tue Aug 12 15:43:10 2008 +0000 2.3 @@ -0,0 +1,76 @@ 2.4 +# SliTaz package receipt. 2.5 + 2.6 +PACKAGE="samba" 2.7 +VERSION="3.2.1" 2.8 +CATEGORY="system-tools" 2.9 +SHORT_DESC="File and print services with SMB/CIFS." 2.10 +MAINTAINER="pascal.bellard@slitaz.org" 2.11 +TARBALL="$PACKAGE-$VERSION.tar.gz" 2.12 +WEB_SITE="http://samba.org/" 2.13 +WGET_URL="${WEB_SITE}$PACKAGE/ftp/stable/$TARBALL" 2.14 +BUILD_DEPENDS="libldap openldap-dev cups cups-dev" 2.15 +DEPENDS="libldap smbclient perl cups" 2.16 +CONFIG_FILES="/etc/samba" 2.17 +BUGS="Open directory needs MIT kerberos support (krb5)" 2.18 + 2.19 +# Rules to configure and make the package. 2.20 +compile_rules() 2.21 +{ 2.22 + cd $src/source 2.23 + ./configure --prefix=/usr --infodir=/usr/share/info \ 2.24 + --with-piddir=/var/run/samba --with-lockdir=/var/run/samba \ 2.25 + --with-winbind --with-ldap --with-fhs --enable-cups --enable-swat \ 2.26 + --enable-shared-libs --with-libtalloc --with-libtdb \ 2.27 + --with-libsmbsharemodes --with-libsmbclient \ 2.28 + --sysconfdir=/etc --localstatedir=/var \ 2.29 + --mandir=/usr/share/man $CONFIGURE_ARGS 2.30 + make 2.31 + make DESTDIR=$PWD/../_pkg install 2.32 + ln -s libwbclient.so $PWD/../_pkg/usr/lib/libwbclient.so.0 2.33 + cp ../../stuff/*.files-list .. 2.34 +} 2.35 + 2.36 +# Rules to gen a SliTaz package suitable for Tazpkg. 2.37 +genpkg_rules() 2.38 +{ 2.39 + mkdir -p $fs/usr 2.40 + cp -a $_pkg/etc $fs 2.41 + cp -a $_pkg/var $fs 2.42 + cp -a $_pkg/usr/lib $fs/usr 2.43 + cp -a $_pkg/usr/sbin $fs/usr 2.44 + cp -a $_pkg/usr/bin $fs/usr 2.45 + cp -a stuff/etc $fs 2.46 + cat $src/*.files-list | while read file; do 2.47 + rm -rf $fs$file 2.48 + done 2.49 + # Package all samba pkgs 2.50 + for i in $(cd $WOK; grep -l '^WANTED="samba"$' */receipt) 2.51 + do 2.52 + tazwok cook ${i%/receipt} 2.53 + done 2.54 +} 2.55 + 2.56 +# Pre and post install commands for Tazpkg. 2.57 +post_install() 2.58 +{ 2.59 + ( cd $1/ ; cpio -o -H newc | gzip -9 ) > \ 2.60 + $1/$INSTALLED/$PACKAGE/volatile.cpio.gz <<EOT 2.61 +etc/samba 2.62 +EOT 2.63 + cat <<EOF 2.64 +---- 2.65 +The main configuration file is /etc/samba/smb.conf 2.66 +---- 2.67 +To start $PACKAGE server you can run : 2.68 + 2.69 + /etc/init.d/$PACKAGE start 2.70 + 2.71 +Or add $PACKAGE to RUN_DAEMONS in /etc/rcS.conf 2.72 +---- 2.73 +EOF 2.74 +} 2.75 + 2.76 +repack_cleanup() 2.77 +{ 2.78 + zcat $INSTALLED/$PACKAGE/volatile.cpio.gz | ( cd $1 ; cpio -id ) 2.79 +}
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 3.2 +++ b/samba/stuff/etc/init.d/samba Tue Aug 12 15:43:10 2008 +0000 3.3 @@ -0,0 +1,76 @@ 3.4 +#!/bin/sh 3.5 +# /etc/init.d/samba : Start, stop and restart Samba server on SliTaz, at 3.6 +# boot time or with the command line. 3.7 +# 3.8 +# To start Samba server at boot time, just put samba in the $RUN_DAEMONS 3.9 +# variable of /etc/rcS.conf and configure options with /etc/daemons.conf 3.10 +# 3.11 +. /etc/init.d/rc.functions 3.12 +. /etc/daemons.conf 3.13 + 3.14 +NAME=Samba 3.15 +DESC="Samba server" 3.16 +SMBD=/usr/sbin/smbd 3.17 +NMBD=/usr/sbin/nmbd 3.18 +NMBPIDFILE=/var/run/samba/nmbd.pid 3.19 +SMBPIDFILE=/var/run/samba/smbd.pid 3.20 + 3.21 +case "$1" in 3.22 + start) 3.23 + if [ -f $SMBPIDFILE ] ; then 3.24 + echo "$NAME already running." 3.25 + exit 1 3.26 + fi 3.27 + echo -n "Starting $DESC: $SMBD... " 3.28 + $SMBD -D 3.29 + status 3.30 + echo -n "Starting $DESC: $NMBD... " 3.31 + $NMBD -D 3.32 + status 3.33 + ;; 3.34 + stop) 3.35 + if [ ! -f $SMBPIDFILE ] ; then 3.36 + echo "$NAME is not running." 3.37 + exit 1 3.38 + fi 3.39 + echo -n "Stopping $DESC: $SMBD... " 3.40 + kill `cat $SMBPIDFILE` 3.41 + status 3.42 + echo -n "Stopping $DESC: $NMBD... " 3.43 + kill `cat $NMBPIDFILE` 3.44 + status 3.45 + ;; 3.46 + restart) 3.47 + if [ ! -f $SMBPIDFILE ] ; then 3.48 + echo "$NAME is not running." 3.49 + exit 1 3.50 + fi 3.51 + echo -n "Restarting $DESC: $SMBD... " 3.52 + kill `cat $SMBPIDFILE` 3.53 + sleep 2 3.54 + $SMBD -D 3.55 + status 3.56 + echo -n "Restarting $DESC: $NMBD... " 3.57 + kill `cat $NMBPIDFILE` 3.58 + sleep 2 3.59 + $NMBD -D 3.60 + status 3.61 + ;; 3.62 + reload) 3.63 + if [ ! -f $SMBPIDFILE ] ; then 3.64 + echo "$NAME is not running." 3.65 + exit 1 3.66 + fi 3.67 + echo -n "Reloading $DESC: $SMBD... " 3.68 + kill -HUP `cat $SMBPIDFILE` 3.69 + status 3.70 + ;; 3.71 + *) 3.72 + echo "" 3.73 + echo -e "\033[1mUsage:\033[0m /etc/init.d/`basename $0` [start|stop|restart!reload]" 3.74 + echo "" 3.75 + exit 1 3.76 + ;; 3.77 +esac 3.78 + 3.79 +exit 0
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 4.2 +++ b/samba/stuff/etc/samba/smb.conf Tue Aug 12 15:43:10 2008 +0000 4.3 @@ -0,0 +1,10 @@ 4.4 +[global] 4.5 +workgroup = SLITAZ 4.6 +security = SHARE 4.7 + 4.8 +[homes] 4.9 +comment = Home Directories 4.10 +valid users = %S 4.11 +read only = No 4.12 +browseable = No 4.13 +
5.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 5.2 +++ b/samba/stuff/smbclient.files-list Tue Aug 12 15:43:10 2008 +0000 5.3 @@ -0,0 +1,9 @@ 5.4 +/usr/lib/libwbclient.so* 5.5 +/usr/bin/smbclient 5.6 +/usr/bin/smbspool 5.7 +/usr/bin/smbget 5.8 +/usr/bin/smbtree 5.9 +/usr/bin/smbcacls 5.10 +/usr/bin/smbcquotas 5.11 +/usr/bin/smbtar 5.12 +/usr/bin/rpcclient
6.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 6.2 +++ b/smbclient/receipt Tue Aug 12 15:43:10 2008 +0000 6.3 @@ -0,0 +1,21 @@ 6.4 +# SliTaz package receipt. 6.5 + 6.6 +PACKAGE="smbclient" 6.7 +VERSION="3.2.1" 6.8 +CATEGORY="network" 6.9 +SHORT_DESC="File and print services with SMB/CIFS, client side." 6.10 +MAINTAINER="pascal.bellard@slitaz.org" 6.11 +WEB_SITE="http://samba.org/" 6.12 +DEPENDS="libldap openssl" 6.13 +WANTED="samba" 6.14 + 6.15 +# Rules to gen a SliTaz package suitable for Tazpkg. 6.16 +genpkg_rules() 6.17 +{ 6.18 + while read file; do 6.19 + dir=$(dirname $file) 6.20 + [ -d $fs$dir ] || mkdir -p $fs$dir 6.21 + cp -a $_pkg$file $fs$dir 6.22 + done < $src/$PACKAGE.files-list 6.23 +} 6.24 +
7.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 7.2 +++ b/swat/receipt Tue Aug 12 15:43:10 2008 +0000 7.3 @@ -0,0 +1,32 @@ 7.4 +# SliTaz package receipt. 7.5 + 7.6 +PACKAGE="swat" 7.7 +VERSION="3.2.1" 7.8 +CATEGORY="development" 7.9 +SHORT_DESC="Samba Web Administration Tool." 7.10 +MAINTAINER="pascal.bellard@slitaz.org" 7.11 +WEB_SITE="http://samba.org/" 7.12 +DEPENDS="samba" 7.13 +WANTED="samba" 7.14 + 7.15 +# Rules to gen a SliTaz package suitable for Tazpkg. 7.16 +genpkg_rules() 7.17 +{ 7.18 + mkdir -p $fs/usr/share/samba 7.19 + cp -a $_pkg/usr/share/samba/swat $fs/usr/share/samba 7.20 + cp stuff/swat.desktop $fs/usr/share/applications 7.21 +} 7.22 + 7.23 +post_install() 7.24 +{ 7.25 + if [ -f $1/etc/lighttpd/lighttpd.conf ]; then 7.26 + if ! grep -q /usr/share/samba/swat/ $1/etc/lighttpd/lighttpd.conf; then 7.27 + sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/swat/" => "/usr/share/samba/swat/",|g' -i $1/etc/lighttpd/lighttpd.conf 7.28 + if [ -z "$1" ]; then 7.29 + # Start Web server. 7.30 + /etc/init.d/lighttpd stop 7.31 + /etc/init.d/lighttpd start 7.32 + fi 7.33 + fi 7.34 + fi 7.35 +}
8.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 8.2 +++ b/swat/stuff/swat.desktop Tue Aug 12 15:43:10 2008 +0000 8.3 @@ -0,0 +1,7 @@ 8.4 +[Desktop Entry] 8.5 +Encoding=UTF-8 8.6 +Name=SAMBA Administration 8.7 +Icon=/usr/share/samba/swat/images/samba.gif 8.8 +Exec=firefox http://127.0.0.1/swat/ 8.9 +Type=Application 8.10 +Categories=System;