Skip to content

Commit c790961

Browse files
authored
Merge pull request #26 from johndoh/roundcube-skin
add support for packages of type roundcube-skin, fix sql execution an…
2 parents 3701ac8 + 4761c67 commit c790961

7 files changed

Lines changed: 610 additions & 472 deletions

File tree

README.md

Lines changed: 49 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
# Plugin Installer for Roundcube
22

3-
This installer ensures that plugins end up in the correct directory:
3+
This installer ensures that plugins and skins end up in the correct directory:
44

5-
* `<roundcube-root>/plugins/plugin-name`
5+
* Plugins - `<roundcube-root>/plugins/plugin-name`
6+
* Skins - `<roundcube-root>/skins/skin-name`
67

78
## Minimum setup
89

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

1415
{
15-
"name": "yourvendor/plugin-name",
16-
"license": "the license",
17-
"description": "tell the world what your plugin is good at",
16+
"name": "<your-vendor-name>/<plugin-name>",
1817
"type": "roundcube-plugin",
19-
"authors": [
20-
{
21-
"name": "<your-name>",
22-
"email": "<your-email>"
23-
}
24-
],
25-
"repositories": [
26-
{
27-
"type": "composer",
28-
"url": "http://plugins.roundcube.net"
29-
}
30-
]
18+
"license": "GPL-3.0+",
3119
"require": {
32-
"roundcube/plugin-installer": "*"
33-
},
34-
"minimum-stability": "dev-master"
20+
"roundcube/plugin-installer": ">=0.3.0"
21+
}
3522
}
3623

37-
* Submit your plugin to [plugins.roundcube.net](http://plugins.roundcube.net).
24+
### sample composer.json for skins
25+
26+
{
27+
"name": "<your-vendor-name>/<skin-name>",
28+
"type": "roundcube-skin",
29+
"license": "GPL-3.0+",
30+
"require": {
31+
"roundcube/plugin-installer": ">=0.3.0"
32+
}
33+
}
34+
35+
## Roundcube specific composer.json params
36+
37+
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.
38+
`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.
39+
40+
"extra": {
41+
"roundcube": {
42+
"min-version": "1.4.0",
43+
"sql-dir": "./SQL",
44+
"post-install-script": "./bin/install.sh",
45+
"post-update-script": "./bin/update.sh",
46+
"persistent-files": ["config.inc.php", "skins/elastic/_custom.less"]
47+
}
48+
}
49+
50+
## Configuration
51+
52+
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.
53+
When uninstalling packages Composer will not remove the folder. To remove the folder set `uninstall-remove-folder` in your config.
54+
55+
"config": {
56+
"roundcube": {
57+
"enable-plugin": true,
58+
"enable-skin": true,
59+
"uninstall-remove-folder": true
60+
}
61+
}
62+
63+
## Repository
64+
65+
Submit your plugin or skin to [Packagist](https://packagist.org/).
3866

3967
## Installation
4068

composer.json

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "roundcube/plugin-installer",
3-
"description": "A composer-installer for Roundcube plugins.",
4-
"type": "composer-installer",
3+
"description": "A composer-installer for Roundcube plugins and skins.",
4+
"type": "composer-plugin",
55
"license": "GPL-3.0+",
66
"authors": [
77
{
@@ -11,6 +11,10 @@
1111
{
1212
"name": "Till Klampaeckel",
1313
"email": "till@php.net"
14+
},
15+
{
16+
"name": "Philip Weir",
17+
"email": "roundcube@tehinterweb.co.uk"
1418
}
1519
],
1620
"autoload": {
@@ -19,13 +23,12 @@
1923
}
2024
},
2125
"extra": {
22-
"class": "Roundcube\\Composer\\PluginInstaller"
26+
"class": [
27+
"Roundcube\\Composer\\RoundcubeInstaller"
28+
]
2329
},
24-
"bin": [
25-
"src/bin/rcubeinitdb.sh"
26-
],
2730
"require": {
28-
"php": ">=5.3.0"
31+
"composer-plugin-api": "^1.0 || ^2.0"
2932
},
3033
"require-dev": {
3134
"composer/composer": "*"

0 commit comments

Comments
 (0)