Skip to content

Instantly share code, notes, and snippets.

@smithcommajoseph
Created November 2, 2011 16:35
Show Gist options
  • Save smithcommajoseph/1334127 to your computer and use it in GitHub Desktop.
Save smithcommajoseph/1334127 to your computer and use it in GitHub Desktop.
D6 feature server Drush makefile + install profile
<?php
/**
* Return a description of the profile for the initial installation screen.
*
* @return
* An array with keys 'name' and 'description' describing this profile.
*/
function feature_server_profile_details() {
return array(
'name' => 'Feature Server',
'description' => 'Select this profile to deploy a feature server.'
);
}
/**
* Return an array of the modules to be enabled when this profile is installed.
*
* @return
* An array of modules to be enabled.
*/
function feature_server_profile_modules() {
return array(
/* optional core */
'menu', 'comment', 'color', 'dblog', 'help', 'taxonomy',
/* other contrib */
'install_profile_api', 'content', 'number', 'filefield', 'optionwidgets', 'text', 'nodereference', 'views', 'ctools', 'strongarm', 'features', 'context', 'fserver',
);
}
/**
* Implementation of hook_profile_tasks().
*/
function feature_server_profile_tasks() {
// Install the core required modules and our extra modules
$core_required = array('block', 'filter', 'node', 'system', 'user');
install_include(array_merge(feature_server_profile_modules(), $core_required));
// Make a 'maintainer' role
install_add_role('maintainer');
$rid = install_get_rid('maintainer');
// Set some permissions for the role
$perms = array(
'access content',
'create fserver_project content',
'create fserver_release content',
'edit own fserver_project content',
'edit own fserver_release content',
'delete own fserver_project content',
'delete own fserver_release content',
'access comments',
'post comments without approval',
);
install_add_permissions($rid, $perms);
// Change anonymous user's permissions - since anonymous user is always rid 1 we don't need to retrieve it
$perms = array(
'access content',
'access comments',
'post comments',
);
install_add_permissions(1, $perms);
// Enable the Tao subtheme
install_enable_theme("tao");
// Enable default theme
install_default_theme("singular");
// Put the navigation block in the sidebar because the sidebar looks awesome.
install_init_blocks();
// Recent comments
install_set_block('user', 1, 'singular', 'right');
// call rebuild - this makes the cck fields 'associate' to their node types properly
features_rebuild();
// Set the front page to be fserver
variable_set('site_frontpage', 'fserver');
}
core = 6.x
api = 2
; CVS checkout of Drupal 6.x
projects[drupal][type] = "core"
projects[drupal][download][type] = "cvs"
projects[drupal][download][root] = ":pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal"
projects[drupal][download][revision] = "DRUPAL-6"
projects[drupal][download][module] = "drupal"
projects[install_profile_api][subdir] = contrib
projects[cck][subdir] = contrib
projects[context][subdir] = contrib
projects[features][subdir] = contrib
projects[filefield][subdir] = contrib
projects[strongarm][subdir] = contrib
projects[ctools][subdir] = contrib
projects[views][subdir] = contrib
projects[fserver][type] = module
projects[fserver][download][type] = git
projects[fserver][download][url] = git://github.com/developmentseed/FeatureServer.git
projects[singular][type] = theme
projects[singular][download][type] = git
projects[singular][download][url] = git://github.com/developmentseed/singular.git
projects[tao][type] = theme
projects[tao][download][type] = git
projects[tao][download][url] = git://github.com/developmentseed/tao.git
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment