2014-05-27 21:22:42 +02:00
|
|
|
ejabberd-contrib
|
|
|
|
================
|
|
|
|
|
|
|
|
This is a collaborative development area for ejabberd module developers
|
|
|
|
and users.
|
|
|
|
|
|
|
|
|
|
|
|
For users
|
|
|
|
---------
|
|
|
|
|
|
|
|
To use an ejabberd module coming from this repository:
|
|
|
|
|
2015-03-11 14:19:35 +01:00
|
|
|
- You need to have Ejabberd installed.
|
2014-05-27 21:22:42 +02:00
|
|
|
|
2015-03-13 11:53:04 +01:00
|
|
|
- Run `ejabberdctl module_install <module>` to get the sources, compile and
|
|
|
|
install the beams file in ejabberd path. This path is either ~/.ejabberd-modules
|
|
|
|
or defined by CONTRIB\_MODULES\_PATH in ejabberdctl.cfg.
|
2014-05-27 21:22:42 +02:00
|
|
|
|
2015-03-11 14:19:35 +01:00
|
|
|
- Edit the configuration file provided in the `conf` dir of the installed
|
|
|
|
module to update to your needs. Then apply the changes to your main ejabberd
|
|
|
|
configuration. On future release, ejabberd will automatically add this file
|
|
|
|
to its runtime configuration without changes.
|
2014-05-27 21:22:42 +02:00
|
|
|
|
2015-03-13 11:53:04 +01:00
|
|
|
- Run `ejabberdctl module_uninstall <module>` to remove a module from ejabberd.
|
2014-05-27 21:22:42 +02:00
|
|
|
|
|
|
|
For developers
|
|
|
|
--------------
|
|
|
|
|
|
|
|
The following organization has been set up for the development:
|
|
|
|
|
2015-03-11 14:19:35 +01:00
|
|
|
- Development and compilation of modules is done by ejabberd. You need
|
2015-03-13 11:53:04 +01:00
|
|
|
Ejabberd installed. Use `ejabberdctl module_check <module>` to ensure
|
2015-03-11 14:19:35 +01:00
|
|
|
it compiles correctly before commit your work. Sources of your module
|
|
|
|
must be located in $CONTRIB\_MODULES\_PATH/sources/<module>
|
2014-05-27 21:22:42 +02:00
|
|
|
|
2015-04-22 12:03:20 +02:00
|
|
|
- Compilation can by done manually (if you know what you are doing)
|
|
|
|
so you don't need ejabberd running:
|
|
|
|
```
|
|
|
|
cd /path/of/module
|
|
|
|
mkdir ebin
|
|
|
|
/path/of/ejabberd's/erlc \
|
|
|
|
-o ebin \
|
|
|
|
-I include -I /path/of/ejabberd/lib/ejabberd-XX.YY/include \
|
|
|
|
-DLAGER -DNO_EXT_LIB \
|
|
|
|
src/*erl
|
|
|
|
```
|
|
|
|
|
2014-05-27 21:22:42 +02:00
|
|
|
- The module directory structure is usually the following:
|
|
|
|
* `README.txt`: Module description.
|
2015-03-11 14:19:35 +01:00
|
|
|
* `COPYING`: License for the module.
|
2014-05-27 21:22:42 +02:00
|
|
|
* `doc/`: Documentation directory.
|
2015-03-11 14:19:35 +01:00
|
|
|
* `src/`: Erlang source directory.
|
|
|
|
* `lib/`: Elixir source directory.
|
|
|
|
* `priv/msgs/`: Directory with translation files (pot, po and msg).
|
|
|
|
* `conf/<module>.yml`: Configuration for your module.
|
|
|
|
* `<module>.spec`: Yaml description file for your module.
|
2014-05-27 21:22:42 +02:00
|
|
|
|
|
|
|
- Module developers should note in the `README.txt` file whether the
|
2015-03-11 14:19:35 +01:00
|
|
|
module has requirements or known incompatibilities with other modules.
|