Skip to content

Commit

Permalink
Provide a Makefile for automatic installs
Browse files Browse the repository at this point in the history
  • Loading branch information
andrenth committed Sep 20, 2012
1 parent 2952f2c commit f69d5ad
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 3 deletions.
42 changes: 42 additions & 0 deletions Makefile
@@ -0,0 +1,42 @@
all:
ocaml setup.ml -configure
ocaml setup.ml -build

install:
groupadd --system srsly
useradd \
--system \
--gid srsly \
--home /var/lib/srsly \
--comment "srsly daemon" \
--shell /bin/false \
srsly
install -d -m0755 /etc/srsly
install -d -m0700 /etc/srsly/srs_secrets.d
install -d -m0755 /usr/lib/srsly
install -d -m0755 /usr/sbin
install -d -m0755 /var/lib/srsly
install -d -m0755 /var/lib/srsly/dev
install -d -m0755 /var/lib/srsly/etc
install -d -m0755 /var/lib/srsly/lib
install -m0600 etc/srslyd.conf /etc/srsly/srslyd.conf
install -m0700 _build/src/srsly.native /usr/sbin/srsly
install -m0700 _build/src/srsly_milter.native /usr/lib/srsly/srsly-milter
install -m0700 _build/src/srslyd.native /usr/lib/srsly/srslyd
touch /etc/srsly/srs_secret
chown root:root /etc/srsly/srs_secret
chmod 0600 /etc/srsly/srs_secret
srsly new-secret > /etc/srsly/srs_secret

uninstall:
rm -r /etc/srsly
rm -r /usr/lib/srsly
rm -r /var/lib/srsly
rm /usr/sbin/srsly
userdel srsly

clean:
ocaml setup.ml -clean

distclean:
ocaml setup.ml -distclean
5 changes: 2 additions & 3 deletions README.md
Expand Up @@ -19,9 +19,8 @@ To build srsly you need to install its dependencies:

Having those installed, simply run the following commands.

$ ocaml setup.ml -configure
$ ocaml setup.ml -build
# ocaml setup.ml -install
$ make
# make install

It is also possible to build a Debian package with the command

Expand Down

0 comments on commit f69d5ad

Please sign in to comment.