Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Jan 2006 23:20:28 -0500 (EST)
From:      Dan Langille <dan@langille.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        Dan Langille <dan@langille.org>, Lars.Koeller@Uni-Bielefeld.DE
Subject:   ports/92291: [UPDATE] sysutils/bacula-server - make DOCS optional and install only with server
Message-ID:  <20060125042028.A4A493E87@xeon.unixathome.org>
Resent-Message-ID: <200601250430.k0P4U9T1035075@freefall.freebsd.org>

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

>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:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jan 25 04:30:03 GMT 2006
>Closed-Date:
>Last-Modified:
>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:
>Unformatted:



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