diff options
Diffstat (limited to 'www/mod_auth_mysql_another/Makefile')
-rw-r--r-- | www/mod_auth_mysql_another/Makefile | 81 |
1 files changed, 33 insertions, 48 deletions
diff --git a/www/mod_auth_mysql_another/Makefile b/www/mod_auth_mysql_another/Makefile index 2826e7baedf6..d63fcbcf4ae1 100644 --- a/www/mod_auth_mysql_another/Makefile +++ b/www/mod_auth_mysql_another/Makefile @@ -5,72 +5,57 @@ # $FreeBSD$ PORTNAME= mod_auth_mysql_another -PORTVERSION= 1.0 +PORTVERSION= 2.0 CATEGORIES= www -MASTER_SITES= ftp://ftp.kcilink.com/pub/ +MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} +MASTER_SITE_SUBDIR= modauthmysql DISTNAME= mod_auth_mysql -EXTRACT_SUFX= .c.gz +EXTRACT_SUFX= .tgz MAINTAINER= mbr@FreeBSD.org COMMENT= Allows users to use MySQL databases for user authentication -BUILD_DEPENDS= ${PREFIX}/sbin/apxs:${PORTSDIR}/www/${AP_PORT} -LIB_DEPENDS= mysqlclient.10:${PORTSDIR}/databases/mysql323-client -RUN_DEPENDS= ${PREFIX}/sbin/${AP_TARGET}:${PORTSDIR}/www/${AP_PORT} - .include <bsd.port.pre.mk> -APXS= ${PREFIX}/sbin/apxs - -AP_PORT?= apache13 -.if exists(${APXS}) -APXS_WORKS!= ${APXS} -q TARGET 2>/dev/null || echo no -.endif -.if exists(${APXS}) && ${APXS_WORKS} != no -AP_TARGET!= ${APXS} -q TARGET -AP_SYSCONF!= ${APXS} -q SYSCONFDIR -AP_INCLUDE!= ${APXS} -q INCLUDEDIR -AP_LIBEXEC!= ${APXS} -q LIBEXECDIR +.if exists(${LOCALBASE}/lib/mysql/libmysqlclient.so.10) +LIB_DEPENDS= mysqlclient.10:${PORTSDIR}/databases/mysql323-client .else -AP_TARGET?= httpd -AP_SYSCONF?= ${PREFIX}/etc/apache -AP_INCLUDE?= ${PREFIX}/include/apache -AP_LIBEXEC?= ${PREFIX}/libexec/apache +.if exists(${LOCALBASE}/lib/mysql/libmysqlclient.so.14) +LIB_DEPENDS= mysqlclient.14:${PORTSDIR}/databases/mysql41-client +.else +LIB_DEPENDS= mysqlclient.12:${PORTSDIR}/databases/mysql40-client +.endif .endif -AUTH_MYSQL_DOCS= apache/manual/mod/mod_auth_mysql_another - -PLIST_SUB= AUTH_MYSQL_DOCS="${AUTH_MYSQL_DOCS}" +.if exists(${LOCALBASE}/include/apache2/apr.h) +WITH_APACHE2= yes +.endif -PKGMESSAGE= ${WRKSRC}/.install_notes +APXS= ${LOCALBASE}/sbin/apxs -do-extract: - @${RM} -rf ${WRKDIR} - @${MKDIR} -p ${WRKDIR}/mod_auth_mysql - @for file in ${EXTRACT_ONLY}; do \ - ${CP} ${_DISTDIR}/$$file ${WRKDIR}/mod_auth_mysql; \ - ${EXTRACT_CMD} -d ${WRKDIR}/mod_auth_mysql/$$file; \ - done -.if !defined(EXTRACT_PRESERVE_OWNERSHIP) - @if [ `id -u` = 0 ]; then \ - ${CHMOD} -R ug-s ${WRKDIR}; \ - ${CHOWN} -R 0:0 ${WRKDIR}; \ - fi +.if defined(WITH_APACHE2) +APACHE_PORT= ${PORTSDIR}/www/apache2 +APACHE_VER= APACHE2 +PLIST_SUB= VER="2" +DSO= mod_auth_mysql.la +.else +APACHE_PORT= ${PORTSDIR}/www/apache13 +APACHE_VER= APACHE1 +PLIST_SUB= VER="" +DSO= mod_auth_mysql.so .endif +BUILD_DEPENDS= ${APXS}:${APACHE_PORT} +RUN_DEPENDS= ${APXS}:${APACHE_PORT} + post-patch: - @${CP} ${WRKDIR}/mod_auth_mysql/Makefile ${WRKDIR}/mod_auth_mysql/Makefile.new - @(${SED} -e 's|%%PREFIX%%|${PREFIX}|g' | \ - ${SED} -e 's|%%APXS%%|${APXS}|g' | \ - ${SED} -e 's|%%APXSFLAGS%%|${APXSFLAGS}|g') \ - < ${WRKDIR}/mod_auth_mysql/Makefile.new \ - > ${WRKDIR}/mod_auth_mysql/Makefile + @${SED} 's|%%LOCALBASE%%|${LOCALBASE}|g;s|%%APXS%%|${APXS}|g;s|%%APACHE_VER%%|${APACHE_VER}|g;s|%%DSO%%|${DSO}|g' \ + ${WRKDIR}/mod_auth_mysql/Makefile.orig > ${WRKDIR}/mod_auth_mysql/Makefile -post-install: .if !defined(NOPORTDOCS) - @${MKDIR} ${PREFIX}/share/doc/${AUTH_MYSQL_DOCS} - @${INSTALL_DATA} ${FILESDIR}/USAGE ${PREFIX}/share/doc/${AUTH_MYSQL_DOCS} - @@(cd ${PREFIX}/share/doc && ${LN} -sf ${PREFIX}/share/doc/${AUTH_MYSQL_DOCS} mod_auth_mysql_another) +post-install: + @${MKDIR} ${DOCSDIR} + @${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR} .endif .include <bsd.port.post.mk> |