Compiling a module for dummies

Hello,

I installed Ejabberd on Debian "Out-Of-The-Box" and it worked well from the beginning. I started to configure it to my needs, which was no problem a all. I got brave an started to build an own Sign-Up-System with PHP and Shell-Scripting, which worked flawless, too. Unfortunately I had to realize, that there is no way to prevent users from altering their Vcard-Information, so I googled and found a little tweak for mod_vcard, which would perfectly solve my problem.

And now I went into the dark. I guess I have understood, that I have to compile the modified mod_vcard.erl to somehow get an mod_vcard.beam. I tried everything I could find on the web - without success. I guess I simply have not enough background knowledge to come to an solution by myself.

Can someone help my out and explain to me what I have to do to compile a single module on an Debian-Installation of Ejabberd 2.1.13?

Thousand thanks in advance,
Jos

Maybe the Debian system

Maybe the Debian system provides some semi-automated way, but I'll tell you the manual long way:
1. Download the source code of the ejabberd version you are using. From https://packages.debian.org/sid/ejabberd or from github, or from source package.
2. Make sure you have erlang and related packages installed: apt-get install erlang
3. Compile ejabberd. This is to make sure ejabberd itself compiles. More or less: ./configure; make
4. Modify mod_vcard.erl
5. Compile again: make
6. Copy mod_vcard.beam to the place where Debian puts ejabberd binaries.

The first time it will take you some hours. The second time minutes, and you can customize anything you want.

Syndicate content