Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 25 Mar 2001 19:16:29 +0200
From:      Roman Shterenzon <roman@xpert.com>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/26076: [NEW PORT] www/smb2www - samba to web gateway
Message-ID:  <20010325191629.A16948@jamus.xpert.com>

next in thread | raw e-mail | index | archive | help

>Number:         26076
>Category:       ports
>Synopsis:       [NEW PORT] www/smb2www - samba to web gateway
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Mar 25 09:20:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Roman Shterenzon
>Release:        FreeBSD 4.2-RELEASE i386
>Organization:
>Environment:

Apache web server

>Description:


SMB2WWW, the gateway to Windows networking

SMB2WWW is a Windows Network client that is accessible through a web browser.
It is based on the samba package.

WWW: http://www.samba.org/samba/smb2www/

>How-To-Repeat:


>Fix:

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	smb2www
#	smb2www/files
#	smb2www/files/patch-smb2www.pm
#	smb2www/files/patch-Install.pl
#	smb2www/Makefile
#	smb2www/distinfo
#	smb2www/pkg-comment
#	smb2www/pkg-descr
#	smb2www/pkg-plist
#
echo c - smb2www
mkdir -p smb2www > /dev/null 2>&1
echo c - smb2www/files
mkdir -p smb2www/files > /dev/null 2>&1
echo x - smb2www/files/patch-smb2www.pm
sed 's/^X//' >smb2www/files/patch-smb2www.pm << 'END-of-smb2www/files/patch-smb2www.pm'
X--- cgi-bin/smb2www.pm.orig	Thu May 25 11:07:02 2000
X+++ cgi-bin/smb2www.pm	Tue Jul 18 12:30:44 2000
X@@ -371,7 +371,7 @@
X sub GetSMBShr {
X   my $share = $_[0];
X   my @ret = ();
X-  my $lookup = "$cfg{bindir}/smbclient -L \"$share\" -d0";
X+  my $lookup = "$cfg{bindir}/smbclient -N -L \"$share\" -d0";
X   my @out = `$lookup`;
X   my $line = shift @out;
X   while ( (not $line =~ /^\s+Sharename/) and ($#out >= -1) ) {
X@@ -406,13 +406,14 @@
X sub GetSMBHosts {
X   my ($workgroup,$host) = @_;
X   my @ret = ();
X-  my $lookup = "$cfg{bindir}/smbclient -L \"$host\" -W \"$workgroup\" -d0";
X+  my $lookup = "$cfg{bindir}/smbclient -N -L \"$host\" -W \"$workgroup\" -d0";
X   my @out = `$lookup`;
X   my $line = shift @out;
X 
X-  while ((not $line =~ /^This machine has a browse list/) and ($#out >= -1) ) {
X+  while ((not $line =~ /^\s+Server\s+Comment/) and ($#out >= -1) ) {
X     $line = shift @out;
X   }
X+  shift @out;
X   if ($#out >= -1) {
X     $line = shift @out;
X     $line = shift @out;
X@@ -437,16 +438,14 @@
X 
X sub GetSMBGroups {
X   my @ret = ();
X-  my $lookup = "$cfg{bindir}/smbclient -L \"$cfg{masterbrowser}\" -d0";
X+  my $lookup = "$cfg{bindir}/smbclient -N -L \"$cfg{masterbrowser}\" -d0";
X   my @out = `$lookup`;
X   my $line = shift @out;
X 
X-  while ((not $line =~ /^This machine has a workgroup list/) and ($#out >= 0) ) {
X+  while ((not $line =~ /^\s+Workgroup\s+Master/) and ($#out >= 0) ) {
X     $line = shift @out;
X   }
X   if ($#out >= -1) {
X-    $line = shift @out;
X-    $line = shift @out;
X     $line = shift @out;
X     $line = shift @out;
X     while ((not $line =~ /^$/) and ($#out >= -1) ) {
END-of-smb2www/files/patch-smb2www.pm
echo x - smb2www/files/patch-Install.pl
sed 's/^X//' >smb2www/files/patch-Install.pl << 'END-of-smb2www/files/patch-Install.pl'
X--- Install.pl.orig	Sun Aug  2 21:31:40 1998
X+++ Install.pl	Sun Mar 25 17:53:37 2001
X@@ -19,24 +19,24 @@
X if ($is_root == 1) {
X   while (! getpwnam($uname)) {
X     print "$uname is not a valid username.\n" if (! $uname eq ""); 
X-    print "What username shall I use to install smb2www [www-data] ? ";
X+    print "What username shall I use to install smb2www [nobody] ? ";
X     $uname=<STDIN>;
X     chop $uname;
X-    $uname = "www-data" if ($uname eq "");
X+    $uname = "nobody" if ($uname eq "");
X   }
X 
X   while (! getgrnam($gname)) {
X     print "$gname is not a valid groupname.\n" if (! $gname eq "");
X-    print "What groupname shall I use to install smb2www [www-data] ? ";
X+    print "What groupname shall I use to install smb2www [nobody] ? ";
X     $gname= <STDIN>;
X     chop $gname;
X-    $gname = "www-data" if ($gname eq "");
X+    $gname = "nobody" if ($gname eq "");
X   }
X }
X 
X-print "Where shall I put smb2www [/usr/local/smb2www] ? ";
X+print "Where shall I put smb2www [/usr/local/www/smb2www] ? ";
X $dir=<STDIN>; chop $dir;
X-if ( $dir eq "") { $dir = "/usr/local/smb2www" };
X+if ( $dir eq "") { $dir = "/usr/local/www/smb2www" };
X print "\n";
X die "Directory already exists ! Move first before continuing !" if ( -d $dir);
X mkdir "$dir",0755 or die "Unable to create directory ! Check your permissions.";
X@@ -59,9 +59,9 @@
X 
X $smbc = "";
X while (not -x "$smbc/smbclient" ) {
X-  print "In which directory is smbclient located [/usr/local/samba/bin] ? ";
X+  print "In which directory is smbclient located [/usr/local/bin] ? ";
X   $smbc=<STDIN>; chop $smbc;
X-  if ( $smbc eq "") { $smbc = "/usr/local/samba/bin" }; 
X+  if ( $smbc eq "") { $smbc = "/usr/local/bin" }; 
X   print "\n";
X }
X 
X@@ -100,9 +100,9 @@
X if ( $cgiroot eq "" ) { $cgiroot = "/samba" };
X print "\n";
X 
X-print "Where is your mime.types file [/etc] ? ";
X+print "Where is your mime.types file [/usr/local/etc/apache] ? ";
X $mime=<STDIN>; chop $mime;
X-if ( $mime eq "" ) { $mime = "/etc" };
X+if ( $mime eq "" ) { $mime = "/usr/local/etc/apache" };
X $mime= $mime."/mime.types";
X print "\n";
X 
X@@ -124,7 +124,7 @@
X cfgdir        = $dir/etc
X imgroot       = $imgpath
X cgiroot       = $cgiroot
X-linkto_other  = http://samba.anu.edu.au/samba/smb2www/
X+linkto_other  = http://www.samba.org/samba/smb2www/
X background    = cloud.gif
X icon_other    = world.gif
X icon_all      = network.gif
X@@ -209,6 +209,6 @@
X print "\nAdd this to your apache config:\n";
X print "-------------------------------\n\n";
X print "Alias $imgpath $dir/images\n";
X-print "ScriptAlias $cgiroot/ $dir/cgi-bin\n";
X+print "ScriptAlias $cgiroot/ $dir/cgi-bin/\n";
X 
X print "\nThank you for using SMB2WWW.\n\n";
END-of-smb2www/files/patch-Install.pl
echo x - smb2www/Makefile
sed 's/^X//' >smb2www/Makefile << 'END-of-smb2www/Makefile'
X# Ports collection makefile for:  smb2www
X# Date created:			  Mar 25 2001
X# Whom:				  Roman Shterenzon <roman@xpert.com>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	smb2www
XPORTVERSION=	980804
XCATEGORIES=	www
XMASTER_SITES=	http://us1.samba.org/samba/smb2www/ \
X		http://us2.samba.org/samba/smb2www/ \
X		http://us3.samba.org/samba/smb2www/ \
X		http://us4.samba.org/samba/smb2www/ \
X		http://uk.samba.org/samba/smb2www/ \
X		http://sunsite.auc.dk/samba/smb2www/
X
XMAINTAINER=	roman@xpert.com
X
XRUN_DEPENDS=	httpd:${PORTSDIR}/www/apache13 \
X		smbclient:${PORTSDIR}/net/samba \
X		${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/${PERL_ARCH}/MIME/Base64.pm:${PORTSDIR}/converters/p5-MIME-Base64
X
XIS_INTERACTIVE=	yes
XNO_BUILD=	yes
XUSE_PERL5=	yes
XWRKSRC=		${WRKDIR}
X
Xdo-install:
X	@cd ${WRKSRC}; ${PERL} ${WRKSRC}/Install.pl
X
X.include <bsd.port.mk>
END-of-smb2www/Makefile
echo x - smb2www/distinfo
sed 's/^X//' >smb2www/distinfo << 'END-of-smb2www/distinfo'
XMD5 (smb2www-980804.tar.gz) = f779e40bed232135a1ee46adecdea60c
END-of-smb2www/distinfo
echo x - smb2www/pkg-comment
sed 's/^X//' >smb2www/pkg-comment << 'END-of-smb2www/pkg-comment'
XWindows Network client that is accessible through a web browser
END-of-smb2www/pkg-comment
echo x - smb2www/pkg-descr
sed 's/^X//' >smb2www/pkg-descr << 'END-of-smb2www/pkg-descr'
XSMB2WWW, the gateway to Windows networking
X
XSMB2WWW is a Windows Network client that is accessible through a web browser.
XIt is based on the samba package.
X
XWWW: http://www.samba.org/samba/smb2www/
X
XRoman Shterenzon <roman@xpert.com>
END-of-smb2www/pkg-descr
echo x - smb2www/pkg-plist
sed 's/^X//' >smb2www/pkg-plist << 'END-of-smb2www/pkg-plist'
Xwww/smb2www/bin/smbclient
Xwww/smb2www/images/archive.gif
Xwww/smb2www/images/share.gif
Xwww/smb2www/images/search.gif
Xwww/smb2www/images/printer.gif
Xwww/smb2www/images/network.gif
Xwww/smb2www/images/message.gif
Xwww/smb2www/images/help.gif
Xwww/smb2www/images/group.gif
Xwww/smb2www/images/folder.gif
Xwww/smb2www/images/file.gif
Xwww/smb2www/images/computer.gif
Xwww/smb2www/images/cloud.gif
Xwww/smb2www/images/world.gif
Xwww/smb2www/cgi-bin/smbfile.pl
Xwww/smb2www/cgi-bin/smbtar.pl
Xwww/smb2www/cgi-bin/smbhelp.pl
Xwww/smb2www/cgi-bin/smbshr.pl
Xwww/smb2www/cgi-bin/smbdir.pl
Xwww/smb2www/cgi-bin/smbgrp.pl
Xwww/smb2www/cgi-bin/smb2www.pl
Xwww/smb2www/cgi-bin/smbmsg.pl
Xwww/smb2www/cgi-bin/smb2www.pm
Xwww/smb2www/etc/smb2www.conf
Xwww/smb2www/etc/finnish_help.lang
Xwww/smb2www/etc/finnish.lang
Xwww/smb2www/etc/english_help.lang
Xwww/smb2www/etc/english.lang
Xwww/smb2www/etc/dutch_help.lang
Xwww/smb2www/etc/dutch.lang
X@dirrm www/smb2www/images
X@dirrm www/smb2www/cgi-bin
X@dirrm www/smb2www/bin
X@dirrm www/smb2www/etc
X@dirrm www/smb2www
END-of-smb2www/pkg-plist
exit

>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010325191629.A16948>