ports/62680: [NEW PORT] print/cups-samba

John Merryweather Cooper coop9211 at uidaho.edu
Wed Feb 11 08:10:15 UTC 2004


>Number:         62680
>Category:       ports
>Synopsis:       [NEW PORT] print/cups-samba
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Wed Feb 11 00:10:15 PST 2004
>Closed-Date:
>Last-Modified:
>Originator:     John Merryweather Cooper
>Release:        FreeBSD 4.9-STABLE i386
>Organization:
>Environment:
System: FreeBSD borgdemon.losaca.adelphia.net 4.9-STABLE FreeBSD 4.9-STABLE #11: Sun Feb 8 00:49:01 PST 2004 root at borgdemon.losaca.adelphia.net:/usr/obj/usr/src/sys/K6-2 i386


>Description:
	print/cups-samba supplies client-side drives for a CUPS/SAMBA
	FreeBSD server with Windows NT/XP/2000/2003 clients.  It allows
	the use of one client side driver for a multitude of server
	printers provided a properly defined PPD file exists.

>How-To-Repeat:
	N/A
>Fix:

--- new-port-cups-samba begins here ---
# 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:
#
#	cups-samba
#	cups-samba/Makefile
#	cups-samba/pkg-descr
#	cups-samba/pkg-message
#	cups-samba/pkg-plist
#	cups-samba/distinfo
#	cups-samba/files
#	cups-samba/files/patch-cups-samba.install
#	cups-samba/files/patch-cups-samba.remove
#
echo c - cups-samba
mkdir -p cups-samba > /dev/null 2>&1
echo x - cups-samba/Makefile
sed 's/^X//' >cups-samba/Makefile << 'END-of-cups-samba/Makefile'
X# ex:ts=8	-*-mode: makefile-*-
X#
X# New ports collection makefile for:	cups-samba
X# Date created:		2004-02-10
X# Whom:			John Merryweather Cooper <coop9211 at uidaho.edu>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	cups-samba
XPORTVERSION=	5.0.rc3
XCATEGORIES=	print net
XMASTER_SITES=	ftp://ftp.easysw.com/pub/cups/windows/ \
X		ftp://ftp2.easysw.com/pub/cups/windows/ \
X		ftp://ftp3.easysw.com/pub/cups/windows/
XDISTNAME=	${PORTNAME}-5.0rc3
X
XMAINTAINER=	coop9211 at uidaho.edu
XCOMMENT=	The Common UNIX Printing System:  MS Windows client drivers
X
XBUILD_DEPENDS=	bash:${PORTSDIR}/shells/bash2 \
X		tardy:${PORTSDIR}/archivers/tardy \
X		${LOCALBASE}/sbin/cupsd:${PORTSDIR}/print/cups-base \
X		smbspool:${PORTSDIR}/net/samba
X
XRUN_DEPENDS=	smbspool:${PORTSDIR}/net/samba \
X		${LOCALBASE}/sbin/cupsd:${PORTSDIR}/print/cups-base \
X		${LOCALBASE}/sbin/cupsaddsmb:${PORTSDIR}/print/cups-lpr \
X		espgs:${PORTSDIR}/print/cups-pstoraster
X
XUSE_REINPLACE=	yes
XNO_BUILD=	yes
XNO_WRKSUBDIR=	yes
XSH=		${LOCALBASE}/bin/bash
X
Xpost-patch:
X	@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' \
X		-e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
X		-e 's|%%TARDY%%|${LOCALBASE}/bin/tardy|g' \
X		${WRKSRC}/cups-samba.install \
X		${WRKSRC}/cups-samba.remove
X
Xdo-install:
X	cd ${WRKSRC} && ${SH} ${WRKSRC}/cups-samba.install now
X
Xpost-install:
X	@${CAT} ${PKGMESSAGE} | ${SED} 's|%%PREFIX%%|${PREFIX}|g'
X
X.include <bsd.port.mk>
END-of-cups-samba/Makefile
echo x - cups-samba/pkg-descr
sed 's/^X//' >cups-samba/pkg-descr << 'END-of-cups-samba/pkg-descr'
XCUPS-SAMBA provides a means to export CUPS printers from a FreeBSD
Xserver to Windows NT/XP/2000/2003 clients with a single Windows
Xdriver that customizes the printer based on the PPD file for the
Xprinter.
X
XWWW: http://www.easysw.com/
X
X--
XJohn Merryweather Cooper <coop9211 at uidaho.edu>
END-of-cups-samba/pkg-descr
echo x - cups-samba/pkg-message
sed 's/^X//' >cups-samba/pkg-message << 'END-of-cups-samba/pkg-message'
X**********************************************************************
X**********************************************************************
XMANUAL INSTALL INSTRUCTIONS:
X==============================
X
XTo complete the installation of print/cups-samba, do in order:
X
XCUPS-BASE
X-----------
X
X1) Uncomment application/octet-stream line in mime.types
X2) Uncomment application/octet-stream line in mime.convs
X3) Restart cupsd
X
XSAMBA
X-------
X
X1) edit the [global] section of smb.conf and make sure it has these
X   lines:
X
X[global]
X	load printer = yes
X	printing = cups
X	printcap name = cups
X
X2) edit the [printers] section of smb.conf and make sure it has these
X   lines:
X
X[printers]
X	comment = All Printers
X	path = /var/spool/samba
X	printer admin = root
X	guest ok = yes
X	printable = yes
X	browseable = no
X	public = yes
X	writable = no
X
X3) edit the [print$] section of smb.conf and make sure it has these
X   lines:
X
X[print$]
X	comment = Printer Drivers
X	path = %%PREFIX%%/share/cups/drivers
X	browseable = yes
X	guest ok = no
X	read only = yes
X	write list = root
X
X4) restart Samba
X
X____________
XNOTE:  Samba needs to know about the passwords for printer admin and
Xwrite list or authentication will fail.
X
X
XCUPS-LPR
X----------
X
X1) Run cupsaddsmb
X
XIf only a subset of your printers will be installed as exportable to
XMS Windows NT/XP/2000/2003 clients:
X
X#cupsaddsmb -U root cups_printer_1 cups_printer_2 ...
X
XTo export all printers to MS Windows NT/XP/2000/2003 clients:
X
X#cupsaddsmb -U root -a
X
XIn either case, you will be prompted for the root password.
X
XWINDOWS
X---------
X
X1) Browse and install for a network printer as usual.  The drivers
Xwill be automagically installed.
X
X____________
XNOTE:  Other settings in smb.conf may work, but your REALLY need to
Xknow what your are doing.  :)
X
X**********************************************************************
X**********************************************************************
END-of-cups-samba/pkg-message
echo x - cups-samba/pkg-plist
sed 's/^X//' >cups-samba/pkg-plist << 'END-of-cups-samba/pkg-plist'
Xetc/software/cups-samba.remove
Xshare/cups/drivers/cups5.hlp
Xshare/cups/drivers/cupsdrv5.dll
Xshare/cups/drivers/cupsui5.dll
X at dirrm share/nls/en_US.US-ASCII
X at dirrm share/nls/POSIX
X at dirrm share/cups/drivers
X at dirrm share/cups
X at dirrm etc/software
END-of-cups-samba/pkg-plist
echo x - cups-samba/distinfo
sed 's/^X//' >cups-samba/distinfo << 'END-of-cups-samba/distinfo'
XMD5 (cups-samba-5.0rc3.tar.gz) = 2ac3f000a2e3298a2d86360978556c17
XSIZE (cups-samba-5.0rc3.tar.gz) = 199167
END-of-cups-samba/distinfo
echo c - cups-samba/files
mkdir -p cups-samba/files > /dev/null 2>&1
echo x - cups-samba/files/patch-cups-samba.install
sed 's/^X//' >cups-samba/files/patch-cups-samba.install << 'END-of-cups-samba/files/patch-cups-samba.install'
X--- cups-samba.install.old	Tue Feb 10 14:52:51 2004
X+++ cups-samba.install	Tue Feb 10 16:56:05 2004
X@@ -1,4 +1,4 @@
X-#!/bin/sh
X+#!%%LOCALBASE%%/bin/bash
X # Installation script for CUPS - SAMBA Drivers for Windows NT/2k/XP/2k3 version 5.0rc3.
X # Produced using ESP Package Manager v3.7.0; report problems to epm at easysw.com.
X #%product CUPS - SAMBA Drivers for Windows NT/2k/XP/2k3
X@@ -8,8 +8,8 @@
X #%rootsize 0
X #%usrsize 503
X #
X-PATH=/usr/xpg4/bin:/bin:/usr/bin:/usr/ucb:${PATH}
X-SHELL=/bin/sh
X+PATH=/bin:/usr/bin:${PATH}
X+SHELL=%%LOCALBASE%%/bin/bash
X case "`uname`" in
X 	Darwin*)
X 	case "`id -un`" in
X@@ -91,9 +91,9 @@
X 		esac
X 	done
X fi
X-if test -x /etc/software/cups-samba.remove; then
X+if test -x %%LOCALBASE%%/etc/software/cups-samba.remove; then
X 	echo Removing old versions of cups-samba software...
X-	/etc/software/cups-samba.remove now
X+	%%LOCALBASE%%/etc/software/cups-samba.remove now
X fi
X case `uname` in
X 	AIX)
X@@ -134,7 +134,7 @@
X 
X 	*)
X 	dfroot=`df -k / | tr '\n' ' '`
X-	dfusr=`df -k /usr | tr '\n' ' '`
X+	dfusr=`df -k %%PREFIX%% | tr '\n' ' '`
X 	fsroot=`echo $dfroot | awk '{print $13}'`
X 	sproot=`echo $dfroot | awk '{print $11}'`
X 	fsusr=`echo $dfusr | awk '{print $13}'`
X@@ -167,44 +167,45 @@
X 
X 		if test $spss -gt $spusr; then
X 			echo Not enough free disk space for software:
X-			echo You need $spss kbytes in /usr but only have $spusr kbytes available.
X+			echo You need $spss kbytes in %%PREFIX%% but only have $spusr kbytes available.
X 			exit 1
X 		fi
X 	fi
X fi
X-if test -w /usr ; then
X+if test -w %%LOCALBASE%% ; then
X 	echo Backing up old versions of shared files to be installed...
X-	for file in /usr/share/cups/drivers/cups5.hlp /usr/share/cups/drivers/cupsdrv5.dll /usr/share/cups/drivers/cupsui5.dll; do
X+	for file in %%LOCALBASE%%/share/cups/drivers/cups5.hlp %%LOCALBASE%%/share/cups/drivers/cupsdrv5.dll %%LOCALBASE%%/share/cups/drivers/cupsui5.dll; do
X 		if test -d "$file" -o -f "$file" -o -h "$file"; then
X 			mv -f "$file" "$file.O"
X 		fi
X 	done
X fi
X echo Installing software...
X-if echo Write Test >/usr/.writetest 2>/dev/null; then
X-	$ac_tar cups-samba.ss
X+if echo Write Test >%%PREFIX%%/.writetest 2>/dev/null; then
X+	%%TARDY%% -Remove_Prefix /usr/share/cups/drivers -Prefix %%PREFIX%%/share/cups/drivers cups-samba.ss cups-samba.tar
X+	$ac_tar cups-samba.tar
X fi
X-if test -d /etc/software; then
X-	rm -f /etc/software/cups-samba.remove
X+if test -d %%LOCALBASE%%/etc/software; then
X+	rm -f %%LOCALBASE%%/etc/software/cups-samba.remove
X else
X-	mkdir -p /etc/software
X+	mkdir -p %%PREFIX%%/etc/software
X fi
X-cp cups-samba.remove /etc/software
X-chmod 544 /etc/software/cups-samba.remove
X+cp cups-samba.remove %%PREFIX%%/etc/software
X+chmod 544 %%PREFIX%%/etc/software/cups-samba.remove
X echo Updating file permissions...
X-if test -f /usr/.writetest; then
X-	rm -f /usr/.writetest
X+if test -f %%PREFIX%%/.writetest; then
X+	rm -f %%PREFIX%%/.writetest
X fi
X echo Running post-install commands...
X # Look for smbspool program in the path and various standard directories...
X smbpath=`echo $PATH | tr ':' ' '`
X-smbpath="$smbpath /bin /usr/bin /usr/samba/bin /usr/local/samba/bin"
X+smbpath="$smbpath /bin /usr/bin /usr/samba/bin %%LOCALBASE%%/samba/bin"
X smbpath="$smbpath /usr/freeware/samba/bin /opt/samba/bin"
X smbpath="$smbpath /h/COTS/CIFS/bin/Samba/bin"
X 
X serverbin="$CUPS_SERVERBIN"
X 
X-for dir in /usr/libexec/cups /usr/lib/cups /usr/local/libexec/cups /usr/local/lib/cups; do
X+for dir in /usr/libexec/cups /usr/lib/cups %%LOCALBASE%%/libexec/cups %%LOCALBASE%%/lib/cups; do
X 	if test -d $dir; then
X 		serverbin="$dir"
X 	fi
END-of-cups-samba/files/patch-cups-samba.install
echo x - cups-samba/files/patch-cups-samba.remove
sed 's/^X//' >cups-samba/files/patch-cups-samba.remove << 'END-of-cups-samba/files/patch-cups-samba.remove'
X--- cups-samba.remove.old	Tue Feb 10 17:30:45 2004
X+++ cups-samba.remove	Tue Feb 10 17:45:55 2004
X@@ -1,4 +1,4 @@
X-#!/bin/sh
X+#!%%LOCALBASE%%/bin/bash
X # Removal script for CUPS - SAMBA Drivers for Windows NT/2k/XP/2k3 version 5.0rc3.
X # Produced using ESP Package Manager v3.7.0; report problems to epm at easysw.com.
X #%product CUPS - SAMBA Drivers for Windows NT/2k/XP/2k3
X@@ -8,8 +8,8 @@
X #%rootsize 0
X #%usrsize 503
X #
X-PATH=/usr/xpg4/bin:/bin:/usr/bin:/usr/ucb:${PATH}
X-SHELL=/bin/sh
X+PATH=/bin:/usr/bin:${PATH}
X+SHELL=%%LOCALBASE%%/bin/bash
X case "`uname`" in
X 	Darwin*)
X 	case "`id -un`" in
X@@ -73,8 +73,8 @@
X 	done
X fi
X echo Removing/restoring installed files...
X-if test -w /usr ; then
X-	for file in /usr/share/cups/drivers/cups5.hlp /usr/share/cups/drivers/cupsdrv5.dll /usr/share/cups/drivers/cupsui5.dll; do
X+if test -w %%PREFIX%% ; then
X+	for file in %%PREFIX%%/share/cups/drivers/cups5.hlp %%PREFIX%%/share/cups/drivers/cupsdrv5.dll %%PREFIX%%/share/cups/drivers/cupsui5.dll; do
X 		rm -f "$file"
X 		if test -d "$file.O" -o -f "$file.O" -o -h "$file.O"; then
X 			mv -f "$file.O" "$file"
X@@ -82,5 +82,5 @@
X 	done
X fi
X echo Checking configuration files...
X-rm -f /etc/software/cups-samba.remove
X+rm -f %%PREFIX%%/etc/software/cups-samba.remove
X echo Removal is complete.
END-of-cups-samba/files/patch-cups-samba.remove
exit
--- new-port-cups-samba ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list