Permalink
Browse files

Provide a Makefile for automatic installs

  • Loading branch information...
andrenth committed Sep 20, 2012
1 parent 2952f2c commit f69d5ad6fa4377345b7edf3997cc5519645d2841
Showing with 44 additions and 3 deletions.
  1. +42 −0 Makefile
  2. +2 −3 README.md
View
@@ -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
View
@@ -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

0 comments on commit f69d5ad

Please sign in to comment.