summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2010-03-24 20:34:54 +0000
committerRobin H. Johnson <robbat2@gentoo.org>2010-03-24 20:34:54 +0000
commit4bdccc02714c7fdf3b55d1a80ad29bdd837614e9 (patch)
tree1dacfe880c3d0a5e1f747d61d8cc8d22bda31116 /www-apache/mod-auth-mysql
parentFix typo, inherited from upstream README (diff)
downloadgentoo-2-4bdccc02714c7fdf3b55d1a80ad29bdd837614e9.tar.gz
gentoo-2-4bdccc02714c7fdf3b55d1a80ad29bdd837614e9.tar.bz2
gentoo-2-4bdccc02714c7fdf3b55d1a80ad29bdd837614e9.zip
Package up the other fork of mod_auth_mysql (as maintained by Debian).
(Portage version: 2.2_rc63/cvs/Linux x86_64)
Diffstat (limited to 'www-apache/mod-auth-mysql')
-rw-r--r--www-apache/mod-auth-mysql/ChangeLog11
-rw-r--r--www-apache/mod-auth-mysql/files/12_mod_auth_mysql.conf132
-rw-r--r--www-apache/mod-auth-mysql/metadata.xml6
-rw-r--r--www-apache/mod-auth-mysql/mod-auth-mysql-4.3.9.ebuild60
4 files changed, 209 insertions, 0 deletions
diff --git a/www-apache/mod-auth-mysql/ChangeLog b/www-apache/mod-auth-mysql/ChangeLog
new file mode 100644
index 000000000000..87f5094a3b30
--- /dev/null
+++ b/www-apache/mod-auth-mysql/ChangeLog
@@ -0,0 +1,11 @@
+# ChangeLog for www-apache/mod-auth-mysql
+# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/www-apache/mod-auth-mysql/ChangeLog,v 1.1 2010/03/24 20:34:54 robbat2 Exp $
+
+*mod-auth-mysql-4.3.9 (24 Mar 2010)
+
+ 24 Mar 2010; Robin H. Johnson <robbat2@gentoo.org>
+ +files/12_mod_auth_mysql.conf, +mod-auth-mysql-4.3.9.ebuild,
+ +metadata.xml:
+ Package up the other fork of mod_auth_mysql (as maintained by Debian).
+
diff --git a/www-apache/mod-auth-mysql/files/12_mod_auth_mysql.conf b/www-apache/mod-auth-mysql/files/12_mod_auth_mysql.conf
new file mode 100644
index 000000000000..d41426993cf9
--- /dev/null
+++ b/www-apache/mod-auth-mysql/files/12_mod_auth_mysql.conf
@@ -0,0 +1,132 @@
+<IfDefine AUTH_MYSQL>
+LoadModule apache2_mysql_auth_module modules/apache2_mod_auth_mysql.so
+
+# mod_auth_mysql can be used to limit access to documents by checking
+# data in a MySQL database.
+
+# This will enable user-based MySQL authentication of everything
+# within /home/httpd. You'll need to do the following as the MySQL
+# root user beforehand:
+#
+# CREATE DATABASE auth;
+# USE auth;
+# CREATE TABLE users (
+# user_name CHAR(30) NOT NULL,
+# user_passwd CHAR(20) NOT NULL,
+# PRIMARY KEY (user_name)
+# );
+# GRANT SELECT
+# ON auth.users
+# TO authuser@localhost
+# IDENTIFIED BY 'PaSsW0Rd';
+#
+# INSERT INTO users VALUES ('testuser', ENCRYPT('testpass'));
+#
+#<Directory /home/httpd>
+# # If you want tot make mod_auth_mysql work with apache-2.2, please uncomment
+# # the following line:
+# #AuthBasicAuthoritative Off
+# AuthName "MySQL authenticated zone"
+# AuthType Basic
+#
+# AuthMySQLUser authuser
+# AuthMySQLPassword PaSsW0Rd
+# AuthMySQLDB auth
+# AuthMySQLUserTable users
+# AuthMySQLNameField user_name
+# AuthMySQLPasswordField user_passwd
+#
+# require valid-user
+#</Directory>
+
+# This will enable group-based MySQL authentication of everything
+# within /home/httpd. You'll need to do the following as the MySQL
+# root user beforehand:
+#
+# CREATE DATABASE auth;
+# USE auth;
+# CREATE TABLE users (
+# user_name CHAR(30) NOT NULL,
+# user_passwd CHAR(20) NOT NULL,
+# user_group CHAR(20) NOT NULL,
+# PRIMARY KEY (user_name)
+# );
+# GRANT SELECT
+# ON auth.users
+# TO authuser@localhost
+# IDENTIFIED BY 'PaSsW0Rd';
+#
+# INSERT INTO users VALUES ('testuser', ENCRYPT('testpass'), 'user');
+# INSERT INTO users VALUES ('testadmin', ENCRYPT('testpass'), 'admin');
+#
+#<Directory /home/httpd>
+# # If you want tot make mod_auth_mysql work with apache-2.2, please uncomment
+# # the following line:
+# #AuthBasicAuthoritative Off
+# AuthName "MySQL group authenticated zone"
+# AuthType Basic
+#
+# AuthMySQLUser authuser
+# AuthMySQLPassword PaSsW0Rd
+# AuthMySQLDB auth
+# AuthMySQLUserTable users
+# AuthMySQLNameField user_name
+# AuthMySQLPasswordField user_passwd
+# AuthMySQLGroupField user_group
+#
+# require group admin
+#</Directory>
+
+# Like the above this enables group-based MySQL authentication of
+# everything within /home/httpd, but this configuration allows users to
+# belong to more than one group. You'll need to do the following as
+# the MySQL root user beforehand:
+#
+# CREATE DATABASE auth;
+# USE auth;
+# CREATE TABLE users (
+# user_name CHAR(30) NOT NULL,
+# user_passwd CHAR(20) NOT NULL,
+# PRIMARY KEY (user_name)
+# );
+# CREATE TABLE groups (
+# user_name CHAR(30) NOT NULL,
+# user_group CHAR(20) NOT NULL,
+# PRIMARY KEY (user_name, user_group)
+# );
+# GRANT SELECT
+# ON auth.users
+# TO authuser@localhost
+# IDENTIFIED BY 'PaSsW0Rd';
+# GRANT SELECT
+# ON auth.groups
+# TO authuser@localhost
+# IDENTIFIED BY 'PaSsW0Rd';
+#
+# INSERT INTO users VALUES ('testuser', ENCRYPT('testpass'));
+# INSERT INTO groups VALUES ('testuser', 'user');
+# INSERT INTO users VALUES ('testadmin', ENCRYPT('testpass'));
+# INSERT INTO groups VALUES ('testadmin', 'admin');
+# INSERT INTO groups VALUES ('testadmin', 'user');
+#
+#<Directory /home/httpd>
+# # If you want tot make mod_auth_mysql work with apache-2.2, please uncomment
+# # the following line:
+# #AuthBasicAuthoritative Off
+# AuthName "MySQL group authenticated zone"
+# AuthType Basic
+#
+# AuthMySQLUser authuser
+# AuthMySQLPassword PaSsW0Rd
+# AuthMySQLDB auth
+# AuthMySQLUserTable users
+# AuthMySQLNameField user_name
+# AuthMySQLPasswordField user_passwd
+# AuthMySQLGroupTable groups
+# AuthMySQLGroupField user_group
+#
+# require group user
+#</Directory>
+</IfDefine>
+
+# vim: ts=4 filetype=apache
diff --git a/www-apache/mod-auth-mysql/metadata.xml b/www-apache/mod-auth-mysql/metadata.xml
new file mode 100644
index 000000000000..1bd30cf25759
--- /dev/null
+++ b/www-apache/mod-auth-mysql/metadata.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>apache</herd>
+ <herd>mysql</herd>
+</pkgmetadata>
diff --git a/www-apache/mod-auth-mysql/mod-auth-mysql-4.3.9.ebuild b/www-apache/mod-auth-mysql/mod-auth-mysql-4.3.9.ebuild
new file mode 100644
index 000000000000..9f00883e09a5
--- /dev/null
+++ b/www-apache/mod-auth-mysql/mod-auth-mysql-4.3.9.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-apache/mod-auth-mysql/mod-auth-mysql-4.3.9.ebuild,v 1.1 2010/03/24 20:34:54 robbat2 Exp $
+
+EAPI=3
+
+inherit apache-module eutils
+
+DESCRIPTION="A module for the Apache 2 web server which enables HTTP authentication against information stored in a MySQL database. "
+HOMEPAGE="http://packages.debian.org/source/mod-auth-mysql"
+DEBIAN_PV="13"
+MY_P="${PN}_${PV/-/_}"
+DEBIAN_URI="mirror://debian/pool/main/${PN:0:1}/${PN}"
+DEBIAN_PATCH="${MY_P}-${DEBIAN_PV}.diff.gz"
+DEBIAN_SRC="${MY_P}.orig.tar.gz"
+SRC_URI="${DEBIAN_URI}/${DEBIAN_SRC} ${DEBIAN_URI}/${DEBIAN_PATCH}"
+
+LICENSE="Apache-1.1"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+
+DEPEND="virtual/mysql"
+RDEPEND="${DEPEND}
+ !www-apache/mod_auth_mysql"
+
+APACHE2_MOD_FILE="${S}/apache2_mod_auth_mysql.so"
+APACHE2_MOD_CONF="12_${PN//-/_}"
+APACHE2_MOD_DEFINE="AUTH_MYSQL"
+
+DOCFILES="USAGE DIRECTIVES"
+
+need_apache2_2
+
+src_unpack() {
+ unpack "${DEBIAN_SRC}"
+}
+
+src_prepare() {
+ EPATCH_OPTS="-p1" epatch "${DISTDIR}"/"${DEBIAN_PATCH}"
+ for i in $(<"${S}"/debian/patches/00list) ; do
+ epatch "${S}"/debian/patches/${i}*
+ done
+}
+
+src_configure() {
+ econf \
+ --enable-apache2 \
+ --disable-apache13 \
+ --with-apxs2=/usr/sbin/apxs2 \
+ || die "Failed econf"
+}
+
+src_compile() {
+ emake || die "Failed to compile"
+}
+
+src_install() {
+ apache-module_src_install
+}