From dan@xeon.unixathome.org  Wed Jan 25 04:20:33 2006
Return-Path: <dan@xeon.unixathome.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 180F416A41F
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 25 Jan 2006 04:20:33 +0000 (GMT)
	(envelope-from dan@xeon.unixathome.org)
Received: from m21.unixathome.org (m21.unixathome.org [205.150.199.217])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 825FF43D46
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 25 Jan 2006 04:20:32 +0000 (GMT)
	(envelope-from dan@xeon.unixathome.org)
Received: from localhost (localhost [205.150.199.217])
	by m21.unixathome.org (Postfix) with ESMTP id 9E37AC376;
	Tue, 24 Jan 2006 23:20:31 -0500 (EST)
Received: from m21.unixathome.org ([205.150.199.217])
	by localhost (m21.unixathome.org [205.150.199.217]) (amavisd-new, port 10024)
	with ESMTP id 09990-08; Tue, 24 Jan 2006 23:20:29 -0500 (EST)
Received: from bast.unixathome.org (bast.unixathome.org [70.26.229.230])
	by m21.unixathome.org (Postfix) with ESMTP id 914B9C374;
	Tue, 24 Jan 2006 23:20:29 -0500 (EST)
Received: from xeon.unixathome.org (xeon.unixathome.org [10.55.0.18])
	by bast.unixathome.org (Postfix) with ESMTP id 13EBB3D3B;
	Tue, 24 Jan 2006 23:20:28 -0500 (EST)
Received: by xeon.unixathome.org (Postfix, from userid 1000)
	id A4A493E87; Tue, 24 Jan 2006 23:20:28 -0500 (EST)
Message-Id: <20060125042028.A4A493E87@xeon.unixathome.org>
Date: Tue, 24 Jan 2006 23:20:28 -0500 (EST)
From: Dan Langille <dan@langille.org>
Reply-To: Dan Langille <dan@langille.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc: Dan Langille <dan@langille.org>, Lars.Koeller@Uni-Bielefeld.DE
Subject: [UPDATE] sysutils/bacula-server - make DOCS optional and install only with server
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         92291
>Category:       ports
>Synopsis:       [UPDATE] sysutils/bacula-server - make DOCS optional and install only with server
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jan 25 04:30:03 GMT 2006
>Closed-Date:    Wed Jan 25 14:32:34 GMT 2006
>Last-Modified:  Wed Jan 25 14:32:34 GMT 2006
>Originator:     Dan Langille
>Release:        FreeBSD 4.9-STABLE i386
>Organization:
The FreeBSD Diary
>Environment:
System: FreeBSD xeon.unixathome.org 4.9-STABLE FreeBSD 4.9-STABLE #2: Wed Mar 3 08:16:24 EST 2004 dan@polo.unixathome.org:/usr/obj/usr/src/sys/XEON i386


	
>Description:
	
At present, the docs install with the client.  I suggest they should
be installed only with the server, and be optional.  Therefore I've added
a new OPTION: DOCS.

Set DISTFILES so that the DOCS tarball is downloaded only if selected.

Set UNIQUENAME so it is unique for both -client and -server.  That way
the options for both ports are stored in their own directory under
/var/db/ports

I've moved the DOCS installation out from within the CLIENT_ONLY .if statement.
Similarly for the setting of PORTDOCS

Bump PORTREVISION

Tested with both bacula-server and bacula-client using the recommended
testing order from the Porters handbook.

>How-To-Repeat:
	
>Fix:

	

--- bacula.diff begins here ---
diff -ruN /usr/ports/sysutils/bacula-server/Makefile bacula-server/Makefile
--- /usr/ports/sysutils/bacula-server/Makefile	Fri Jan 20 05:18:27 2006
+++ bacula-server/Makefile	Tue Jan 24 23:04:02 2006
@@ -7,12 +7,18 @@
 
 PORTNAME=	bacula
 PORTVERSION=	1.38.5
-#PORTREVISION=	1
+PORTREVISION=	1
 CATEGORIES=	sysutils
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
 MASTER_SITE_SUBDIR=	bacula
 PKGNAMESUFFIX?=	-server
-DISTFILES=	${PORTNAME}-${PORTVERSION}.tar.gz ${PORTNAME}-docs-${PORTVERSION}.tar.gz
+UNIQUENAME?=${PORTNAME}${PKGNAMESUFFIX}
+
+.if defined(WITHOUT_DOCS)
+DISTFILES= ${PORTNAME}-${PORTVERSION}.tar.gz
+.else
+DISTFILES= ${PORTNAME}-${PORTVERSION}.tar.gz ${PORTNAME}-docs-${PORTVERSION}.tar.gz
+.endif
 
 MAINTAINER=	Lars.Koeller@Uni-Bielefeld.DE
 COMMENT?=	The network backup solution (server)
@@ -43,7 +49,7 @@
 		PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" \
 		PTHREAD_LIBS="${PTHREAD_LIBS}"
 
-ALL_OPTIONS=	CLIENT_ONLY WXCONSOLE GNOMECONSOLE SQLITE3 MYSQL POSTGRESQL MTX OPENSSL
+ALL_OPTIONS=	CLIENT_ONLY WXCONSOLE GNOMECONSOLE SQLITE3 MYSQL POSTGRESQL MTX OPENSSL DOCS
 
 .for opt in ${ALL_OPTIONS}
 .if defined(WITH_${opt})
@@ -55,6 +61,7 @@
 IS_INTERACTIVE=	yes
 .endif
 
+
 .if defined(WITH_CLIENT_ONLY)
 OPTIONS+=	WXCONSOLE "Build with wxGTK based GUI console" off
 OPTIONS+=	GNOMECONSOLE "Build with GNOME based GUI console" off
@@ -63,6 +70,7 @@
 OPTIONS+=	MYSQL "Use MySQL database instead of SqLite" off
 OPTIONS+=	POSTGRESQL "Use PostgreSQL database instead of SqLite" off
 OPTIONS+=	MTX "Install mtx for control of autochanger devices" off
+OPTIONS+=	DOCS "Install documention" off
 .endif
 
 OPTIONS+=	OPENSSL "Enable OpenSSL for encrypted communication" off
@@ -80,11 +88,14 @@
 
 .include <bsd.port.pre.mk>
 
+.if defined(WITH_DOCS)
+PORTDOCS=	ReleaseNotes bacula.pdf developers.pdf kernstodo manual bacula-web
+.endif
+
 # Client only or full server version
 .if defined(WITH_CLIENT_ONLY)
 CONFFILES=	fd
 CONFIGURE_ARGS+=	--enable-client-only
-PORTDOCS=	ReleaseNotes bacula.pdf developers.pdf kernstodo manual bacula-web
 PKGDEINSTALL=	${PKGDIR}/pkg-deinstall.client
 PKGINSTALL=	${PKGDIR}/pkg-install.client
 # Build gnome-console
@@ -158,11 +169,14 @@
 	@${ECHO_MSG} "  WITH_GNOMECONSOLE=yes	if you only want a GNOME based GUI console."
 	@${ECHO_MSG} "  WITH_MTX=yes		if you want to use mtx instead of chio for autochanger control."
 	@${ECHO_MSG} "  WITH_SQLITE3=yes  	if you want SqLite-3 instead of SqLite-2 as the database."
+	@${ECHO_MSG} "  WITH_DOCS=yes  	if you want the documentation installed."
+	@${ECHO_MSG} "  WITH_OPENSSL=yes  	Enable OpenSSL for encrypted communication."
 .if !defined(WITH_MYSQL) && !defined(WITH_POSTGRESQL)
 	@${ECHO_MSG} "  WITH_MYSQL=yes  	if you want MySQL instead of SqLite as the database."
 	@${ECHO_MSG} "  WITH_POSTGRESQL=yes	if you want PostgreSQL instead of SqLite as the database."
 	@${ECHO_MSG} ""
 	@${ECHO_MSG} "The default DB is SQLite-2!"
+	@${ECHO_MSG} "  WITH_OPENSSL=yes  	Enable OpenSSL for encrypted communication."
 .endif
 	@${ECHO_MSG} ""
 	@${ECHO_MSG} "===> Using ${DBTYPE} as the bacula database."
@@ -227,8 +241,9 @@
 	${INSTALL_MAN} ${WRKSRC}/scripts/bacula.man ${PREFIX}/man/man8/bacula.8
 .endif
 
-# Documentaion is only installed in -client port
-.if !defined(NOPORTDOCS)
+.else
+# Documentation is only installed in -server port
+.if defined(WITH_DOCS)
 	for na in manual bacula-web; do \
 		${MKDIR} ${DOCSDIR}/$$na ;\
 		cd ${WRKDIR}/${PORTNAME}-docs-${PORTVERSION} && ${FIND} $$na | \
@@ -239,7 +254,6 @@
 	${INSTALL_DATA} ${WRKDIR}/${PORTNAME}-docs-${PORTVERSION}/developers/developers.pdf ${DOCSDIR}
 	${INSTALL_DATA} ${WRKDIR}/${PORTNAME}-${PORTVERSION}/kernstodo ${DOCSDIR}
 .endif
-.else
 # 	Extend /etc/services and install UID/GID
 	@ ${SETENV} PKG_PREFIX=${PREFIX} \
 		${SH} ${PKGINSTALL} ${PORTNAME} POST-INSTALL
--- bacula.diff ends here ---


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: edwin 
State-Changed-When: Wed Jan 25 04:32:14 UTC 2006 
State-Changed-Why:  
Awaiting maintainers feedback 

http://www.freebsd.org/cgi/query-pr.cgi?pr=92291 

From: Dan Langille <dan@langille.org>
To: FreeBSD-gnats-submit@FreeBSD.org
Cc: freebsd-ports-bugs@FreeBSD.org,
	Lars Kller <lars.koeller@uni-bielefeld.de>
Subject: Re: ports/92291: [UPDATE] sysutils/bacula-server - make DOCS optional
 and install only with server
Date: Wed, 25 Jan 2006 05:53:08 -0500 (EST)

 diff -ruN /usr/ports/sysutils/bacula-server/Makefile bacula-server/Makefile
 --- /usr/ports/sysutils/bacula-server/Makefile	Fri Jan 20 05:18:27 2006
 +++ bacula-server/Makefile	Wed Jan 25 05:35:08 2006
 @@ -7,12 +7,12 @@
 
  PORTNAME=	bacula
  PORTVERSION=	1.38.5
 -#PORTREVISION=	1
 +PORTREVISION=	1
  CATEGORIES=	sysutils
  MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
  MASTER_SITE_SUBDIR=	bacula
  PKGNAMESUFFIX?=	-server
 -DISTFILES=	${PORTNAME}-${PORTVERSION}.tar.gz ${PORTNAME}-docs-${PORTVERSION}.tar.gz
 +UNIQUENAME?=${PORTNAME}${PKGNAMESUFFIX}
 
  MAINTAINER=	Lars.Koeller@Uni-Bielefeld.DE
  COMMENT?=	The network backup solution (server)
 @@ -43,7 +43,7 @@
  		PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" \
  		PTHREAD_LIBS="${PTHREAD_LIBS}"
 
 -ALL_OPTIONS=	CLIENT_ONLY WXCONSOLE GNOMECONSOLE SQLITE3 MYSQL POSTGRESQL MTX OPENSSL
 +ALL_OPTIONS=	CLIENT_ONLY WXCONSOLE GNOMECONSOLE SQLITE3 MYSQL POSTGRESQL MTX OPENSSL DOCS
 
  .for opt in ${ALL_OPTIONS}
  .if defined(WITH_${opt})
 @@ -55,9 +55,11 @@
  IS_INTERACTIVE=	yes
  .endif
 
 +
  .if defined(WITH_CLIENT_ONLY)
  OPTIONS+=	WXCONSOLE "Build with wxGTK based GUI console" off
  OPTIONS+=	GNOMECONSOLE "Build with GNOME based GUI console" off
 +OPTIONS+=	DOCS "Install documention" off
  .else
  OPTIONS=	SQLITE3 "Use SqLite-3 database instead of SqLite-2" off
  OPTIONS+=	MYSQL "Use MySQL database instead of SqLite" off
 @@ -80,11 +82,19 @@
 
  .include <bsd.port.pre.mk>
 
 +DISTFILES= ${PORTNAME}-${PORTVERSION}.tar.gz
 +.if defined(WITH_DOCS)
 +DISTFILES+= ${PORTNAME}-docs-${PORTVERSION}.tar.gz
 +.endif
 +
 +.if defined(WITH_DOCS)
 +PORTDOCS=	ReleaseNotes bacula.pdf developers.pdf kernstodo manual bacula-web
 +.endif
 +
  # Client only or full server version
  .if defined(WITH_CLIENT_ONLY)
  CONFFILES=	fd
  CONFIGURE_ARGS+=	--enable-client-only
 -PORTDOCS=	ReleaseNotes bacula.pdf developers.pdf kernstodo manual bacula-web
  PKGDEINSTALL=	${PKGDIR}/pkg-deinstall.client
  PKGINSTALL=	${PKGDIR}/pkg-install.client
  # Build gnome-console
 @@ -158,11 +168,14 @@
  	@${ECHO_MSG} "  WITH_GNOMECONSOLE=yes	if you only want a GNOME based GUI console."
  	@${ECHO_MSG} "  WITH_MTX=yes		if you want to use mtx instead of chio for autochanger control."
  	@${ECHO_MSG} "  WITH_SQLITE3=yes  	if you want SqLite-3 instead of SqLite-2 as the database."
 +	@${ECHO_MSG} "  WITH_DOCS=yes  	if you want the documentation installed."
 +	@${ECHO_MSG} "  WITH_OPENSSL=yes  	Enable OpenSSL for encrypted communication."
  .if !defined(WITH_MYSQL) && !defined(WITH_POSTGRESQL)
  	@${ECHO_MSG} "  WITH_MYSQL=yes  	if you want MySQL instead of SqLite as the database."
  	@${ECHO_MSG} "  WITH_POSTGRESQL=yes	if you want PostgreSQL instead of SqLite as the database."
  	@${ECHO_MSG} ""
  	@${ECHO_MSG} "The default DB is SQLite-2!"
 +	@${ECHO_MSG} "  WITH_OPENSSL=yes  	Enable OpenSSL for encrypted communication."
  .endif
  	@${ECHO_MSG} ""
  	@${ECHO_MSG} "===> Using ${DBTYPE} as the bacula database."
 @@ -227,8 +240,8 @@
  	${INSTALL_MAN} ${WRKSRC}/scripts/bacula.man ${PREFIX}/man/man8/bacula.8
  .endif
 
 -# Documentaion is only installed in -client port
 -.if !defined(NOPORTDOCS)
 +# Documentation is only installed in -client port
 +.if defined(WITH_DOCS)
  	for na in manual bacula-web; do \
  		${MKDIR} ${DOCSDIR}/$$na ;\
  		cd ${WRKDIR}/${PORTNAME}-docs-${PORTVERSION} && ${FIND} $$na | \
 Please replace with this patch:
 
 DOCS now only an option with CLIENT instead of SERVER
 DISTFILES now set after .include <bsd.port.pre.mk> so that proper
 value of WITH_DOCS is obtained
 
 
 
 
 
 -- 
 Dan Langille - http://www.langille.org/
 BSDCan - The Technical BSD Conference: http://www.bsdcan.org/
State-Changed-From-To: feedback->closed 
State-Changed-By: lkoeller 
State-Changed-When: Wed Jan 25 14:31:37 UTC 2006 
State-Changed-Why:  
o) Port is modified and commited. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=92291 
>Unformatted:
