summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2022-04-05 14:01:27 +0300
committerDaniil Baturin <daniil@baturin.org>2022-04-05 14:01:27 +0300
commite625146762b16d85c71209029e19a26d1f42f8be (patch)
tree0768f812dff20925453350ba92acfd585df5e7eb
parent35867531ba533033df3d5969219c6c907c67d573 (diff)
downloaduncron-e625146762b16d85c71209029e19a26d1f42f8be.tar.gz
uncron-e625146762b16d85c71209029e19a26d1f42f8be.zip
Switch to dune and add opam packaging
-rw-r--r--.gitignore1
-rw-r--r--dune0
-rw-r--r--dune-project1
-rw-r--r--src/Makefile4
-rw-r--r--src/dune10
-rw-r--r--uncron.opam38
6 files changed, 50 insertions, 4 deletions
diff --git a/.gitignore b/.gitignore
index 71da4b4..0e10e22 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
+_build/*
*.cmi
*.cmx
*.cmo
diff --git a/dune b/dune
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/dune
diff --git a/dune-project b/dune-project
new file mode 100644
index 0000000..c994249
--- /dev/null
+++ b/dune-project
@@ -0,0 +1 @@
+(lang dune 2.9)
diff --git a/src/Makefile b/src/Makefile
deleted file mode 100644
index 8a00d3a..0000000
--- a/src/Makefile
+++ /dev/null
@@ -1,4 +0,0 @@
-all: uncron
-
-uncron: uncron.ml
- ocamlfind ocamlopt -I +threads -package lwt,lwt.unix,lwt_ppx,logs,logs.lwt,containers -linkpkg -thread -o uncron -g ./uncron.ml
diff --git a/src/dune b/src/dune
new file mode 100644
index 0000000..bcb4d31
--- /dev/null
+++ b/src/dune
@@ -0,0 +1,10 @@
+(executable
+ (name uncron)
+ (public_name uncron)
+ (libraries
+ containers
+ lwt
+ lwt.unix
+ lwt_ppx
+ logs
+ logs.lwt))
diff --git a/uncron.opam b/uncron.opam
new file mode 100644
index 0000000..460511f
--- /dev/null
+++ b/uncron.opam
@@ -0,0 +1,38 @@
+opam-version: "2.0"
+name: "uncron"
+version: "0.9.0"
+synopsis: "Simple command queue manager"
+description: """
+Uncron is a simple command queue manager.
+It accepts commands through a UNIX domain socket connection
+and executes them sequentially: next one is executed only when the previous one
+completes.
+
+Its main goal is to provide a workaround for tools that work with shared data
+but don't have a built-in arbitration mechanism to allow two copies of the tool
+to work safely.
+"""
+maintainer: "Daniil Baturin <daniil+opam@baturin.org>"
+authors: "Daniil Baturin <daniil+uncron@baturin.org>"
+license: "MIT"
+homepage: "https://github.com/vyos/uncron"
+bug-reports: "https://github.com/vyos/uncron/issues"
+dev-repo: "git+https://github.com/vyos/uncron"
+build: [
+ ["dune" "subst"] {dev}
+ ["dune" "build" "-p" name "-j" jobs]
+]
+depends: [
+ "ocaml" {>= "4.08"}
+ "dune" {>= "2.0.0"}
+ "lwt"
+ "lwt.unix"
+ "logs"
+ "logs.lwt"
+ "containers"
+]
+
+conflicts: [
+ "result" {< "1.5"}
+]
+