Subject: pkg/19708: Documentation fix/updates for phpmyadmin package
To: None <gnats-bugs@gnats.netbsd.org>
From: None <adrianp@stindustries.net>
List: netbsd-bugs
Date: 01/06/2003 00:06:07
>Number:         19708
>Category:       pkg
>Synopsis:       Documentation fix/updates for phpmyadmin package
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Mon Jan 06 00:07:00 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     Adrian Portelli
>Release:        NetBSD 1.6 i386
>Organization:
STIndustries
>Environment:
NetBSD krusty.mdc.stindustries.net 1.6 NetBSD 1.6 (KRUSTY) #13: Fri Dec 27 00:38:09 EST 2002     root@krusty.mdc.stindustries.net:/usr/src/sys/arch/i386/compile/KRUSTY i386
>Description:
1. The online documentation for phpMyAdmin is not installed to the correct location.

2. The documentation for integrating phpMyAdmin with Apache could be better (See mail/squirrelmail package for an example)
>How-To-Repeat:
Install the package and try to access the online documentation and you will get a 404 from the web server.
>Fix:
If this diff does not apply correctly you can download it from:

http://www.stindustries.net/download/netbsd/phpmyadmin-update-v2.diff.gz


--- MESSAGE.orig	Mon Jan  6 08:50:40 2003
+++ MESSAGE	Mon Jan  6 08:53:26 2003
@@ -5,4 +5,23 @@
 this package because it is a prototype file. Instead link or copy
 the required files to your web space and create a local copy of
 "config.inc.php" there.
+
+You will need to make phpMyAdmin accessible through your HTTP server.
+If you are running Apache and ap-php, then you may either symlink
+        
+	${PMDIR}
+
+into DocumentRoot, or copy 
+
+	${EGDIR}/phpmyadmin.conf.dist 
+
+to ${PREFIX}/etc/httpd and add the following line to httpd.conf:
+
+	Include ${PKG_SYSCONFDIR}/phpmyadmin.conf
+
+to make mySQL accessible through:
+				
+	http://www.domain.com/phpmyadmin/
+
+
 ===========================================================================
--- Makefile.orig	Mon Jan  6 08:50:40 2003
+++ Makefile	Mon Jan  6 14:51:55 2003
@@ -2,6 +2,7 @@
 
 DISTNAME=	phpMyAdmin-${DIST_VERSION}-php
 PKGNAME=	phpmyadmin-2.3.3.1
+PKGREVISION=	1
 CATEGORIES=	databases www
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE:=phpmyadmin/}
 EXTRACT_SUFX=	.tar.bz2
@@ -17,11 +18,24 @@
 NO_BUILD=	YES
 WRKSRC=		${WRKDIR}/${DISTNAME:S/-php//}
 
+PKG_SYSCONFSUBDIR?=	httpd
+MESSAGE_SUBST+=		PKG_SYSCONFDIR=${PKG_SYSCONFDIR}
+
+PMDIR=		${PREFIX}/share/phpmyadmin
+EGDIR=		${PREFIX}/share/examples/phpmyadmin
+
+MESSAGE_SUBST+=	PMDIR=${PMDIR}
+MESSAGE_SUBST+=	EGDIR=${EGDIR}
+
 DIST_VERSION=	2.3.3pl1
-DOC_FILES=	ANNOUNCE.txt CREDITS ChangeLog Documentation.html \
+DOC_FILES=	ANNOUNCE.txt CREDITS ChangeLog \
 		Documentation.txt INSTALL LICENSE README \
 		RELEASE-DATE-${DIST_VERSION} TODO
 
+pre-install:
+	@${SED} s#@PMDIR@#${PMDIR}#g < ${FILESDIR}/phpmyadmin.conf.dist > \
+		${WRKDIR}/phpmyadmin.conf.dist
+
 do-install:
 	${INSTALL_DATA_DIR} ${PREFIX}/share/phpmyadmin
 	${INSTALL_DATA_DIR} ${PREFIX}/share/phpmyadmin/images
@@ -33,6 +47,7 @@
 	${INSTALL_DATA_DIR} ${PREFIX}/share/phpmyadmin/libraries/xpath
 	${INSTALL_DATA_DIR} ${PREFIX}/share/phpmyadmin/scripts
 	${INSTALL_SCRIPT} ${WRKSRC}/*.php ${PREFIX}/share/phpmyadmin
+	${INSTALL_DATA} ${WRKSRC}/Documentation.html ${PREFIX}/share/phpmyadmin
 	${INSTALL_DATA} ${WRKSRC}/badwords.txt ${PREFIX}/share/phpmyadmin
 	${INSTALL_DATA} ${WRKSRC}/images/*.* ${PREFIX}/share/phpmyadmin/images
 	${INSTALL_SCRIPT} ${WRKSRC}/lang/*.php ${PREFIX}/share/phpmyadmin/lang
@@ -46,5 +61,8 @@
 	for FILE in ${DOC_FILES}; do \
 	  ${INSTALL_DATA} ${WRKSRC}/$$FILE ${PREFIX}/share/doc/phpmyadmin; \
 	done
+	${INSTALL_DATA_DIR} ${PREFIX}/share/examples/phpmyadmin
+	${INSTALL_DATA} ${WRKDIR}/phpmyadmin.conf.dist \
+		${EGDIR}/phpmyadmin.conf.dist
 
 .include "../../mk/bsd.pkg.mk"
--- PLIST.orig	Mon Jan  6 08:50:40 2003
+++ PLIST	Mon Jan  6 14:52:32 2003
@@ -92,13 +92,13 @@
 share/doc/phpmyadmin/ANNOUNCE.txt
 share/doc/phpmyadmin/CREDITS
 share/doc/phpmyadmin/ChangeLog
-share/doc/phpmyadmin/Documentation.html
 share/doc/phpmyadmin/Documentation.txt
 share/doc/phpmyadmin/INSTALL
 share/doc/phpmyadmin/LICENSE
 share/doc/phpmyadmin/README
 share/doc/phpmyadmin/TODO
 share/doc/phpmyadmin/RELEASE-DATE-${DIST_VERSION}
+share/phpmyadmin/Documentation.html
 share/phpmyadmin/badwords.txt
 share/phpmyadmin/db_create.php
 share/phpmyadmin/db_datadict.php
@@ -219,6 +219,8 @@
 share/phpmyadmin/scripts/create_tables.sql
 share/phpmyadmin/scripts/extchg.sh
 share/phpmyadmin/scripts/remove_control_m.sh
+share/examples/phpmyadmin/phpmyadmin.conf.dist
+@dirrm share/examples/phpmyadmin
 @dirrm share/phpmyadmin/lang
 @dirrm share/phpmyadmin/images
 @dirrm share/phpmyadmin/libraries/auth
--- files/phpmyadmin.conf.dist.orig	Mon Jan  6 08:53:26 2003
+++ files/phpmyadmin.conf.dist	Mon Jan  6 08:53:26 2003
@@ -0,0 +1,14 @@
+# $Header$
+#
+# phpmyadmin configuration file fragment for Apache
+
+<IfModule mod_alias.c>
+    Alias /phpmyadmin/ "@PMDIR@/"
+</IfModule>
+
+<Directory "@PMDIR@">
+    Options Indexes
+    AllowOverride None
+    Order allow,deny
+    Allow from all
+</Directory>

>Release-Note:
>Audit-Trail:
>Unformatted: