Skip to content

Commit 04246ee

Browse files
authored
Merge pull request #4 from ocsigen/static
Configuration without config file
2 parents cbf8728 + 65880fb commit 04246ee

34 files changed

+704
-391
lines changed

.ocamlformat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version=0.19.0
1+
version=0.26.2
22
break-cases = fit
33
break-collection-expressions = fit-or-vertical
44
break-fun-decl = wrap

ocsipersist-dbm-config.opam

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
opam-version: "2.0"
2+
name: "ocsipersist-dbm-config"
3+
version: "2.0.0"
4+
authors: "The Ocsigen team <[email protected]>"
5+
maintainer: "Jan Rochel <[email protected]>"
6+
license: "LGPL-2.1-only with OCaml-LGPL-linking-exception"
7+
synopsis: "Ocsigen Server configuration file extension for ocsipersist-dbm"
8+
description: "Load this package from Ocsigen Server's configuration file if you want to use the DBM storage backend."
9+
10+
homepage: "https://github.com/ocsigen/ocsipersist"
11+
bug-reports: "https://github.com/ocsigen/ocsipersist/issues"
12+
dev-repo: "git+https://github.com/ocsigen/ocsipersist.git"
13+
build: [ "dune" "build" "-p" name "-j" jobs ]
14+
15+
depends: [
16+
"dune" {>= "2.9"}
17+
"xml-light"
18+
"ocsigenserver" {>= "3.0.0"}
19+
"ocsipersist-dbm" {>= "2.0.0" & < "2.1.0"}
20+
]

ocsipersist-dbm.opam

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
opam-version: "2.0"
22
name: "ocsipersist-dbm"
3-
version: "1.1.0"
3+
version: "2.0.0"
44
authors: "The Ocsigen team <[email protected]>"
55
maintainer: "Jan Rochel <[email protected]>"
66
license: "LGPL-2.1-only with OCaml-LGPL-linking-exception"
7-
synopsis: "Persistent key/value storage (for Ocsigen) using DBM"
8-
description: "This library provides a DBM backend for the unified key/value storage frontend as defined in the ocsipersist package. Ocsipersist is used pervasively in Eliom/Ocsigen to handle sessions and references. It can be used as an extension for ocsigenserver or as a library."
7+
synopsis: "Persistent key/value storage for OCaml using DBM"
8+
description: "This library provides a DBM backend for the unified key/value storage frontend as defined in the ocsipersist package."
99

1010
homepage: "https://github.com/ocsigen/ocsipersist"
1111
bug-reports: "https://github.com/ocsigen/ocsipersist/issues"
@@ -16,8 +16,6 @@ depends: [
1616
"dune" {>= "2.9"}
1717
"lwt" {>= "4.2.0"}
1818
"lwt_log"
19-
"xml-light"
20-
"ocsigenserver" {>= "3.0.0"}
21-
"ocsipersist-lib" {>= "1.1.0" & < "1.2.0"}
19+
"ocsipersist" {>= "2.0.0" & < "2.1.0"}
2220
"dbm"
2321
]

ocsipersist-lib.opam

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
opam-version: "2.0"
22
name: "ocsipersist-lib"
3-
version: "1.1.0"
3+
version: "2.0.0"
44
authors: "The Ocsigen team <[email protected]>"
55
maintainer: "Jan Rochel <[email protected]>"
66
license: "LGPL-2.1-only with OCaml-LGPL-linking-exception"
7-
synopsis: "Persistent key/value storage (for Ocsigen) - support library"
7+
synopsis: "Persistent key/value storage for OCaml - support library"
88
description: "This library defines signatures and auxiliary tools for defining backends for the Ocsipersist frontent. Ocsipersist is used pervasively in Eliom/Ocsigen to handle sessions and references. It can be used as an extension for ocsigenserver or as a library. Implementations of the following backends currently exist: DBM, PostgreSQL, SQLite."
99

1010
homepage: "https://github.com/ocsigen/ocsipersist"

ocsipersist-pgsql-config.opam

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
opam-version: "2.0"
2+
name: "ocsipersist-pgsql-config"
3+
version: "2.0.0"
4+
authors: "The Ocsigen team <[email protected]>"
5+
maintainer: "Jan Rochel <[email protected]>"
6+
license: "LGPL-2.1-only with OCaml-LGPL-linking-exception"
7+
synopsis: "Ocsigen Server configuration file extension for ocsipersist-pgsql"
8+
description: "Load this package from Ocsigen Server's configuration file if you want to use the PostgreSQL storage backend."
9+
10+
homepage: "https://github.com/ocsigen/ocsipersist"
11+
bug-reports: "https://github.com/ocsigen/ocsipersist/issues"
12+
dev-repo: "git+https://github.com/ocsigen/ocsipersist.git"
13+
build: [ "dune" "build" "-p" name "-j" jobs ]
14+
15+
depends: [
16+
"dune" {>= "2.9"}
17+
"xml-light"
18+
"ocsigenserver" {>= "3.0.0"}
19+
"ocsipersist-pgsql" {>= "2.0.0" & < "2.1.0"}
20+
]

ocsipersist-pgsql.opam

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
opam-version: "2.0"
22
name: "ocsipersist-pgsql"
3-
version: "1.1.0"
3+
version: "2.0.0"
44
authors: "The Ocsigen team <[email protected]>"
55
maintainer: "Jan Rochel <[email protected]>"
66
license: "LGPL-2.1-only with OCaml-LGPL-linking-exception"
7-
synopsis: "Persistent key/value storage (for Ocsigen) using PostgreSQL"
8-
description: "This library provides a PostgreSQL backend for the unified key/value storage frontend as defined in the ocsipersist package. Ocsipersist is used pervasively in Eliom/Ocsigen to handle sessions and references. It can be used as an extension for ocsigenserver or as a library."
7+
synopsis: "Persistent key/value storage for OCaml using PostgreSQL"
8+
description: "This library provides a PostgreSQL backend for the unified key/value storage frontend as defined in the ocsipersist package."
99

1010
homepage: "https://github.com/ocsigen/ocsipersist"
1111
bug-reports: "https://github.com/ocsigen/ocsipersist/issues"
@@ -16,8 +16,6 @@ depends: [
1616
"dune" {>= "2.9"}
1717
"lwt" {>= "4.2.0"}
1818
"lwt_log"
19-
"xml-light"
20-
"ocsigenserver" {>= "3.0.0"}
21-
"ocsipersist-lib" {>= "1.1.0" & < "1.2.0"}
19+
"ocsipersist" {>= "2.0.0" & < "2.1.0"}
2220
"pgocaml"
2321
]

ocsipersist-sqlite-config.opam

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
opam-version: "2.0"
2+
name: "ocsipersist-sqlite-config"
3+
version: "2.0.0"
4+
authors: "The Ocsigen team <[email protected]>"
5+
maintainer: "Jan Rochel <[email protected]>"
6+
license: "LGPL-2.1-only with OCaml-LGPL-linking-exception"
7+
synopsis: "Ocsigen Server configuration file extension for ocsipersist-sqlite"
8+
description: "Load this package from Ocsigen Server's configuration file if you want to use the SQLite storage backend."
9+
10+
homepage: "https://github.com/ocsigen/ocsipersist"
11+
bug-reports: "https://github.com/ocsigen/ocsipersist/issues"
12+
dev-repo: "git+https://github.com/ocsigen/ocsipersist.git"
13+
build: [ "dune" "build" "-p" name "-j" jobs ]
14+
15+
depends: [
16+
"dune" {>= "2.9"}
17+
"xml-light"
18+
"ocsigenserver" {>= "3.0.0"}
19+
"ocsipersist-sqlite" {>= "2.0.0" & < "2.1.0"}
20+
]

ocsipersist-sqlite.opam

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
opam-version: "2.0"
22
name: "ocsipersist-sqlite"
3-
version: "1.1.0"
3+
version: "2.0.0"
44
authors: "The Ocsigen team <[email protected]>"
55
maintainer: "Jan Rochel <[email protected]>"
66
license: "LGPL-2.1-only with OCaml-LGPL-linking-exception"
7-
synopsis: "Persistent key/value storage (for Ocsigen) using SQLite"
8-
description: "This library provides a SQLite backend for the unified key/value storage frontend as defined in the ocsipersist package. Ocsipersist is used pervasively in Eliom/Ocsigen to handle sessions and references. It can be used as an extension for ocsigenserver or as a library."
7+
synopsis: "Persistent key/value storage for OCaml using SQLite"
8+
description: "This library provides a SQLite backend for the unified key/value storage frontend as defined in the ocsipersist package."
99

1010
homepage: "https://github.com/ocsigen/ocsipersist"
1111
bug-reports: "https://github.com/ocsigen/ocsipersist/issues"
@@ -16,8 +16,6 @@ depends: [
1616
"dune" {>= "2.9"}
1717
"lwt" {>= "4.2.0"}
1818
"lwt_log"
19-
"xml-light"
20-
"ocsigenserver" {>= "3.0.0"}
21-
"ocsipersist-lib" {>= "1.1.0" & < "1.2.0"}
19+
"ocsipersist" {>= "2.0.0" & < "2.1.0"}
2220
"sqlite3"
2321
]

ocsipersist.opam

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
opam-version: "2.0"
22
name: "ocsipersist"
3-
version: "1.1.0"
3+
version: "2.0.0"
44
authors: "The Ocsigen team <[email protected]>"
55
maintainer: "Jan Rochel <[email protected]>"
66
license: "LGPL-2.1-only with OCaml-LGPL-linking-exception"
7-
synopsis: "Persistent key/value storage (for Ocsigen) using multiple backends"
8-
description: "This is an virtual library defining a unified frontend for a number of key/value storage implementations. Ocsipersist is used pervasively in Eliom/Ocsigen to handle sessions and references. It can be used as an extension for ocsigenserver or as a library. Implementations of the following backends currently exist: DBM, PostgreSQL, SQLite."
7+
synopsis: "Persistent key-value storage for OCaml using multiple backends"
8+
description: "This is an virtual library defining a unified frontend for a number of key-value storage implementations. Implementations of the following backends currently exist: DBM, PostgreSQL, SQLite."
99

1010
homepage: "https://github.com/ocsigen/ocsipersist"
1111
bug-reports: "https://github.com/ocsigen/ocsipersist/issues"
@@ -15,18 +15,10 @@ build: [ "dune" "build" "-p" name "-j" jobs ]
1515
depends: [
1616
"dune" {>= "2.9"}
1717
"lwt" {>= "4.2.0"}
18-
"ocsigenserver" {>= "3.0.0"}
19-
"ocsipersist-lib" {>= "1.1.0" & < "1.2.0"}
18+
"ocsipersist-lib" {>= "2.0.0" & < "3.0.0"}
2019
]
21-
22-
depopts: [
23-
"ocsipersist-dbm"
24-
"ocsipersist-pgsql"
25-
"ocsipersist-sqlite"
26-
]
27-
2820
conflicts: [
29-
"ocsipersist-dbm" {< "1.1.0" | >= "1.2.0"}
30-
"ocsipersist-pgsql" {< "1.1.0" | >= "1.2.0"}
31-
"ocsipersist-sqlite" {< "1.1.0" | >= "1.2.0"}
21+
"ocsipersist-dbm" {< "2.0.0" | >= "2.1.0"}
22+
"ocsipersist-pgsql" {< "2.0.0" | >= "2.1.0"}
23+
"ocsipersist-sqlite" {< "2.0.0" | >= "2.1.0"}
3224
]

src/dbm/dune

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,41 @@
77

88
(library
99
(name ocsipersist_dbm)
10-
(public_name ocsipersist.dbm)
10+
(public_name ocsipersist-dbm)
1111
(implements ocsipersist)
12-
(modules ocsipersist)
12+
(modules
13+
:standard
14+
\
15+
ocsipersist_config
16+
ocsidbm
17+
ocsidbmtypes
18+
ocsipersist_settings)
1319
(libraries
1420
dbm
1521
lwt_log
16-
xml-light
1722
ocsipersist_dbmtypes
18-
ocsigenserver
19-
ocsipersist_lib)
20-
(optional))
23+
ocsipersist_lib
24+
ocsipersist_dbm_settings))
25+
26+
; Configuration functions (part of ocsipersist-dbm package):
27+
28+
(library
29+
(name ocsipersist_dbm_settings)
30+
(public_name ocsipersist-dbm.settings)
31+
(wrapped false)
32+
(modules ocsipersist_settings)
33+
(libraries lwt lwt.unix))
34+
35+
; Configuration through Ocsigen Server config file:
36+
37+
(library
38+
(name ocsipersist_dbm_config)
39+
(public_name ocsipersist-dbm-config)
40+
(modules ocsipersist_config)
41+
(wrapped false)
42+
(libraries xml-light ocsipersist_dbm ocsigenserver))
43+
44+
; DBM server:
2145

2246
(executable
2347
(public_name ocsidbm)

0 commit comments

Comments
 (0)