diff options
author | adrianp <adrianp> | 2008-10-24 18:52:31 +0000 |
---|---|---|
committer | adrianp <adrianp> | 2008-10-24 18:52:31 +0000 |
commit | 3d6e63f48f71fdceacd55ce4f367fb25965c3479 (patch) | |
tree | 3d9e7e1a1cd60f32e1ffa2c95b0756de62205c07 /www | |
parent | c6c4caa5513b6366beba9e938135b2a0b44f6fa7 (diff) | |
download | pkgsrc-3d6e63f48f71fdceacd55ce4f367fb25965c3479.tar.gz |
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 (limited to 'www')
-rw-r--r-- | www/drupal6/Makefile | 21 | ||||
-rw-r--r-- | www/drupal6/PLIST | 6 | ||||
-rw-r--r-- | www/drupal6/options.mk | 19 |
3 files changed, 29 insertions, 17 deletions
diff --git a/www/drupal6/Makefile b/www/drupal6/Makefile index 756adde7342..3ac33a11687 100644 --- a/www/drupal6/Makefile +++ b/www/drupal6/Makefile @@ -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 @@ COMMENT= Open source content management system 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 @@ DOCS= CHANGELOG.txt COPYRIGHT.txt INSTALL.mysql.txt \ 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+= ${PREFIX}/share/examples/drupal/default.profile \ 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|@DRUPAL@|${DRUPAL}|g" 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 @@ do-install: ${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 --git a/www/drupal6/PLIST b/www/drupal6/PLIST index 1f15be917f6..9ea2179d528 100644 --- a/www/drupal6/PLIST +++ b/www/drupal6/PLIST @@ -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 @@ share/examples/drupal/drupal.conf @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 @@ share/examples/drupal/drupal.conf @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 --git a/www/drupal6/options.mk b/www/drupal6/options.mk index b126e2f6ab5..35ab1c4f6bf 100644 --- a/www/drupal6/options.mk +++ b/www/drupal6/options.mk @@ -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}-domxml>=4.3.3:../../textproc/php4-domxml 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 |