aboutsummaryrefslogtreecommitdiffstats
path: root/www/mod_mysqluserdir
diff options
context:
space:
mode:
authoranders <anders@FreeBSD.org>2001-11-12 11:24:59 +0800
committeranders <anders@FreeBSD.org>2001-11-12 11:24:59 +0800
commitd92b720042732f6ebfb169b626142abd0e48d993 (patch)
tree6e5931370c6a05f7462c922634e7bdad37c6cbae /www/mod_mysqluserdir
parent238552db484c3a3b19792a0316e1ff2073e34361 (diff)
downloadfreebsd-ports-graphics-d92b720042732f6ebfb169b626142abd0e48d993.tar.gz
freebsd-ports-graphics-d92b720042732f6ebfb169b626142abd0e48d993.tar.zst
freebsd-ports-graphics-d92b720042732f6ebfb169b626142abd0e48d993.zip
Add mod_mysqluserdir, an Apache module to make Apache get userdirs from MySQL.
PR: 31577 Approved by: will
Diffstat (limited to 'www/mod_mysqluserdir')
-rw-r--r--www/mod_mysqluserdir/Makefile34
-rw-r--r--www/mod_mysqluserdir/distinfo1
-rw-r--r--www/mod_mysqluserdir/files/README45
-rw-r--r--www/mod_mysqluserdir/files/patch-mod_mysqluserdir.c10
-rw-r--r--www/mod_mysqluserdir/pkg-comment1
-rw-r--r--www/mod_mysqluserdir/pkg-descr6
-rw-r--r--www/mod_mysqluserdir/pkg-message19
-rw-r--r--www/mod_mysqluserdir/pkg-plist5
8 files changed, 121 insertions, 0 deletions
diff --git a/www/mod_mysqluserdir/Makefile b/www/mod_mysqluserdir/Makefile
new file mode 100644
index 00000000000..a22220da2a3
--- /dev/null
+++ b/www/mod_mysqluserdir/Makefile
@@ -0,0 +1,34 @@
+# New ports collection makefile for: mod_mysqluserdir
+# Date created: 12 November 2001
+# Whom: Anders Nordby <anders@FreeBSD.org>
+#
+# $FreeBSD$
+
+PORTNAME= mod_mysqluserdir
+PORTVERSION= 0.1
+CATEGORIES= www
+MASTER_SITES= ftp://sys.estpak.ee/pub/ \
+ ftp://ftp.nuug.no/pub/anders/distfiles/
+DISTNAME= ${PORTNAME}_${PORTVERSION}
+
+MAINTAINER= anders@FreeBSD.org
+
+BUILD_DEPENDS= ${APXS}:${PORTSDIR}/www/apache13
+RUN_DEPENDS= ${APXS}:${PORTSDIR}/www/apache13
+LIB_DEPENDS= mysqlclient.10:${PORTSDIR}/databases/mysql323-client
+
+APXS= ${LOCALBASE}/sbin/apxs
+
+do-build:
+ (cd ${WRKSRC} && ${APXS} -c -I${LOCALBASE}/include \
+ -L${LOCALBASE}/lib/mysql -lmysqlclient mod_mysqluserdir.c)
+
+do-install:
+ (cd ${WRKSRC} && ${APXS} -i -A -n 'userdir' mod_mysqluserdir.so)
+.if !defined(NOPORTDOCS)
+ ${INSTALL} -d -o root -g wheel -m 0755 ${DOCSDIR}
+ ${INSTALL_DATA} ${FILESDIR}/README ${DOCSDIR}/
+.endif
+ ${CAT} ${PKGMESSAGE}
+
+.include <bsd.port.mk>
diff --git a/www/mod_mysqluserdir/distinfo b/www/mod_mysqluserdir/distinfo
new file mode 100644
index 00000000000..06ab9dbd746
--- /dev/null
+++ b/www/mod_mysqluserdir/distinfo
@@ -0,0 +1 @@
+MD5 (mod_mysqluserdir_0.1.tar.gz) = 3f74bc9f8ce6959018767695c52c00c4
diff --git a/www/mod_mysqluserdir/files/README b/www/mod_mysqluserdir/files/README
new file mode 100644
index 00000000000..eec557aa4a0
--- /dev/null
+++ b/www/mod_mysqluserdir/files/README
@@ -0,0 +1,45 @@
+Notes from the author:
+======================
+
+Modified by Jaanus Toomsalu for using MYSQL userdirs
+03. Sept. 2001
+Configuration options
+ MyUserDirHost localhost - Mysql database host
+ MyUserDirSock /var/run/mysql/mysql.sock - Mysql Unix filesocket
+ if not present then database host option will be used
+ MyUserDirUser user - DB User
+ MyUserDirPass pass - DB User password
+ MyUserDirDB database _ DB name
+ MyUserDirTable table - DB table name
+ MyUserDirDirCol directory - directory column name
+ MyUserDirUserCol login - login column name
+ #MyUserDirLeftJoinCol - if needed
+ MyUserDirWhereCol "and enabled=1"
+
+Notes from Anders:
+==================
+
+The module is successfully tested with this configuration:
+
+MyUserDirSock /tmp/mysql.sock
+MyUserDirUser sqluserdir
+MyUserDirPass foo
+MyUserDirDB sqlusers
+MyUserDirTable sqlusers
+MyUserDirDirCol directory
+MyUserDirUserCol user
+
+I had to disable the LoadModule and AddModule commands for the default Apache
+mod_userdir to make mod_mysqluserdir work.
+
+And a MySQL table crated like this:
+
+CREATE TABLE sqlusers (
+ id int(13) NOT NULL auto_increment,
+ user varchar(50) NOT NULL default '',
+ directory varchar(50) NOT NULL default '',
+ enabled tinyint(3) NOT NULL default '1',
+ PRIMARY KEY (id)
+);
+
+INSERT INTO sqlusers VALUES (1,'anders','/home/anders',1);
diff --git a/www/mod_mysqluserdir/files/patch-mod_mysqluserdir.c b/www/mod_mysqluserdir/files/patch-mod_mysqluserdir.c
new file mode 100644
index 00000000000..32e3c2f3078
--- /dev/null
+++ b/www/mod_mysqluserdir/files/patch-mod_mysqluserdir.c
@@ -0,0 +1,10 @@
+--- mod_mysqluserdir.c.orig Sun Oct 28 14:08:24 2001
++++ mod_mysqluserdir.c Sun Oct 28 14:08:53 2001
+@@ -614,7 +614,6 @@
+
+ if (sql_row=mysql_fetch_row(result)) {
+ values=sql_row[0];
+- mysql_free_result(result);
+ }
+
+ else
diff --git a/www/mod_mysqluserdir/pkg-comment b/www/mod_mysqluserdir/pkg-comment
new file mode 100644
index 00000000000..2b69ffc5fef
--- /dev/null
+++ b/www/mod_mysqluserdir/pkg-comment
@@ -0,0 +1 @@
+An Apache module to make Apache get userdirs from MySQL
diff --git a/www/mod_mysqluserdir/pkg-descr b/www/mod_mysqluserdir/pkg-descr
new file mode 100644
index 00000000000..e892a0f539c
--- /dev/null
+++ b/www/mod_mysqluserdir/pkg-descr
@@ -0,0 +1,6 @@
+mod_mysqluserdir is a configurable Apache module for fetching
+http://server/~username type info from a MySQL database.
+
+WWW: http://freshmeat.net/projects/mod_mysqluserdir/
+
+- Anders Nordby <anders@FreeBSD.org>
diff --git a/www/mod_mysqluserdir/pkg-message b/www/mod_mysqluserdir/pkg-message
new file mode 100644
index 00000000000..31176a72a55
--- /dev/null
+++ b/www/mod_mysqluserdir/pkg-message
@@ -0,0 +1,19 @@
+************************************************************
+You've installed mod_mysqluserdir, an Apache module to make
+Apache get userdirs from MySQL.
+
+Edit your apache.conf or httpd.conf to enable and setup this
+module. Have a look at the files in
+${PREFIX}/share/doc/mod_mysqluserdir for information on how
+to configure it etc.
+
+You need to disable the LoadModule and AddModule commands
+for the default Apache mod_userdir module to make
+mod_mysqluserdir work.
+
+Then do this to make it work effective:
+
+# apachectl configtest (see if there are any config errors)
+# apachectl restart
+
+************************************************************
diff --git a/www/mod_mysqluserdir/pkg-plist b/www/mod_mysqluserdir/pkg-plist
new file mode 100644
index 00000000000..40157f263f9
--- /dev/null
+++ b/www/mod_mysqluserdir/pkg-plist
@@ -0,0 +1,5 @@
+libexec/apache/mod_mysqluserdir.so
+@exec %D/sbin/apxs -e -A -n userdir %D/%F
+@unexec %D/sbin/apxs -e -A -n userdir %D/%F
+%%PORTDOCS%%share/doc/mod_mysqluserdir/README
+%%PORTDOCS%%@dirrm share/doc/mod_mysqluserdir