... and core

This commit is contained in:
espie 2012-04-10 12:52:32 +00:00
parent 2ac16998d0
commit 875b4357b8
7 changed files with 1333 additions and 0 deletions

31
www/drupal7/core/Makefile Normal file
View File

@ -0,0 +1,31 @@
# $OpenBSD: Makefile,v 1.1 2012/04/10 12:52:32 espie Exp $
COMMENT = powerful content management system
MAINTAINER = Marc Espie <espie@openbsd.org>
DISTNAME = drupal-7.12
PKGNAME = drupal-7.12
DISTFILES= ${DISTNAME}${EXTRACT_SUFX}
MODULES = lang/php
RUN_DEPENDS = php-pdo_mysql-${MODPHP_VSPEC}|php-pdo_sqlite-${MODPHP_VSPEC}|php-pdo_pgsql-${MODPHP_VSPEC}:lang/php/${MODPHP_VERSION},-pdo_sqlite \
lang/php/${MODPHP_VERSION},-gd
do-install:
mkdir -p ${PREFIX}/${DRUPAL_ROOT}
# copy base distrib
cp -R ${WRKDIST}/* ${PREFIX}/${DRUPAL_ROOT}
# copy config file
perl -p \
-e 's@\$$\{DRUPAL_ROOT\}@${DRUPAL_ROOT}@g;' \
-e 's@\$$\{DRUPAL\}@${DRUPAL}@g;' \
<${FILESDIR}/drupal.conf \
>${PREFIX}/${DRUPAL_ROOT}/misc/drupal.conf
chown -R ${DRUPAL_OWNER}.${DRUPAL_GROUP} ${PREFIX}/${DRUPAL_ROOT}
install -d -g www -m 460 ${PREFIX}/${DRUPAL_ROOT}/sites/default/files
# chmod 640 ${PREFIX}/${DRUPAL_ROOT}/sites/default/default.settings.php
# chgrp www ${PREFIX}/${DRUPAL_ROOT}/sites/default/default.settings.php
${INSTALL_DATA_DIR} ${PREFIX}/${DRUPAL_MODS}
${INSTALL_DATA_DIR} ${PREFIX}/${DRUPAL_THEMES}
.include <bsd.port.mk>

View File

@ -0,0 +1,5 @@
MD5 (drupal7/drupal-7.12.tar.gz) = 2yKEvrlyQcm9ypxjjNik8Q==
RMD160 (drupal7/drupal-7.12.tar.gz) = Eq/kYaaNTsWZITlc2+oMXM63l2c=
SHA1 (drupal7/drupal-7.12.tar.gz) = qgyF8sOEyebn4SidFxr982C783Y=
SHA256 (drupal7/drupal-7.12.tar.gz) = 4IcCt92WPpUXltozcRJMp/ixsTrxAm8BTRDXT1Ir+d0=
SIZE (drupal7/drupal-7.12.tar.gz) = 3088472

View File

@ -0,0 +1,53 @@
# $OpenBSD: drupal.conf,v 1.1 2012/04/10 12:52:32 espie Exp $
# Written by Marc Espie, public domain
# vim:filetype=apache:
<IfModule !mod_rewrite.c>
LoadModule rewrite_module /usr/lib/apache/modules/mod_rewrite.so
</IfModule>
<Directory /var/www/${DRUPAL_ROOT}>
# Allows simple urls
RewriteEngine on
RewriteBase /${DRUPAL}
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
# Protect files and directories from prying eyes.
<FilesMatch "\.(engine|inc|info|install|module|profile|po|sh|.*sql|theme|tpl(\.php)?|xtmpl)$|^(code-style\.pl|Entries.*|Repository|Root|Tag|Template)$">
Order allow,deny
</FilesMatch>
# Don't show directory listings for URLs which map to a directory.
Options -Indexes
# Follow symbolic links in this directory.
Options +FollowSymLinks
# Customized error messages.
ErrorDocument 404 /index.php
# Set the default handler.
DirectoryIndex index.php
# Override PHP settings. More in sites/default/settings.php
<IfModule mod_php5.c>
php_value magic_quotes_gpc 0
php_value register_globals 0
php_value session.auto_start 0
php_value mbstring.http_input pass
php_value mbstring.http_output pass
php_value mbstring.encoding_translation 0
</IfModule>
# Requires mod_expires to be enabled.
<IfModule mod_expires.c>
# Enable expirations.
ExpiresActive On
# Cache all files for 2 weeks after access (A).
ExpiresDefault A1209600
# Do not cache dynamically generated pages.
ExpiresByType text/html A1
</IfModule>
</Directory>

View File

@ -0,0 +1,19 @@
Drupal is a powerful and flexible content management system.
Some of its appealing features:
- role-based permission system. Easy to set up exactly the roles you
need that match your organisation. Each content-type can be set up
per role (submission, approval, viewing rights).
- automated generation of tables through a view system. There's mostly
no need for static structure.
- powerful indexing capabilities through keywords organized in hierarchical
vocabularies (taxonomies).
- nice localization features. Missing translations can be supplied `on the fly'.
- url aliases for `nice site' look-ups.
- integrated downloads and uploads, so that external documents can be part
of your site.
- extensible content forms with typed fields (e.g., starting date).
- sensible security: mixed sites where the login url goes through https do
work without needing to change everything all over the place

1175
www/drupal7/core/pkg/PLIST Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,42 @@
$OpenBSD: README,v 1.1 2012/04/10 12:52:32 espie Exp $
To enable a decent configuration of drupal, please create a symbolic
link:
ln -sf ../modules.sample/${DRUPAL}.conf \
${TRUEPREFIX}/conf/modules
If you just want to try out drupal, you don't need any database server,
an sqlite file will do just fine.
In order to run with standard OpenBSD chroot'ed httpd:
- make sure you can connect to your database.
Create a directory for the mysql socket.
mkdir -p /var/www/var/run/mysql
Adjust ${SYSCONFDIR}/my.cnf to put the mysql socket into the chroot.
[client]
socket = /var/www/var/run/mysql/mysql.sock
[mysqld]
socket = /var/www/var/run/mysql/mysql.sock
Don't forget to set the character set to utf8 in your database.
In mysql, assuming you're connected as admin initially.
create user drupal@localhost identified by 'password';
create database drupal character set utf8;
grant all on drupal.* to drupal@localhost;
In postgresql, assuming an `admin' account has all rights:
createuser -U admin --pwprompt --no-superuser --createdb --no-createrole drupal
createdb -U drupal -E UTF8 drupal
Updating from a drupal6 installation:
- to do

View File

@ -0,0 +1,8 @@
Your database is still there.
In mysql, if you want to finish wiping it out, you probably want to do
something like:
drop database drupal;
drop user drupal;