Skip to content

Commit

Permalink
Port to jbuilder
Browse files Browse the repository at this point in the history
  • Loading branch information
rgrinberg committed Apr 10, 2017
1 parent 15ba97b commit 233ae8c
Show file tree
Hide file tree
Showing 11 changed files with 149 additions and 19 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ setup.bin
lib_test/config.ml
lib_test/test_javascript.js
*~
.merlin
*.install
7 changes: 7 additions & 0 deletions gist/jbuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
(jbuild_version 1)

(executables
((libraries (cohttp.lwt github.unix cmdliner lambda-term))
(public_names (git-gist))
(package github-unix)
(names (gist))))
33 changes: 33 additions & 0 deletions github-js.opam
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
opam-version: "1.2"
name: "github"
version: "2.2.0"
maintainer: "sheets@alum.mit.edu"
authors: [
"Anil Madhavapeddy"
"David Sheets"
"Andy Ray"
"Jeff Hammerbacher"
"Thomas Gazagnaire"
"Rudi Grinberg"
"Qi Li"
"Jeremy Yallop"
"Dave Tucker"
]
homepage: "https://github.com/mirage/ocaml-github"
bug-reports: "https://github.com/mirage/ocaml-github/issues"
dev-repo: "https://github.com/mirage/ocaml-github.git"
tags: [
"org:mirage"
"org:xapi-project"
"git"
]
build: [
["jbuilder" "build" "--only-packages" "github-js" "--root" "."
"-j" jobs "@install"]
]
depends: [
"jbuilder" {build}
"cohttp"
"js_of_ocaml"
]
available: [ ocaml-version >= "4.02.3" ]
36 changes: 36 additions & 0 deletions github-unix.opam
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
opam-version: "1.2"
name: "github"
version: "2.2.0"
maintainer: "sheets@alum.mit.edu"
authors: [
"Anil Madhavapeddy"
"David Sheets"
"Andy Ray"
"Jeff Hammerbacher"
"Thomas Gazagnaire"
"Rudi Grinberg"
"Qi Li"
"Jeremy Yallop"
"Dave Tucker"
]
homepage: "https://github.com/mirage/ocaml-github"
bug-reports: "https://github.com/mirage/ocaml-github/issues"
dev-repo: "https://github.com/mirage/ocaml-github.git"
tags: [
"org:mirage"
"org:xapi-project"
"git"
]
build: [
["jbuilder" "build" "--only-packages" "github-unix" "--root" "."
"-j" jobs "@install"]
]
depends: [
"jbuilder" {build}
"github"
"stringext"
"lambda-term"
"cmdliner" {>= "0.9.8"}
"base-unix"
]
available: [ ocaml-version >= "4.02.3" ]
22 changes: 3 additions & 19 deletions opam → github.opam
Original file line number Diff line number Diff line change
Expand Up @@ -22,33 +22,17 @@ tags: [
"git"
]
build: [
["ocaml" "setup.ml" "-configure" "--%{base-unix:enable}%-unix" "--%{js_of_ocaml:enable}%-js" "--prefix" prefix]
["ocaml" "setup.ml" "-build"]
]
install: [
["ocaml" "setup.ml" "-install"]
]
remove: [
["ocamlfind" "remove" "github"]
["jbuilder" "build" "--only-packages" "github" "--root" "."
"-j" jobs "@install"]
]
depends: [
"ocamlfind" {build}
"ocamlbuild" {build}
"jbuilder" {build}
"tls"
"uri" {>= "1.9.0"}
"cohttp" {>= "0.17.0"}
"lwt" {>= "2.4.4"}
"atdgen" {>= "1.10.0"}
"yojson" {>= "1.2.0"}
"stringext"
"lambda-term"
"cmdliner" {>= "0.9.8"}
"base-unix"
]
depopts: [
"js_of_ocaml"
]
conflicts: [
"js_of_ocaml" {< "2.4.0"}
]
available: [ ocaml-version >= "4.02.3" ]
25 changes: 25 additions & 0 deletions jar/jbuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
(jbuild_version 1)

(executables
((libraries (cohttp.lwt github.unix cmdliner lambda-term))
(package github-unix)
(public_names
(git-create-release
git-sync-releases
git-upload-release
git-list-releases
git-list-events
git-list-issues
git-jar
git-search
git-listen-events))
(names
(create_release
sync_releases
upload_release
list_releases
list_events
list_issues
jar
search
listen_events))))
7 changes: 7 additions & 0 deletions js/jbuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
(jbuild_version 1)

(library
((name github_js)
(public_name github.js)
(wrapped false)
(libraries (github lwt js_of_ocaml cohttp.lwt-core cohttp.js))))
File renamed without changes.
18 changes: 18 additions & 0 deletions lib/jbuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
(jbuild_version 1)

(rule
((targets (github_t.ml github_t.mli))
(deps (github.atd))
(action (run atdgen -t ${<}))))

(rule
((targets (github_j.ml github_j.mli))
(deps (github.atd))
(action (run atdgen -j ${<}))))

(library
((name github)
(public_name github)
(wrapped false)
(modules (github_s github_core github_j github_t))
(libraries (cohttp uri cohttp.lwt-core yojson atdgen))))
10 changes: 10 additions & 0 deletions lib_test/jbuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
(jbuild_version 1)

(executables
((libraries (cohttp.lwt github.unix atdgen stringext))
(package github-unix)
(names
(current_user
rwo
get_token
repo_info))))
8 changes: 8 additions & 0 deletions unix/jbuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
(jbuild_version 1)

(library
((name github_unix)
(public_name github.unix)
(wrapped false)
(modules (github github_cookie_jar))
(libraries (lwt.unix cohttp.lwt github bytes))))

0 comments on commit 233ae8c

Please sign in to comment.