opam-version: "2.0"
maintainer: "Edgar Aroutiounian <edgar.factorial@gmail.com>"
authors: "Edgar Aroutiounian <edgar.factorial@gmail.com>"
homepage: "https://github.com/onlinemediagroup/ocaml-usbmux"
bug-reports: "https://github.com/onlinemediagroup/ocaml-usbmux/issues"
license: "BSD-3-Clause"
dev-repo: "git+https://github.com/onlinemediagroup/ocaml-usbmux.git"
build: [
  ["oasis" "setup"]
  ["ocaml" "setup.ml" "-configure" "--prefix" prefix]
  ["ocaml" "setup.ml" "-build"]
  ["oasis" "setup"] {with-test}
  ["ocaml" "setup.ml" "-configure" "--enable-tests"] {with-test}
  ["ocaml" "setup.ml" "-build"] {with-test}
  ["ocaml" "setup.ml" "-test"] {with-test}
]
install: ["ocaml" "setup.ml" "-install"]
remove: ["ocaml" "%{etc}%/usbmux/_oasis_remove_.ml" "%{etc}%/usbmux"]
depends: [
  "ocaml" {>= "4.02.0"}
  "cmdliner" {build}
  "cohttp" {< "0.99"}
  "lwt" {>= "2.5.2" & < "3.0.0"}
  "ocamlfind" {build}
  "oasis" {build & >= "0.4"}
  "ppx_deriving_yojson" {>= "2.4" & < "3.0"}
  "base-threads"
  "plist"
  "yojson"
]
depexts: [
  ["usbmuxd"] {os-family = "debian"}
]
post-messages: [
  "Now you can ssh into your jailbroken iDevice using the CLI, gandalf."
  "Simple invocation:"
  "sudo `which gandalf` --mappings etc/mapping --daemonize --verbose"
  "
where etc/mapping is a file such that # start comments and consists of 
an array of json objects with these fields, note that name can be null 
and is just a nickname for this tunnel, other fields are required.

# This is a comment
[{\"udid\":\"9cdfac9f74c5e18a6eff3611c0927df5cf4f2eca\",
  \"name\":\"i11\",
  \"forwarding\": [{\"local_port\":2000, \"device_port\":22},
                 {\"local_port\":3000, \"device_port\":1122}]}]
  "
  "See uptime, tunnels and other metadata with:"
  "gandalf --status"
  "Note that with over 13 devices usbmuxd will start to buck"
  "because of threading issue with libplist."
  "Use the custom one provided at https://github.com/onlinemediagroup/libplist"
  ""
  "The Linux kernel will also have trouble with many USB3.0 devices, ie over 15ish"
  "Fix that issue by turning off USB3.0 support in your BIOS"
  "Check out the man page or see the README at:"
  "https://github.com/onlinemediagroup/ocaml-usbmux/blob/master/README.md"
]
synopsis: "Control port remapping for iOS devices"
description: """
Now you can ssh into your jailbroken iDevice using the CLI, gandalf.
Simple invocation:
sudo `which gandalf` --mappings etc/mapping --daemonize --verbose

where etc/mapping is a file such that # start comments and consists of 
an array of json objects with these fields, note that name can be null 
and is just a nickname for this tunnel, other fields are required.

# This is a comment
[{"udid":"9cdfac9f74c5e18a6eff3611c0927df5cf4f2eca",
  "name":"i11",
  "forwarding": [{"local_port":2000, "device_port":22},
                 {"local_port":3000, "device_port":1122}]}]

See uptime, tunnels and other metadata with:
gandalf --status
Note that with over 13 devices usbmuxd will start to buck 
because of threading issue with libplist.
Use the custom one provided at https://github.com/onlinemediagroup/libplist

The Linux kernel will also have trouble with many USB3.0 devices, ie over 15ish
Fix that issue by turning off USB3.0 support in your BIOS

Check out the man page or see the README at:
https://github.com/onlinemediagroup/ocaml-usbmux/blob/master/README.md"""
extra-files: [
  ["usbmux.install" "md5=0d1b822c897681cf54b3e1aed52dda99"]
  ["_oasis_remove_.ml" "md5=6100ca146fa97d2196eb49a2631d0796"]
]
url {
  src:
    "https://github.com/onlinemediagroup/ocaml-usbmux/archive/v1.3.1.tar.gz"
  checksum: "md5=97d81a5520c154e50a32a69ef089ad41"
}
