pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/www/drupal6 Fix PLIST issues when using binary package...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/381eb487900b
branches:  trunk
changeset: 548837:381eb487900b
user:      adrianp <adrianp%pkgsrc.org@localhost>
date:      Fri Oct 24 18:52:31 2008 +0000

description:
Fix PLIST issues when using binary packages - spotted by martti@
After some feedback from Roy Marples set up the package so it's easier
 to get drupal to run under other web servers than apache.  As the
 default web server, apache will remain.  Users can disable it using
 the options.mk framework.
Rename APACHE_* variables to WWW_* and set some sane defaults.

diffstat:

 www/drupal6/Makefile   |  21 ++++++++++-----------
 www/drupal6/PLIST      |   6 +++---
 www/drupal6/options.mk |  19 ++++++++++++++++---
 3 files changed, 29 insertions(+), 17 deletions(-)

diffs (140 lines):

diff -r 32fe53e1f382 -r 381eb487900b www/drupal6/Makefile
--- a/www/drupal6/Makefile      Fri Oct 24 18:41:21 2008 +0000
+++ b/www/drupal6/Makefile      Fri Oct 24 18:52:31 2008 +0000
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.8 2008/10/23 21:37:23 adrianp Exp $
+# $NetBSD: Makefile,v 1.9 2008/10/24 18:52:31 adrianp Exp $
 
 DISTNAME=      drupal-6.6
+PKGREVISION=   1
 CATEGORIES=    www
 MASTER_SITES=  http://drupal.org/files/projects/
 
@@ -10,7 +11,6 @@
 
 CONFLICTS+=    drupal-5.*{,nb*}
 
-DEPENDS+=      ${APACHE_PKG_PREFIX}-${PHP_PKG_PREFIX}>=4.3.5:../../www/ap-php
 DEPENDS+=      ${PHP_PKG_PREFIX}-gd>=4.3.5:../../graphics/php-gd
 
 NO_BUILD=      YES
@@ -20,17 +20,17 @@
                INSTALL.pgsql.txt INSTALL.txt LICENSE.txt \
                MAINTAINERS.txt UPGRADE.txt
 
-PKG_GROUPS_VARS+=      APACHE_GROUP
-PKG_USERS_VARS+=       APACHE_USER
+PKG_GROUPS_VARS+=      WWW_GROUP
+PKG_USERS_VARS+=       WWW_USER
 
-BUILD_DEFS+=           APACHE_USER APACHE_GROUP
+BUILD_DEFS+=           WWW_USER WWW_GROUP
 USE_TOOLS+=            perl:run pax
 REPLACE_PERL=          scripts/code-style.pl
 
 OWN_DIRS_PERMS+=       ${DRUPAL}/sites/default \
-                       ${APACHE_USER} ${APACHE_GROUP} 0750
+                       ${WWW_USER} ${WWW_GROUP} 0750
 OWN_DIRS_PERMS+=       ${DRUPAL}/files \
-                       ${APACHE_USER} ${APACHE_GROUP} 0750
+                       ${WWW_USER} ${WWW_GROUP} 0750
 
 CONF_FILES=    ${PREFIX}/share/examples/drupal/drupal.conf \
                ${PKG_SYSCONFDIR}/drupal.conf
@@ -39,7 +39,7 @@
 
 CONF_FILES_PERMS+=     ${PREFIX}/share/examples/drupal/default.settings.php \
                        ${DRUPAL}/sites/default/default.settings.php \
-                       ${APACHE_USER} ${APACHE_GROUP} 0640
+                       ${WWW_USER} ${WWW_GROUP} 0640
 
 SUBST_CLASSES+=                conf
 SUBST_STAGE.conf=      pre-install
@@ -48,7 +48,6 @@
 SUBST_SED.conf+=       -e "s|/usr/bin/php|${PREFIX}/bin/php|g"
 SUBST_MESSAGE.conf=    Fixing configuration files.
 
-.include "../../mk/apachever.mk"
 .include "../../lang/php/phpversion.mk"
 
 .if ${PKG_PHP_VERSION} == "4"
@@ -87,14 +86,14 @@
        ${INSTALL_DATA} ${WRKSRC}/*.php ${DRUPAL}
 
 .      for i in ${PAX_DIRS}
-               cd ${WRKSRC}/${i} && pax -rw . ${DRUPAL}/${i}
+               cd ${WRKSRC}/${i} && ${PAX} -rw . ${DRUPAL}/${i}
 .      endfor
 
 .      for i in ${DOCS}
                ${INSTALL_DATA} ${WRKSRC}/${i} ${PREFIX}/share/doc/drupal
 .      endfor
 
-       ${CHOWN} ${APACHE_USER}:${APACHE_GROUP} ${DRUPAL}/files
+       ${CHOWN} ${WWW_USER}:${WWW_GROUP} ${DRUPAL}/files
        ${CHMOD} 0770 ${DRUPAL}/files
 
 post-install:
diff -r 32fe53e1f382 -r 381eb487900b www/drupal6/PLIST
--- a/www/drupal6/PLIST Fri Oct 24 18:41:21 2008 +0000
+++ b/www/drupal6/PLIST Fri Oct 24 18:52:31 2008 +0000
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.1.1.1 2008/04/06 10:15:27 adrianp Exp $
+@comment $NetBSD: PLIST,v 1.2 2008/10/24 18:52:31 adrianp Exp $
 share/doc/drupal/CHANGELOG.txt
 share/doc/drupal/COPYRIGHT.txt
 share/doc/drupal/INSTALL.mysql.txt
@@ -475,8 +475,6 @@
 @dirrm share/drupal/themes/chameleon
 @dirrm share/drupal/themes/bluemarine
 @dirrm share/drupal/themes
-@dirrm share/drupal/sites/all
-@dirrm share/drupal/sites
 @dirrm share/drupal/scripts
 @dirrm share/drupal/modules/user
 @dirrm share/drupal/modules/upload
@@ -517,6 +515,8 @@
 @dirrm share/drupal/misc
 @dirrm share/drupal/includes
 @exec ${MKDIR} %D/share/drupal/files
+@unexec ${RMDIR} %D/share/drupal/sites/all 2>/dev/null || ${TRUE}
+@unexec ${RMDIR} %D/share/drupal/sites 2>/dev/null || ${TRUE}
 @unexec ${RMDIR} %D/share/drupal/files 2>/dev/null || ${TRUE}
 @unexec ${RMDIR} %D/share/drupal 2>/dev/null || ${TRUE}
 @dirrm share/doc/drupal
diff -r 32fe53e1f382 -r 381eb487900b www/drupal6/options.mk
--- a/www/drupal6/options.mk    Fri Oct 24 18:41:21 2008 +0000
+++ b/www/drupal6/options.mk    Fri Oct 24 18:52:31 2008 +0000
@@ -1,12 +1,12 @@
-# $NetBSD: options.mk,v 1.1.1.1 2008/04/06 10:15:27 adrianp Exp $
+# $NetBSD: options.mk,v 1.2 2008/10/24 18:52:31 adrianp Exp $
 
 PKG_OPTIONS_VAR=       PKG_OPTIONS.drupal
 
 PKG_OPTIONS_REQUIRED_GROUPS=   db
 PKG_OPTIONS_GROUP.db=          mysql pgsql
 
-PKG_SUPPORTED_OPTIONS= drupal-xmlservices
-PKG_SUGGESTED_OPTIONS= mysql drupal-xmlservices
+PKG_SUPPORTED_OPTIONS= drupal-xmlservices apache
+PKG_SUGGESTED_OPTIONS= mysql drupal-xmlservices apache
 
 .include "../../mk/bsd.options.mk"
 
@@ -35,3 +35,16 @@
 DEPENDS+=      ${PHP_PKG_PREFIX}-dom-[0-9]*:../../textproc/php5-dom
 .      endif
 .endif
+
+###
+### Drupal can run on a number of web servers, we support apache by default
+###
+.if !empty(PKG_OPTIONS:Mapache)
+DEPENDS+=      ${APACHE_PKG_PREFIX}-${PHP_PKG_PREFIX}>=4.3.5:../../www/ap-php
+.      include "../../mk/apachever.mk"
+WWW_USER?=     ${APACHE_USER}
+WWW_GROUP?=    ${APACHE_GROUP}
+.else
+WWW_USER?=     ${ROOT_USER}
+WWW_GROUP?=    ${ROOT_GROUP}
+.endif



Home | Main Index | Thread Index | Old Index