From f25a4506161f6eb049ca62bdabbf920a76adfb0e Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 12 Jan 2016 17:32:29 +0000 Subject: [PATCH 1/5] build: Switch from obuild to oasis Signed-off-by: Euan Harris --- .gitignore | 14 +++++++++++++- Makefile | 31 ------------------------------- _oasis | 26 ++++++++++++++++++++++++++ cdrom.obuild | 17 ----------------- lib/META | 8 -------- 5 files changed, 39 insertions(+), 57 deletions(-) delete mode 100644 Makefile create mode 100644 _oasis delete mode 100644 cdrom.obuild delete mode 100644 lib/META diff --git a/.gitignore b/.gitignore index 849ddff..a0aba5c 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,13 @@ -dist/ +META +_tags +*.mldylib +*.mllib +myocamlbuild.ml +setup.ml +setup.data +setup.log +_build/ +*.native +*.clib +Makefile +configure diff --git a/Makefile b/Makefile deleted file mode 100644 index 0a5afc3..0000000 --- a/Makefile +++ /dev/null @@ -1,31 +0,0 @@ -OBUILDOPTS=--debug+ -#CONFOPTS=--enable-library-bytecode --enable-executable-bytecode -PKGNAME=cdrom - -SUFFIXES:=cdrom.a cdrom.cmi cdrom.cmx cdrom.o dllstubs_cdrom.so \ - cdrom.cma cdrom.cmo cdrom.cmxa cdrom_stubs.c.o libstubs_cdrom.a -FILES:=$(addprefix dist/build/lib-$(PKGNAME)/,$(SUFFIXES)) - -ifneq "$(DESTDIR)" "" -INSTALL_ARGS := -destdir $(DESTDIR) -endif - -.PHONY: configure build install clean uninstall - -all: build - -configure: - obuild $(OBUILDOPTS) configure $(CONFOPTS) - -build: configure - obuild $(OBUILDOPTS) build - -install: build - ocamlfind remove $(PKGNAME) - ocamlfind install $(PKGNAME) $(FILES) lib/META lib/$(PKGNAME).mli $(INSTALL_ARGS) - -clean: - obuild clean - -uninstall: - ocamlfind remove $(PKGNAME) diff --git a/_oasis b/_oasis new file mode 100644 index 0000000..02d90c3 --- /dev/null +++ b/_oasis @@ -0,0 +1,26 @@ +OASISFormat: 0.4 +Name: cdrom +Version: 0.9.1 +Synopsis: Query Linux CDROM devices +Authors: David Scott +License: LGPL-2.1 with OCaml linking exception +Plugins: META (0.4), Devfiles (0.4) +BuildTools: ocamlbuild + +Library cdrom + Path: lib + FindlibName: cdrom + Modules: Cdrom + CSources: cdrom_stubs.c + ByteOpt: -warn-error +1..45 + NativeOpt: -warn-error +1..45 + BuildDepends: unix + +Executable query + Path: query + MainIs: query.ml + CompiledObject: best + ByteOpt: -warn-error +1..45 + NativeOpt: -warn-error +1..45 + BuildDepends: cdrom + diff --git a/cdrom.obuild b/cdrom.obuild deleted file mode 100644 index 6871461..0000000 --- a/cdrom.obuild +++ /dev/null @@ -1,17 +0,0 @@ -name: cdrom -version: 0.9.1 -synopsis: Query Linux CDROM devices -obuild-ver: 1 - -library cdrom - src-dir: lib - modules: Cdrom - cdir: lib - c-sources: cdrom_stubs.c - build-deps: unix - -executable query - main: query.ml - src-dir: query - build-deps: cdrom - diff --git a/lib/META b/lib/META deleted file mode 100644 index 5e86e4f..0000000 --- a/lib/META +++ /dev/null @@ -1,8 +0,0 @@ -version = "0.9.1" -description = "CDROM device misc bindings" -archive(byte) = "cdrom.cma" -archive(byte, plugin) = "cdrom.cma" -archive(native) = "cdrom.cmxa" -archive(native, plugin) = "cdrom.cmxs" -exists_if = "cdrom.cma" - From c8ba80bd759794e212579e24b76e8c4d6483c833 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Tue, 12 Jan 2016 17:40:46 +0000 Subject: [PATCH 2/5] build: Add minimal oasis auto-generated files Produced by running `oasis setup -setup-update dynamic` Signed-off-by: Euan Harris --- .gitignore | 3 --- Makefile | 41 +++++++++++++++++++++++++++++++++++++++++ configure | 27 +++++++++++++++++++++++++++ setup.ml | 37 +++++++++++++++++++++++++++++++++++++ 4 files changed, 105 insertions(+), 3 deletions(-) create mode 100644 Makefile create mode 100755 configure create mode 100644 setup.ml diff --git a/.gitignore b/.gitignore index a0aba5c..ab7e0c8 100644 --- a/.gitignore +++ b/.gitignore @@ -3,11 +3,8 @@ _tags *.mldylib *.mllib myocamlbuild.ml -setup.ml setup.data setup.log _build/ *.native *.clib -Makefile -configure diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..3639f14 --- /dev/null +++ b/Makefile @@ -0,0 +1,41 @@ +# OASIS_START +# DO NOT EDIT (digest: a3c674b4239234cbbe53afe090018954) + +SETUP = ocaml setup.ml + +build: setup.data + $(SETUP) -build $(BUILDFLAGS) + +doc: setup.data build + $(SETUP) -doc $(DOCFLAGS) + +test: setup.data build + $(SETUP) -test $(TESTFLAGS) + +all: + $(SETUP) -all $(ALLFLAGS) + +install: setup.data + $(SETUP) -install $(INSTALLFLAGS) + +uninstall: setup.data + $(SETUP) -uninstall $(UNINSTALLFLAGS) + +reinstall: setup.data + $(SETUP) -reinstall $(REINSTALLFLAGS) + +clean: + $(SETUP) -clean $(CLEANFLAGS) + +distclean: + $(SETUP) -distclean $(DISTCLEANFLAGS) + +setup.data: + $(SETUP) -configure $(CONFIGUREFLAGS) + +configure: + $(SETUP) -configure $(CONFIGUREFLAGS) + +.PHONY: build doc test all install uninstall reinstall clean distclean configure + +# OASIS_STOP diff --git a/configure b/configure new file mode 100755 index 0000000..6acfaeb --- /dev/null +++ b/configure @@ -0,0 +1,27 @@ +#!/bin/sh + +# OASIS_START +# DO NOT EDIT (digest: dc86c2ad450f91ca10c931b6045d0499) +set -e + +FST=true +for i in "$@"; do + if $FST; then + set -- + FST=false + fi + + case $i in + --*=*) + ARG=${i%%=*} + VAL=${i##*=} + set -- "$@" "$ARG" "$VAL" + ;; + *) + set -- "$@" "$i" + ;; + esac +done + +ocaml setup.ml -configure "$@" +# OASIS_STOP diff --git a/setup.ml b/setup.ml new file mode 100644 index 0000000..0345fe1 --- /dev/null +++ b/setup.ml @@ -0,0 +1,37 @@ +(* setup.ml generated for the first time by OASIS v0.4.5 *) + +(* OASIS_START *) +(* DO NOT EDIT (digest: 9852805d5c19ca1cb6abefde2dcea323) *) +(******************************************************************************) +(* OASIS: architecture for building OCaml libraries and applications *) +(* *) +(* Copyright (C) 2011-2013, Sylvain Le Gall *) +(* Copyright (C) 2008-2011, OCamlCore SARL *) +(* *) +(* This library is free software; you can redistribute it and/or modify it *) +(* under the terms of the GNU Lesser General Public License as published by *) +(* the Free Software Foundation; either version 2.1 of the License, or (at *) +(* your option) any later version, with the OCaml static compilation *) +(* exception. *) +(* *) +(* This library is distributed in the hope that it will be useful, but *) +(* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY *) +(* or FITNESS FOR A PARTICULAR PURPOSE. See the file COPYING for more *) +(* details. *) +(* *) +(* You should have received a copy of the GNU Lesser General Public License *) +(* along with this library; if not, write to the Free Software Foundation, *) +(* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA *) +(******************************************************************************) + +let () = + try + Topdirs.dir_directory (Sys.getenv "OCAML_TOPLEVEL_PATH") + with Not_found -> () +;; +#use "topfind";; +#require "oasis.dynrun";; +open OASISDynRun;; + +(* OASIS_STOP *) +let () = setup ();; From e850e223ee04a7f22929d9a40c3a379b66f86b83 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 13 Jan 2016 09:47:50 +0000 Subject: [PATCH 3/5] travis: Add .travis.yml Signed-off-by: Euan Harris --- .travis.yml | 10 ++++++++++ _oasis | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..13d1c53 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,10 @@ +language: c +install: + - wget https://raw.githubusercontent.com/ocaml/ocaml-travisci-skeleton/master/.travis-opam.sh + - wget https://raw.githubusercontent.com/simonjbeaumont/ocaml-travis-coveralls/master/travis-coveralls.sh +script: bash -ex .travis-opam.sh +env: + matrix: + - OCAML_VERSION=4.00 + - OCAML_VERSION=4.01 + - OCAML_VERSION=4.02 diff --git a/_oasis b/_oasis index 02d90c3..3aa0e94 100644 --- a/_oasis +++ b/_oasis @@ -1,6 +1,6 @@ OASISFormat: 0.4 Name: cdrom -Version: 0.9.1 +Version: 0.9.2 Synopsis: Query Linux CDROM devices Authors: David Scott License: LGPL-2.1 with OCaml linking exception From 46921740a8a856c0979104431d11e469c09c4393 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 13 Jan 2016 12:33:39 +0000 Subject: [PATCH 4/5] build: Add opam file Signed-off-by: Euan Harris --- opam | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 opam diff --git a/opam b/opam new file mode 100644 index 0000000..f7470fa --- /dev/null +++ b/opam @@ -0,0 +1,11 @@ +opam-version: "1.2" +name: "cdrom" +maintainer: "Euan Harris " +author: "Dave Scott " +build: [ + ["./configure" "--prefix=%{prefix}%"] + [make] +] +install: [make "install"] +remove: ["ocamlfind" "remove" "cdrom"] +depends: ["ocamlfind" "oasis"] From 913cf32b8439a10222abb44cd2a031968ec9017d Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 13 Jan 2016 12:34:01 +0000 Subject: [PATCH 5/5] Changelog, Maintainers: Update for release 0.9.2 Signed-off-by: Euan Harris --- ChangeLog | 3 +++ MAINTAINERS | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index a09e295..f7d42e3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +0.9.2 (13-Jan-2015): +* switch back to OASIS + 0.9.1 (28-May-2013): * switch from OASIS to Make + obuild; "make install" supports DESTDIR diff --git a/MAINTAINERS b/MAINTAINERS index fd1cd91..3b46824 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -8,5 +8,6 @@ include a Signed-off-by: line. Maintainers list ---------------- -* David Scott +* David Scott +* Euan Harris