diff options
-rw-r--r-- | www/Makefile | 1 | ||||
-rw-r--r-- | www/mod_authnz_crowd/Makefile | 44 | ||||
-rw-r--r-- | www/mod_authnz_crowd/distinfo | 2 | ||||
-rw-r--r-- | www/mod_authnz_crowd/files/patch-configure.ac | 63 | ||||
-rw-r--r-- | www/mod_authnz_crowd/files/patch-src__Makefile.am | 29 | ||||
-rw-r--r-- | www/mod_authnz_crowd/files/patch-src__svn__Makefile.am | 11 | ||||
-rw-r--r-- | www/mod_authnz_crowd/files/pkg-message.in | 14 | ||||
-rw-r--r-- | www/mod_authnz_crowd/files/zzz_authnz_crowd.conf.in | 7 | ||||
-rw-r--r-- | www/mod_authnz_crowd/pkg-descr | 4 | ||||
-rw-r--r-- | www/mod_authnz_crowd/scripts/configure | 3 |
10 files changed, 178 insertions, 0 deletions
diff --git a/www/Makefile b/www/Makefile index e5ec9b563b6d..d1a8f632945c 100644 --- a/www/Makefile +++ b/www/Makefile @@ -468,6 +468,7 @@ SUBDIR += mod_auth_xradius SUBDIR += mod_authn_otp SUBDIR += mod_authn_sasl + SUBDIR += mod_authnz_crowd SUBDIR += mod_authnz_external SUBDIR += mod_authz_unixgroup SUBDIR += mod_backtrace diff --git a/www/mod_authnz_crowd/Makefile b/www/mod_authnz_crowd/Makefile new file mode 100644 index 000000000000..d827ba552a1e --- /dev/null +++ b/www/mod_authnz_crowd/Makefile @@ -0,0 +1,44 @@ +# Created by: Vick Khera <vivek@khera.org> +# $FreeBSD$ + +PORTNAME= mod_authnz_crowd +PORTVERSION= 2.0.2 +CATEGORIES= www +MASTER_SITES= http://downloads.atlassian.com/software/crowd/downloads/cwdapache/ +DIST_SUBDIR= apache2 + +MAINTAINER= vivek@khera.org +COMMENT= Apache 2.2.x module to use Atlassian Crowd for authentication + +LICENSE= AL2 + +LIB_DEPENDS= libsvn_client-1.so:${PORTSDIR}/devel/subversion \ + libcurl.so:${PORTSDIR}/ftp/curl + +USE_AUTOTOOLS= autoconf:env automake:env libtool:env +GNU_CONFIGURE= yes +USE_GNOME= libxml2 +USE_GCC= any +USE_APACHE= 22 +MAKE_JOBS_SAFE= yes + +MANUAL_PACKAGE_BUILD= requires subversion build with MOD_DAV_SVN. + +SUB_FILES= pkg-message zzz_authnz_crowd.conf +SUB_LIST+= APACHEETCDIR=${APACHEETCDIR} \ + APACHEMODDIR=${APACHEMODDIR} + +PLIST_FILES= ${APACHEMODDIR}/mod_authnz_crowd.so \ + ${APACHEMODDIR}/mod_authz_svn_crowd.so \ + ${APACHEETCDIR}/Includes/zzz_authnz_crowd.conf + +LDFLAGS+= -L${PREFIX}/lib + +post-install: + ${INSTALL_DATA} ${WRKDIR}/zzz_authnz_crowd.conf \ + ${PREFIX}/${APACHEETCDIR}/Includes/ + @${ECHO_CMD} + @${CAT} ${PKGMESSAGE} + @${ECHO_CMD} + +.include <bsd.port.mk> diff --git a/www/mod_authnz_crowd/distinfo b/www/mod_authnz_crowd/distinfo new file mode 100644 index 000000000000..aa9660009a36 --- /dev/null +++ b/www/mod_authnz_crowd/distinfo @@ -0,0 +1,2 @@ +SHA256 (apache2/mod_authnz_crowd-2.0.2.tar.gz) = 941edf2aea51528ef85c4f9897561f36178e8143ba717309c133134ec05299ac +SIZE (apache2/mod_authnz_crowd-2.0.2.tar.gz) = 25398 diff --git a/www/mod_authnz_crowd/files/patch-configure.ac b/www/mod_authnz_crowd/files/patch-configure.ac new file mode 100644 index 000000000000..786ddc1191a8 --- /dev/null +++ b/www/mod_authnz_crowd/files/patch-configure.ac @@ -0,0 +1,63 @@ +--- ./configure.ac.orig 2011-03-29 07:51:33.000000000 +0200 ++++ ./configure.ac 2013-06-22 22:54:04.000000000 +0200 +@@ -1,5 +1,6 @@ + AC_INIT([mod_authnz_crowd], [2.0.2], [support@atlassian.com]) + AM_INIT_AUTOMAKE([-Wall -Werror foreign]) ++AM_PROG_AR + AC_PROG_CC + AC_PROG_LIBTOOL + AC_CONFIG_HEADERS([config.h]) +@@ -12,7 +13,7 @@ + + AC_CHECK_LIB([apr-1], [apr_pool_pre_cleanup_register], [], [AC_MSG_ERROR([apr_pool_pre_cleanup_register was not found in libapr-1])]) + +-AC_CHECK_FILE([/usr/local/apache2/include/httpd.h], [APACHE_INCLUDE_DIR="/usr/local/apache2/include"], [ ++AC_CHECK_FILE([/usr/local/include/apache22/httpd.h], [APACHE_INCLUDE_DIR="/usr/local/include/apache22"], [ + AC_CHECK_FILE([/usr/include/httpd/httpd.h], [APACHE_INCLUDE_DIR="/usr/include/httpd"], [ + AC_CHECK_FILE([/usr/include/apache2/httpd.h], [APACHE_INCLUDE_DIR="/usr/include/apache2"], [ + AC_MSG_ERROR([Could not locate Apache include directory]) +@@ -21,7 +22,7 @@ + ]) + AC_SUBST([APACHE_INCLUDE_DIR]) + +-AC_PATH_PROG([HTTPD], [httpd], , [/usr/local/apache2/bin:/usr/sbin]) ++AC_PATH_PROG([HTTPD], [httpd], , [/usr/local/bin:/usr/local/sbin]) + APACHE_BIN_DIR=`AS_DIRNAME($HTTPD)` + AC_SUBST([APACHE_BIN_DIR]) + +@@ -32,7 +33,7 @@ + ]) + AC_SUBST([SVN_DIR]) + +-AC_CHECK_FILE([/usr/libexec/apache2/mod_dav.so], [APACHE_MODULES_DIR="/usr/libexec/apache2"], [ ++AC_CHECK_FILE([/usr/local/libexec/apache22/mod_dav.so], [APACHE_MODULES_DIR="/usr/local/libexec/apache22"], [ + AC_CHECK_FILE([/usr/lib64/httpd/modules/mod_dav.so], [APACHE_MODULES_DIR="/usr/lib64/httpd/modules"], [ + AC_CHECK_FILE([/usr/lib/httpd/modules/mod_dav.so], [APACHE_MODULES_DIR="/usr/lib/httpd/modules"], [ + AC_CHECK_FILE([/usr/lib/apache2/modules/mod_dav.so], [APACHE_MODULES_DIR="/usr/lib/apache2/modules"], [ +@@ -43,7 +44,7 @@ + ]) + AC_SUBST([APACHE_MODULES_DIR]) + +-AC_CHECK_FILE([/usr/local/apache2/conf/httpd.conf], [HTTPD_CONF="/usr/local/apache2/conf/httpd.conf"], [ ++AC_CHECK_FILE([/usr/local/etc/apache22/httpd.conf], [HTTPD_CONF="/usr/local/etc/apache22/httpd.conf"], [ + AC_CHECK_FILE([/etc/httpd/conf/httpd.conf], [HTTPD_CONF="/etc/httpd/conf/httpd.conf"], [ + AC_CHECK_FILE([/etc/apache2/httpd.conf], [HTTPD_CONF="/etc/apache2/httpd.conf"], [ + AC_MSG_ERROR([Could not locate Apache configuration file]) +@@ -52,7 +53,7 @@ + ]) + AC_SUBST([HTTPD_CONF]) + +-AC_CHECK_FILE([/usr/local/apache2/bin/apxs], [APXS="/usr/local/apache2/bin/apxs"], [ ++AC_CHECK_FILE([/usr/local/sbin/apxs], [APXS="/usr/local/sbin/apxs"], [ + AC_CHECK_FILE([/usr/sbin/apxs], [APXS="/usr/sbin/apxs"], [ + AC_CHECK_FILE([/usr/bin/apxs2], [APXS="/usr/bin/apxs2"], [ + AC_MSG_ERROR([Could not locate Apache apxs binary]) +@@ -61,7 +62,7 @@ + ]) + AC_SUBST([APXS]) + +-AC_CHECK_FILE([/usr/local/apache2/bin/apachectl], [APACHECTL="/usr/local/apache2/bin/apachectl"], [ ++AC_CHECK_FILE([/usr/local/sbin/apachectl], [APACHECTL="/usr/local/sbin/apachectl"], [ + AC_CHECK_FILE([/usr/sbin/apache2ctl], [APACHECTL="/usr/sbin/apache2ctl"], [ + AC_CHECK_FILE([/usr/sbin/apachectl], [APACHECTL="/usr/sbin/apachectl"], [ + AC_MSG_ERROR([Could not locate Apache apachectl binary]) diff --git a/www/mod_authnz_crowd/files/patch-src__Makefile.am b/www/mod_authnz_crowd/files/patch-src__Makefile.am new file mode 100644 index 000000000000..54a29946bae0 --- /dev/null +++ b/www/mod_authnz_crowd/files/patch-src__Makefile.am @@ -0,0 +1,29 @@ +--- ./src/Makefile.am.orig 2011-03-29 07:51:32.000000000 +0200 ++++ ./src/Makefile.am 2013-08-18 22:37:41.000000000 +0200 +@@ -3,9 +3,9 @@ + lib_LTLIBRARIES = mod_authnz_crowd.la + mod_authnz_crowd_la_SOURCES = mod_authnz_crowd.c mod_authnz_crowd.h crowd_client.c crowd_client.h cache.c cache.h util.c util.h + mod_authnz_crowd_la_LDFLAGS = -module -lcurl `xml2-config --libs` +-AM_CFLAGS = `apr-1-config --cflags` ++AM_CFLAGS = `apr-1-config --cflags | sed -e 's/O[[:digit:]]/O1/'` + AM_CPPFLAGS = -I@APACHE_INCLUDE_DIR@ `apr-1-config --cppflags --includes` `xml2-config --cflags` +-CFLAGS=-g -O1 # -O2 causes mysterious crashes ++#CFLAGS=-g -O1 # -O2 causes mysterious crashes + TESTS = test.py + TESTS_ENVIRONMENT = APACHE_BIN_DIR=@APACHE_BIN_DIR@ + +@@ -18,11 +18,6 @@ + APACHE_MODULES_DIR=@APACHE_MODULES_DIR@ CURDIR=$(CURDIR) envsubst < httpd/conf/httpd_svn.conf.in > httpd/conf/httpd_svn.conf + + install: +- cp @HTTPD_CONF@ /tmp/httpd.conf.bak +- @APXS@ -i -a mod_authnz_crowd.la +- @APXS@ -e -a -n dav_svn modules/mod_dav_svn.so +- @APXS@ -i -a svn/mod_authz_svn_crowd.la +- if [ -e /etc/apache2/mods-enabled/dav.load ]; then mv /etc/apache2/mods-enabled/dav.load /etc/apache2/mods-enabled/1dav.load; fi +- if [ -e /etc/apache2/mods-enabled/dav_svn.load ]; then mv /etc/apache2/mods-enabled/dav_svn.load /etc/apache2/mods-enabled/1dav_svn.load; fi +- @APACHECTL@ configtest || mv /tmp/httpd.conf.bak @HTTPD_CONF@ +- @APACHECTL@ graceful ++ @APXS@ -i mod_authnz_crowd.la ++ @APXS@ -e -n dav_svn modules/mod_dav_svn.so ++ @APXS@ -i svn/mod_authz_svn_crowd.la diff --git a/www/mod_authnz_crowd/files/patch-src__svn__Makefile.am b/www/mod_authnz_crowd/files/patch-src__svn__Makefile.am new file mode 100644 index 000000000000..97f4f4d072b7 --- /dev/null +++ b/www/mod_authnz_crowd/files/patch-src__svn__Makefile.am @@ -0,0 +1,11 @@ +--- ./src/svn/Makefile.am.orig 2011-03-29 07:51:32.000000000 +0200 ++++ ./src/svn/Makefile.am 2013-06-22 22:54:04.000000000 +0200 +@@ -1,6 +1,6 @@ + lib_LTLIBRARIES = mod_authz_svn_crowd.la + mod_authz_svn_crowd_la_SOURCES = mod_authz_svn_crowd.c + mod_authz_svn_crowd_la_LDFLAGS = -module +-AM_CFLAGS = `apr-1-config --cflags` ++AM_CFLAGS = `apr-1-config --cflags | sed -e 's/O[[:digit:]]/O1/'` + AM_CPPFLAGS = -I@APACHE_INCLUDE_DIR@ `apr-1-config --cppflags --includes` -I@SVN_DIR@/include/subversion-1 +-CFLAGS=-g -O1 # -O2 causes mysterious crashes ++#CFLAGS=-g -O1 # -O2 causes mysterious crashes diff --git a/www/mod_authnz_crowd/files/pkg-message.in b/www/mod_authnz_crowd/files/pkg-message.in new file mode 100644 index 000000000000..773846188c0f --- /dev/null +++ b/www/mod_authnz_crowd/files/pkg-message.in @@ -0,0 +1,14 @@ +================================================================= + +authnz_crowd apache config was installed as + %%PREFIX%%/%%APACHEETCDIR%%/Includes/zzz_authnz_crowd.conf + +To enable mod_authnz_crowd, you must ensure that the Subversion DAV +modules are enabled and loaded first, like this: + + LoadModule dav_svn_module %%APACHEMODDIR%%/mod_dav_svn.so + LoadModule authz_svn_module %%APACHEMODDIR%%/mod_authz_svn.so + + Include %%APACHEETCDIR%%/Includes/zzz_authnz_crowd.conf + +================================================================= diff --git a/www/mod_authnz_crowd/files/zzz_authnz_crowd.conf.in b/www/mod_authnz_crowd/files/zzz_authnz_crowd.conf.in new file mode 100644 index 000000000000..4507205c813d --- /dev/null +++ b/www/mod_authnz_crowd/files/zzz_authnz_crowd.conf.in @@ -0,0 +1,7 @@ +# $FreeBSD$ + +<IfModule dav_svn_module> +LoadModule authnz_crowd_module %%APACHEMODDIR%%/mod_authnz_crowd.so +LoadModule authz_svn_crowd_module %%APACHEMODDIR%%/mod_authz_svn_crowd.so +</IfModule> + diff --git a/www/mod_authnz_crowd/pkg-descr b/www/mod_authnz_crowd/pkg-descr new file mode 100644 index 000000000000..1bef7459f328 --- /dev/null +++ b/www/mod_authnz_crowd/pkg-descr @@ -0,0 +1,4 @@ +Apache 2.2 connector for Atlassian Crowd to provide authentication and +authorization support using Basic Auth. + +WWW: https://confluence.atlassian.com/display/CROWD/Integrating+Crowd+with+Apache diff --git a/www/mod_authnz_crowd/scripts/configure b/www/mod_authnz_crowd/scripts/configure new file mode 100644 index 000000000000..bd679fc9bc01 --- /dev/null +++ b/www/mod_authnz_crowd/scripts/configure @@ -0,0 +1,3 @@ +#!/bin/sh +cd ${WRKSRC} +autoreconf --install |