Subject: pkg/32686: ap-auth-mysql install fails
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: None <collver@peak.org>
List: pkgsrc-bugs
Date: 02/01/2006 00:25:00
>Number:         32686
>Category:       pkg
>Synopsis:       ap-auth-mysql install fails
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Feb 01 00:25:00 +0000 2006
>Originator:     collver@peak.org
>Release:        NetBSD 3.0
>Organization:
>Environment:
System: NetBSD sanctum 3.0 NetBSD 3.0 (SANCTUM) #0: Sun Dec 25 11:35:26 PST 2005 ben@sanctum:/home/ben/src/netbsd/3.0/src/sys/arch/i386/compile/SANCTUM i386
Architecture: i386
Machine: i386
>Description:
In pkg/32685, I submitted a patch to make ap-auth-mysql build with apache2.
This patch causes the install to fail, because without module.mk there
is no install target.

>How-To-Repeat:
Try to install ap-auth-mysql after applying the patch from pkg/32685.

>Fix:
Provide an install target, like ap-php does.

--- Makefile.orig	2006-01-31 16:16:48.000000000 -0800
+++ Makefile	2006-01-31 16:15:16.000000000 -0800
@@ -32,6 +32,17 @@
 APACHE_MODULE=		YES
 APACHE_MODULE_NAME=	mod_auth_mysql.so
 
+do-install:
+	if [ -f ${WRKSRC}/.libs/${PKG_APACHE}_mod_auth_mysql.so ]; then	\
+		${INSTALL_DATA} \
+			${WRKSRC}/.libs/${PKG_APACHE}_mod_auth_mysql.so \
+			${PREFIX}/lib/httpd/mod_auth_mysql.so;   \
+	elif [ -f ${WRKSRC}/libs/${PKG_APACHE}_mod_auth_mysql.so ]; then \
+		${INSTALL_DATA} \
+			${WRKSRC}/libs/${PKG_APACHE}_mod_auth_mysql.so  \
+			${PREFIX}/lib/httpd/mod_auth_mysql.so;   \
+	fi
+
 post-install:
 	${INSTALL_DATA_DIR} ${PREFIX}/share/doc/mod_auth_mysql
 	${INSTALL_DATA} ${WRKSRC}/DIRECTIVES ${PREFIX}/share/doc/mod_auth_mysql