Subject: Re: Netatalk installing CUPS -- why?
To: Hauke Fath <hauke@Espresso.Rhein-Neckar.DE>
From: Greg A. Woods <woods@weird.com>
List: tech-pkg
Date: 01/28/2005 18:26:45
[ On Friday, January 28, 2005 at 20:01:28 (+0100), Hauke Fath wrote: ]
> Subject: Netatalk installing CUPS -- why?
>
> I've disabled CUPS support in the Makefile, and Netatalk continues to print
> as before.

Yeah, of course it'll print without CUPS!  :-)

> And I've gotten rid of CUPS.

Good move!  I've kept well away from it right from the start (though I
have always had the apparent "luxury" of having a real PostScript
printer).


For those who really do want it to integrate with CUPS though, this
patch does that and more using the new PKG_OPTIONS stuff:

(I should probably send-pr this but I hadn't got around to it yet, so
perhaps someone will take it from here?  :-))

cvs diff: Diffing net/netatalk
Index: net/netatalk/Makefile
===================================================================
RCS file: /cvs/master/m-NetBSD/main/pkgsrc/net/netatalk/Makefile,v
retrieving revision 1.32
diff -u -r1.32 Makefile
--- net/netatalk/Makefile	2 Nov 2004 11:26:28 -0000	1.32
+++ net/netatalk/Makefile	11 Jan 2005 20:44:35 -0000
@@ -28,6 +28,10 @@
 CONFLICTS=	netatalk-asun-[0-9]* netatalk-umich-[0-9]*
 
 RCD_SCRIPTS=	atalkd afpd papd timelord
+RCD_SCRIPT_SRC.atalkd=		# empty
+RCD_SCRIPT_SRC.afpd=		# empty
+RCD_SCRIPT_SRC.papd=		# empty
+RCD_SCRIPT_SRC.timelord=	# empty
 
 .include "../../mk/bsd.prefs.mk"
 
@@ -41,8 +45,29 @@
 			--localstatedir=${VARBASE}/netatalk \
 			--with-uams-path=${PREFIX}/libexec/netatalk/uams \
 			--with-bdb=${BUILDLINK_PREFIX.db4} \
-			--with-gssapi --enable-krbV-uam
-CONFIGURE_ENV+=	GSSAPI_LIBS="-lkrb5 -lroken -lasn1 -lcrypto -lcom_err"
+
+PKG_OPTIONS_VAR=        PKG_OPTIONS.netatalk
+PKG_SUPPORTED_OPTIONS=  kerberos cups
+
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Mkerberos)
+.  include "../../mk/krb5.buildlink3.mk"
+CONFIGURE_ARGS+=	--with-gssapi --enable-krbV-uam
+CONFIGURE_ENV+= 	GSSAPI_LIBS="-lkrb5 -lroken -lasn1 -lcrypto -lcom_err"
+PLIST_SUBST+=		GSSAPI=""
+.else
+CONFIGURE_ARGS+=	--disable-krb4-uam --disable-krbV-uam --without-gssapi
+PLIST_SUBST+=		GSSAPI="@comment "
+.endif
+
+.if !empty(PKG_OPTIONS:Mcups)
+.  include "../../print/cups/buildlink3.mk"
+CONFIGURE_ARGS+=	--enable-cups
+.else
+CONFIGURE_ARGS+=	--disable-cups
+.endif
+
 LIBS+=-ldes
 
 post-patch:
@@ -55,8 +80,6 @@
 
 .include "../../databases/db4/buildlink3.mk"
 .include "../../net/openslp/buildlink3.mk"
-.include "../../print/cups/buildlink3.mk"
 .include "../../security/tcp_wrappers/buildlink3.mk"
-.include "../../mk/krb5.buildlink3.mk"
 
 .include "../../mk/bsd.pkg.mk"
Index: net/netatalk/PLIST
===================================================================
RCS file: /cvs/master/m-NetBSD/main/pkgsrc/net/netatalk/PLIST,v
retrieving revision 1.8
diff -u -r1.8 PLIST
--- net/netatalk/PLIST	2 Nov 2004 11:26:28 -0000	1.8
+++ net/netatalk/PLIST	11 Jan 2005 20:43:29 -0000
@@ -105,7 +105,7 @@
 libexec/netatalk/uams/uams_clrtxt.so
 libexec/netatalk/uams/uams_dhx.so
 libexec/netatalk/uams/uams_dhx_passwd.la
-libexec/netatalk/uams/uams_gss.la
+${GSSAPI}libexec/netatalk/uams/uams_gss.la
 libexec/netatalk/uams/uams_guest.la
 libexec/netatalk/uams/uams_passwd.la
 libexec/netatalk/uams/uams_randnum.la
Index: net/netatalk/distinfo
===================================================================
RCS file: /cvs/master/m-NetBSD/main/pkgsrc/net/netatalk/distinfo,v
retrieving revision 1.14
diff -u -r1.14 distinfo
--- net/netatalk/distinfo	7 Nov 2004 12:21:27 -0000	1.14
+++ net/netatalk/distinfo	11 Jan 2005 18:42:09 -0000
@@ -3,7 +3,7 @@
 SHA1 (netatalk-2.0.1.tar.bz2) = b61fd7595b8d03971fbd6c0dce0ed307e8916628
 Size (netatalk-2.0.1.tar.bz2) = 1465827 bytes
 SHA1 (patch-aa) = 038971eea8da4fbab0596b87aa0c2f8d01493a15
-SHA1 (patch-ab) = 057a8a4ef188068237550199e2c87db0c0cc5dfd
+SHA1 (patch-ab) = 6ee4b833e992be665231d6568cf6c7edc384d48e
 SHA1 (patch-ac) = 18d3bff990ddb78146d1e1d2f9e07d6826a7bfd2
 SHA1 (patch-ad) = 311d00d165688d4baa1365ba6c4147bd6293f3d8
 SHA1 (patch-af) = 997909d7cf444a2481693069864da9134ce413d4
cvs diff: Diffing net/netatalk/patches
Index: net/netatalk/patches/patch-ab
===================================================================
RCS file: /cvs/master/m-NetBSD/main/pkgsrc/net/netatalk/patches/Attic/patch-ab,v
retrieving revision 1.8
diff -u -r1.8 patch-ab
--- net/netatalk/patches/patch-ab	2 Nov 2004 11:26:28 -0000	1.8
+++ net/netatalk/patches/patch-ab	11 Jan 2005 18:41:27 -0000
@@ -7,7 +7,7 @@
  # checking for NetBSD init scripts
  #
 -@USE_NETBSD_TRUE@sysvdir = /etc/rc.d
-+@USE_NETBSD_TRUE@sysvdir = ${prefix}/etc/rc.d# pkgsrc *only*!
++@USE_NETBSD_TRUE@sysvdir = ${prefix}/share/examples/rc.d#	pkgsrc *only*!
  
  
  #

-- 
						Greg A. Woods

H:+1 416 218-0098  W:+1 416 489-5852 x122  VE3TCP  RoboHack <woods@robohack.ca>
Planix, Inc. <woods@planix.com>          Secrets of the Weird <woods@weird.com>