Skip to content

Commit

Permalink
Merge pull request #26 from johndoh/roundcube-skin
Browse files Browse the repository at this point in the history
add support for packages of type roundcube-skin, fix sql execution an…
  • Loading branch information
thomascube authored Jun 19, 2021
2 parents 3701ac8 + 4761c67 commit c790961
Show file tree
Hide file tree
Showing 7 changed files with 610 additions and 472 deletions.
70 changes: 49 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Plugin Installer for Roundcube

This installer ensures that plugins end up in the correct directory:
This installer ensures that plugins and skins end up in the correct directory:

* `<roundcube-root>/plugins/plugin-name`
* Plugins - `<roundcube-root>/plugins/plugin-name`
* Skins - `<roundcube-root>/skins/skin-name`

## Minimum setup

Expand All @@ -12,29 +13,56 @@ This installer ensures that plugins end up in the correct directory:
### sample composer.json for plugins

{
"name": "yourvendor/plugin-name",
"license": "the license",
"description": "tell the world what your plugin is good at",
"name": "<your-vendor-name>/<plugin-name>",
"type": "roundcube-plugin",
"authors": [
{
"name": "<your-name>",
"email": "<your-email>"
}
],
"repositories": [
{
"type": "composer",
"url": "http://plugins.roundcube.net"
}
]
"license": "GPL-3.0+",
"require": {
"roundcube/plugin-installer": "*"
},
"minimum-stability": "dev-master"
"roundcube/plugin-installer": ">=0.3.0"
}
}

* Submit your plugin to [plugins.roundcube.net](http://plugins.roundcube.net).
### sample composer.json for skins

{
"name": "<your-vendor-name>/<skin-name>",
"type": "roundcube-skin",
"license": "GPL-3.0+",
"require": {
"roundcube/plugin-installer": ">=0.3.0"
}
}

## Roundcube specific composer.json params

For both plugins and skins you can, optionally, add the following section to your `composer.json` file. All properties are optional and provided below with example values.
`persistent-files` defines a list of files which should be maintained across updates. By default only `config.inc.php` is maintained. The array should contain paths relative to the root of your plugin.

"extra": {
"roundcube": {
"min-version": "1.4.0",
"sql-dir": "./SQL",
"post-install-script": "./bin/install.sh",
"post-update-script": "./bin/update.sh",
"persistent-files": ["config.inc.php", "skins/elastic/_custom.less"]
}
}

## Configuration

This installer will ask if you want to enable each plugin or skin as it is installed. To always enable all plugins or skins add `enable-plugin`/`enable-skin` to the `config` section in the `composer.json` in the root of your Roundcube directory.
When uninstalling packages Composer will not remove the folder. To remove the folder set `uninstall-remove-folder` in your config.

"config": {
"roundcube": {
"enable-plugin": true,
"enable-skin": true,
"uninstall-remove-folder": true
}
}

## Repository

Submit your plugin or skin to [Packagist](https://packagist.org/).

## Installation

Expand Down
17 changes: 10 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "roundcube/plugin-installer",
"description": "A composer-installer for Roundcube plugins.",
"type": "composer-installer",
"description": "A composer-installer for Roundcube plugins and skins.",
"type": "composer-plugin",
"license": "GPL-3.0+",
"authors": [
{
Expand All @@ -11,6 +11,10 @@
{
"name": "Till Klampaeckel",
"email": "[email protected]"
},
{
"name": "Philip Weir",
"email": "[email protected]"
}
],
"autoload": {
Expand All @@ -19,13 +23,12 @@
}
},
"extra": {
"class": "Roundcube\\Composer\\PluginInstaller"
"class": [
"Roundcube\\Composer\\RoundcubeInstaller"
]
},
"bin": [
"src/bin/rcubeinitdb.sh"
],
"require": {
"php": ">=5.3.0"
"composer-plugin-api": "^1.0 || ^2.0"
},
"require-dev": {
"composer/composer": "*"
Expand Down
Loading

0 comments on commit c790961

Please sign in to comment.