From 8bb8f84c7c222ee3cced4fcd89f0ad6a1811bfb8 Mon Sep 17 00:00:00 2001 From: Gabriele Santomaggio Date: Sat, 2 Jul 2016 15:54:56 +0200 Subject: update readme --- README.md | 84 ++++++++++++++++++++++++++++++++++----------------------------- 1 file changed, 45 insertions(+), 39 deletions(-) diff --git a/README.md b/README.md index b9b2abc..79b754e 100644 --- a/README.md +++ b/README.md @@ -1,54 +1,60 @@ -`sd_notify` Erlang interface for Centos 7 and Debian ---- -This adds the `sd_notify` to the Centos erlang package. -Tested it starting for zero-dependencies RabbitMQ package ([github](https://github.com/rabbitmq/erlang-rpm) - [binany](https://www.rabbitmq.com/releases/erlang/) ) +Erlang systemd-notify +=============== +Erlang module for native access to the `systemd-notify` facilities. -Build from source `RPM` -- +Build status: [![Build Status](https://travis-ci.org/systemd/erlang-sd_notify.svg?branch=master)](https://travis-ci.org/systemd/erlang-sd_notify) - 1. `docker build -t sd_rpm .` - 2. `make` - +Installation +============ - -Download the binary -- -https://github.com/systemd/erlang-sd_notify/releases +On Fedora/CentOS + +```bash + extract the tar.gz + mkdir -p /usr/lib64/erlang/lib/sd_notify-0.10/priv/ + mkdir -p /usr/lib64/erlang/lib/sd_notify-0.10/ebin/ + cp priv/* /usr/lib64/erlang/lib/sd_notify-0.10/priv/ + cp ebin/* /usr/lib64/erlang/lib/sd_notify-0.10/ebin/ +``` -Install and Test -- -Install: +On Debian/Ubuntu - extract the tar.gz - mkdir -p /usr/lib64/erlang/lib/sd_notify-0.10/priv/ - mkdir -p /usr/lib64/erlang/lib/sd_notify-0.10/ebin/ - cp priv/* /usr/lib64/erlang/lib/sd_notify-0.10/priv/ - cp ebin/* /usr/lib64/erlang/lib/sd_notify-0.10/ebin/ - +```bash + dpkg -i erlang-sd-notify_0.10-1_amd64.deb +``` + +Build from source using Docker +=== -Test: +On Ubuntu - [root@a499ee66251a]# erl - ... - 1> sd_notify:sd_notify(0,"READY=1"). - ok +```bash + docker build -t build_ubuntu docker/ubuntu/ + docker run -v {sd_notify_dir}:/sd/ build_ubuntu /bin/sh -c "cd /sd/; make deb" +``` + +on Centos +```bash + docker build -t build_centos docker/centos/ + docker run -v {sd_notify_dir}:/sd/ build_centos /bin/sh -c "cd /sd/; make all" +``` -Building on Debian -- -Install the pre-requisites to the build: - sudo apt-get install build-essential devscripts fakeroot \ - debhelper erlang-dev libsystemd-dev erlang-eunit +Download Binaries +=== +[Github Repository](https://github.com/systemd/erlang-sd_notify/releases) -Make the package: +Usage +===== - make deb +Quick example: -Install and test: +```bash + [root@a499ee66251a]# erl + ... + 1> sd_notify:sd_notify(0,"READY=1"). + 0 +``` - sudo dpkg -i deb-build/erlang-sd-notify_0.9-1_amd64.deb - erl - 1> sd_notify:sd_notify(0,"READY=1"). - ok -- cgit v1.2.1