From db822ab65f283d7050fa6c0221121def60dd86fd Mon Sep 17 00:00:00 2001 From: Marek Kubica Date: Tue, 10 Jul 2018 19:24:54 +0200 Subject: [PATCH] Replace OASIS by jbuilder Need a Raspberry Pi to do some testing. --- .gitignore | 16 ++++------------ Makefile | 11 +++++++++++ _oasis | 15 --------------- pkg/pkg.ml | 2 ++ src/jbuild | 3 +++ wiringpi.descr | 10 ++++++++++ wiringpi.opam | 16 ++++++++++++++++ 7 files changed, 46 insertions(+), 27 deletions(-) create mode 100644 Makefile delete mode 100644 _oasis create mode 100644 pkg/pkg.ml create mode 100644 src/jbuild create mode 100644 wiringpi.descr create mode 100644 wiringpi.opam diff --git a/.gitignore b/.gitignore index 96eadca..faed899 100644 --- a/.gitignore +++ b/.gitignore @@ -1,12 +1,4 @@ -*.mllib -*.mldylib -*.clib -META -Makefile -configure -_tags -setup.ml -setup.data -setup.log -myocamlbuild.ml -_build/ +/_build/ +/_opam/ +.merlin +*.install diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..151ff4e --- /dev/null +++ b/Makefile @@ -0,0 +1,11 @@ +.PHONY: all +all: + jbuilder build --dev + +.PHONY: clean +clean: + jbuilder clean + +.PHONY: test +test: + jbuilder runtest --force diff --git a/_oasis b/_oasis deleted file mode 100644 index 2e9b837..0000000 --- a/_oasis +++ /dev/null @@ -1,15 +0,0 @@ -OASISFormat: 0.4 -Name: WiringPi -Version: 0.0.1 -Synopsis: Binding to the WiringPi library for hardware access -Authors: Tobias Bora, Marek Kubica -License: LGPL-3 with OCaml linking exception -Plugins: META (0.4), DevFiles (0.4) - -Library "WiringPi" - Path: src/ - BuildTools: ocamlbuild - Modules: WiringPi - CSources: WiringPi_stubs.c - CCLib: -lwiringPi - diff --git a/pkg/pkg.ml b/pkg/pkg.ml new file mode 100644 index 0000000..1a04c2b --- /dev/null +++ b/pkg/pkg.ml @@ -0,0 +1,2 @@ +#use "topfind" +#require "topkg-jbuilder.auto" diff --git a/src/jbuild b/src/jbuild new file mode 100644 index 0000000..b36835d --- /dev/null +++ b/src/jbuild @@ -0,0 +1,3 @@ +(library + ((name wiringpi) + (public_name wiringpi))) diff --git a/wiringpi.descr b/wiringpi.descr new file mode 100644 index 0000000..02deddd --- /dev/null +++ b/wiringpi.descr @@ -0,0 +1,10 @@ +WiringPi for OCaml, low level Raspberry Pi hardware access +WiringPi is a library that allows easy, Arduino-like access to hardware +functionality (GPIO pins mostly) of the Raspberry Pi minicomputer. That library +is written in C so what this package does is to provide a simple interface to +use the C library from OCaml. The API is unchanged (even the capitalization) to +provide an interface which is as similar as possible to the code that it is +based upon. + +Please note that you need to install the WiringPi library first, as it is not +included in this package. Otherwise compilation will fail. diff --git a/wiringpi.opam b/wiringpi.opam new file mode 100644 index 0000000..0242467 --- /dev/null +++ b/wiringpi.opam @@ -0,0 +1,16 @@ +opam-version: "1.2" +maintainer: "marek@xivilization.net" +homepage: "https://github.com/Leonidas-from-XIV/ocaml-wiringpi" +license: "LGPL-3 with OCaml linking exception" +build: ["jbuilder" "build" "-p" name "-j" jobs] +depends: [ + "jbuilder" {build} +] +post-messages: [ + " + This package requires WiringPi development files installed. + Tentative instructions : https://gist.githubusercontent.com/Leonidas-from-XIV/a1a7315ac01f7fbee3f0/raw + " + {failure} +] +available: os = "linux"