aboutsummaryrefslogtreecommitdiffstats
path: root/print
diff options
context:
space:
mode:
authorpav <pav@FreeBSD.org>2004-06-27 21:37:49 +0800
committerpav <pav@FreeBSD.org>2004-06-27 21:37:49 +0800
commit84c7a7a9a5544bb4cae931b4d088bce2d453e3d4 (patch)
treebb201d877db55ab69146523947876c0f3960a493 /print
parentda004149c190caf9cec7137e7482d85d0a6c28ac (diff)
downloadfreebsd-ports-gnome-84c7a7a9a5544bb4cae931b4d088bce2d453e3d4.tar.gz
freebsd-ports-gnome-84c7a7a9a5544bb4cae931b4d088bce2d453e3d4.tar.zst
freebsd-ports-gnome-84c7a7a9a5544bb4cae931b4d088bce2d453e3d4.zip
Add cups-samba, a client-side drivers for CUPS/Samba FreeBSD server
with Windows clients. PR: ports/62680 Submitted by: John Merryweather Cooper <coop9211@uidaho.edu>
Diffstat (limited to 'print')
-rw-r--r--print/Makefile1
-rw-r--r--print/cups-samba/Makefile48
-rw-r--r--print/cups-samba/distinfo2
-rw-r--r--print/cups-samba/files/patch-cups-samba.install100
-rw-r--r--print/cups-samba/files/patch-cups-samba.remove37
-rw-r--r--print/cups-samba/pkg-descr9
-rw-r--r--print/cups-samba/pkg-message84
-rw-r--r--print/cups-samba/pkg-plist7
8 files changed, 288 insertions, 0 deletions
diff --git a/print/Makefile b/print/Makefile
index 16d3eeaf634c..0a3e0d2873ba 100644
--- a/print/Makefile
+++ b/print/Makefile
@@ -45,6 +45,7 @@
SUBDIR += cups-lpr
SUBDIR += cups-pdf
SUBDIR += cups-pstoraster
+ SUBDIR += cups-samba
SUBDIR += detex
SUBDIR += dvi2tty
SUBDIR += dvi2xx
diff --git a/print/cups-samba/Makefile b/print/cups-samba/Makefile
new file mode 100644
index 000000000000..305e7d471a6a
--- /dev/null
+++ b/print/cups-samba/Makefile
@@ -0,0 +1,48 @@
+# ex:ts=8 -*-mode: makefile-*-
+#
+# New ports collection makefile for: cups-samba
+# Date created: 2004-02-10
+# Whom: John Merryweather Cooper <coop9211@uidaho.edu>
+#
+# $FreeBSD$
+#
+
+PORTNAME= cups-samba
+PORTVERSION= 5.0.r3
+CATEGORIES= print net
+MASTER_SITES= ftp://ftp.easysw.com/pub/cups/windows/ \
+ ftp://ftp2.easysw.com/pub/cups/windows/ \
+ ftp://ftp3.easysw.com/pub/cups/windows/
+DISTNAME= ${PORTNAME}-5.0rc3
+
+MAINTAINER= coop9211@uidaho.edu
+COMMENT= The Common UNIX Printing System: MS Windows client drivers
+
+BUILD_DEPENDS= bash:${PORTSDIR}/shells/bash2 \
+ tardy:${PORTSDIR}/archivers/tardy \
+ ${LOCALBASE}/sbin/cupsd:${PORTSDIR}/print/cups-base \
+ smbspool:${PORTSDIR}/net/samba
+RUN_DEPENDS= smbspool:${PORTSDIR}/net/samba \
+ ${LOCALBASE}/sbin/cupsd:${PORTSDIR}/print/cups-base \
+ ${LOCALBASE}/sbin/cupsaddsmb:${PORTSDIR}/print/cups-lpr \
+ espgs:${PORTSDIR}/print/cups-pstoraster
+
+USE_REINPLACE= yes
+NO_BUILD= yes
+NO_WRKSUBDIR= yes
+SH= ${LOCALBASE}/bin/bash
+
+post-patch:
+ @${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' \
+ -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
+ -e 's|%%TARDY%%|${LOCALBASE}/bin/tardy|g' \
+ ${WRKSRC}/cups-samba.install \
+ ${WRKSRC}/cups-samba.remove
+
+do-install:
+ cd ${WRKSRC} && ${SH} ${WRKSRC}/cups-samba.install now
+
+post-install:
+ @${CAT} ${PKGMESSAGE} | ${SED} 's|%%PREFIX%%|${PREFIX}|g'
+
+.include <bsd.port.mk>
diff --git a/print/cups-samba/distinfo b/print/cups-samba/distinfo
new file mode 100644
index 000000000000..bd7853d3f9b4
--- /dev/null
+++ b/print/cups-samba/distinfo
@@ -0,0 +1,2 @@
+MD5 (cups-samba-5.0rc3.tar.gz) = 2ac3f000a2e3298a2d86360978556c17
+SIZE (cups-samba-5.0rc3.tar.gz) = 199167
diff --git a/print/cups-samba/files/patch-cups-samba.install b/print/cups-samba/files/patch-cups-samba.install
new file mode 100644
index 000000000000..ee127de7663f
--- /dev/null
+++ b/print/cups-samba/files/patch-cups-samba.install
@@ -0,0 +1,100 @@
+--- cups-samba.install.old Tue Feb 10 14:52:51 2004
++++ cups-samba.install Tue Feb 10 16:56:05 2004
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!%%LOCALBASE%%/bin/bash
+ # Installation script for CUPS - SAMBA Drivers for Windows NT/2k/XP/2k3 version 5.0rc3.
+ # Produced using ESP Package Manager v3.7.0; report problems to epm@easysw.com.
+ #%product CUPS - SAMBA Drivers for Windows NT/2k/XP/2k3
+@@ -8,8 +8,8 @@
+ #%rootsize 0
+ #%usrsize 503
+ #
+-PATH=/usr/xpg4/bin:/bin:/usr/bin:/usr/ucb:${PATH}
+-SHELL=/bin/sh
++PATH=/bin:/usr/bin:${PATH}
++SHELL=%%LOCALBASE%%/bin/bash
+ case "`uname`" in
+ Darwin*)
+ case "`id -un`" in
+@@ -91,9 +91,9 @@
+ esac
+ done
+ fi
+-if test -x /etc/software/cups-samba.remove; then
++if test -x %%LOCALBASE%%/etc/software/cups-samba.remove; then
+ echo Removing old versions of cups-samba software...
+- /etc/software/cups-samba.remove now
++ %%LOCALBASE%%/etc/software/cups-samba.remove now
+ fi
+ case `uname` in
+ AIX)
+@@ -134,7 +134,7 @@
+
+ *)
+ dfroot=`df -k / | tr '\n' ' '`
+- dfusr=`df -k /usr | tr '\n' ' '`
++ dfusr=`df -k %%PREFIX%% | tr '\n' ' '`
+ fsroot=`echo $dfroot | awk '{print $13}'`
+ sproot=`echo $dfroot | awk '{print $11}'`
+ fsusr=`echo $dfusr | awk '{print $13}'`
+@@ -167,44 +167,45 @@
+
+ if test $spss -gt $spusr; then
+ echo Not enough free disk space for software:
+- echo You need $spss kbytes in /usr but only have $spusr kbytes available.
++ echo You need $spss kbytes in %%PREFIX%% but only have $spusr kbytes available.
+ exit 1
+ fi
+ fi
+ fi
+-if test -w /usr ; then
++if test -w %%LOCALBASE%% ; then
+ echo Backing up old versions of shared files to be installed...
+- for file in /usr/share/cups/drivers/cups5.hlp /usr/share/cups/drivers/cupsdrv5.dll /usr/share/cups/drivers/cupsui5.dll; do
++ for file in %%LOCALBASE%%/share/cups/drivers/cups5.hlp %%LOCALBASE%%/share/cups/drivers/cupsdrv5.dll %%LOCALBASE%%/share/cups/drivers/cupsui5.dll; do
+ if test -d "$file" -o -f "$file" -o -h "$file"; then
+ mv -f "$file" "$file.O"
+ fi
+ done
+ fi
+ echo Installing software...
+-if echo Write Test >/usr/.writetest 2>/dev/null; then
+- $ac_tar cups-samba.ss
++if echo Write Test >%%PREFIX%%/.writetest 2>/dev/null; then
++ %%TARDY%% -Remove_Prefix /usr/share/cups/drivers -Prefix %%PREFIX%%/share/cups/drivers cups-samba.ss cups-samba.tar
++ $ac_tar cups-samba.tar
+ fi
+-if test -d /etc/software; then
+- rm -f /etc/software/cups-samba.remove
++if test -d %%LOCALBASE%%/etc/software; then
++ rm -f %%LOCALBASE%%/etc/software/cups-samba.remove
+ else
+- mkdir -p /etc/software
++ mkdir -p %%PREFIX%%/etc/software
+ fi
+-cp cups-samba.remove /etc/software
+-chmod 544 /etc/software/cups-samba.remove
++cp cups-samba.remove %%PREFIX%%/etc/software
++chmod 544 %%PREFIX%%/etc/software/cups-samba.remove
+ echo Updating file permissions...
+-if test -f /usr/.writetest; then
+- rm -f /usr/.writetest
++if test -f %%PREFIX%%/.writetest; then
++ rm -f %%PREFIX%%/.writetest
+ fi
+ echo Running post-install commands...
+ # Look for smbspool program in the path and various standard directories...
+ smbpath=`echo $PATH | tr ':' ' '`
+-smbpath="$smbpath /bin /usr/bin /usr/samba/bin /usr/local/samba/bin"
++smbpath="$smbpath /bin /usr/bin /usr/samba/bin %%LOCALBASE%%/samba/bin"
+ smbpath="$smbpath /usr/freeware/samba/bin /opt/samba/bin"
+ smbpath="$smbpath /h/COTS/CIFS/bin/Samba/bin"
+
+ serverbin="$CUPS_SERVERBIN"
+
+-for dir in /usr/libexec/cups /usr/lib/cups /usr/local/libexec/cups /usr/local/lib/cups; do
++for dir in /usr/libexec/cups /usr/lib/cups %%LOCALBASE%%/libexec/cups %%LOCALBASE%%/lib/cups; do
+ if test -d $dir; then
+ serverbin="$dir"
+ fi
diff --git a/print/cups-samba/files/patch-cups-samba.remove b/print/cups-samba/files/patch-cups-samba.remove
new file mode 100644
index 000000000000..494b8964c416
--- /dev/null
+++ b/print/cups-samba/files/patch-cups-samba.remove
@@ -0,0 +1,37 @@
+--- cups-samba.remove.old Tue Feb 10 17:30:45 2004
++++ cups-samba.remove Tue Feb 10 17:45:55 2004
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!%%LOCALBASE%%/bin/bash
+ # Removal script for CUPS - SAMBA Drivers for Windows NT/2k/XP/2k3 version 5.0rc3.
+ # Produced using ESP Package Manager v3.7.0; report problems to epm@easysw.com.
+ #%product CUPS - SAMBA Drivers for Windows NT/2k/XP/2k3
+@@ -8,8 +8,8 @@
+ #%rootsize 0
+ #%usrsize 503
+ #
+-PATH=/usr/xpg4/bin:/bin:/usr/bin:/usr/ucb:${PATH}
+-SHELL=/bin/sh
++PATH=/bin:/usr/bin:${PATH}
++SHELL=%%LOCALBASE%%/bin/bash
+ case "`uname`" in
+ Darwin*)
+ case "`id -un`" in
+@@ -73,8 +73,8 @@
+ done
+ fi
+ echo Removing/restoring installed files...
+-if test -w /usr ; then
+- for file in /usr/share/cups/drivers/cups5.hlp /usr/share/cups/drivers/cupsdrv5.dll /usr/share/cups/drivers/cupsui5.dll; do
++if test -w %%PREFIX%% ; then
++ for file in %%PREFIX%%/share/cups/drivers/cups5.hlp %%PREFIX%%/share/cups/drivers/cupsdrv5.dll %%PREFIX%%/share/cups/drivers/cupsui5.dll; do
+ rm -f "$file"
+ if test -d "$file.O" -o -f "$file.O" -o -h "$file.O"; then
+ mv -f "$file.O" "$file"
+@@ -82,5 +82,5 @@
+ done
+ fi
+ echo Checking configuration files...
+-rm -f /etc/software/cups-samba.remove
++rm -f %%PREFIX%%/etc/software/cups-samba.remove
+ echo Removal is complete.
diff --git a/print/cups-samba/pkg-descr b/print/cups-samba/pkg-descr
new file mode 100644
index 000000000000..d2dc5eb10294
--- /dev/null
+++ b/print/cups-samba/pkg-descr
@@ -0,0 +1,9 @@
+CUPS-SAMBA provides a means to export CUPS printers from a FreeBSD
+server to Windows NT/XP/2000/2003 clients with a single Windows
+driver that customizes the printer based on the PPD file for the
+printer.
+
+WWW: http://www.easysw.com/
+
+--
+John Merryweather Cooper <coop9211@uidaho.edu>
diff --git a/print/cups-samba/pkg-message b/print/cups-samba/pkg-message
new file mode 100644
index 000000000000..83625eecf094
--- /dev/null
+++ b/print/cups-samba/pkg-message
@@ -0,0 +1,84 @@
+**********************************************************************
+**********************************************************************
+MANUAL INSTALL INSTRUCTIONS:
+==============================
+
+To complete the installation of print/cups-samba, do in order:
+
+CUPS-BASE
+-----------
+
+1) Uncomment application/octet-stream line in mime.types
+2) Uncomment application/octet-stream line in mime.convs
+3) Restart cupsd
+
+SAMBA
+-------
+
+1) edit the [global] section of smb.conf and make sure it has these
+ lines:
+
+[global]
+ load printer = yes
+ printing = cups
+ printcap name = cups
+
+2) edit the [printers] section of smb.conf and make sure it has these
+ lines:
+
+[printers]
+ comment = All Printers
+ path = /var/spool/samba
+ printer admin = root
+ guest ok = yes
+ printable = yes
+ browseable = no
+ public = yes
+ writable = no
+
+3) edit the [print$] section of smb.conf and make sure it has these
+ lines:
+
+[print$]
+ comment = Printer Drivers
+ path = %%PREFIX%%/share/cups/drivers
+ browseable = yes
+ guest ok = no
+ read only = yes
+ write list = root
+
+4) restart Samba
+
+____________
+NOTE: Samba needs to know about the passwords for printer admin and
+write list or authentication will fail.
+
+
+CUPS-LPR
+----------
+
+1) Run cupsaddsmb
+
+If only a subset of your printers will be installed as exportable to
+MS Windows NT/XP/2000/2003 clients:
+
+#cupsaddsmb -U root cups_printer_1 cups_printer_2 ...
+
+To export all printers to MS Windows NT/XP/2000/2003 clients:
+
+#cupsaddsmb -U root -a
+
+In either case, you will be prompted for the root password.
+
+WINDOWS
+---------
+
+1) Browse and install for a network printer as usual. The drivers
+will be automagically installed.
+
+____________
+NOTE: Other settings in smb.conf may work, but your REALLY need to
+know what your are doing. :)
+
+**********************************************************************
+**********************************************************************
diff --git a/print/cups-samba/pkg-plist b/print/cups-samba/pkg-plist
new file mode 100644
index 000000000000..14bc43268bb5
--- /dev/null
+++ b/print/cups-samba/pkg-plist
@@ -0,0 +1,7 @@
+etc/software/cups-samba.remove
+libexec/cups/backend/smb
+share/cups/drivers/cups5.hlp
+share/cups/drivers/cupsdrv5.dll
+share/cups/drivers/cupsui5.dll
+@dirrm share/cups/drivers
+@dirrm etc/software