From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id A80F17F84F for ; Wed, 26 Feb 2014 23:33:34 +0100 (CET) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of daniel.buenzli@erratique.ch) identity=pra; client-ip=74.55.86.74; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="daniel.buenzli@erratique.ch"; x-sender="daniel.buenzli@erratique.ch"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of daniel.buenzli@erratique.ch) identity=mailfrom; client-ip=74.55.86.74; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="daniel.buenzli@erratique.ch"; x-sender="daniel.buenzli@erratique.ch"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@smtp.webfaction.com) identity=helo; client-ip=74.55.86.74; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="daniel.buenzli@erratique.ch"; x-sender="postmaster@smtp.webfaction.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtcSADRrDlNKN1ZKlGdsb2JhbABag0GCOoEgvXmBLg4BAQEBBwsLCRIqgicBAQMBASNWBQsLGgIfBwICRxAGG4dpCAQJqHygZReBKYx4MweCbjWBFASUTAWFF4UAF41OgT8 X-IPAS-Result: AtcSADRrDlNKN1ZKlGdsb2JhbABag0GCOoEgvXmBLg4BAQEBBwsLCRIqgicBAQMBASNWBQsLGgIfBwICRxAGG4dpCAQJqHygZReBKYx4MweCbjWBFASUTAWFF4UAF41OgT8 X-IronPort-AV: E=Sophos;i="4.97,550,1389740400"; d="scan'208";a="50651508" Received: from mail6.webfaction.com (HELO smtp.webfaction.com) ([74.55.86.74]) by mail3-smtp-sop.national.inria.fr with ESMTP; 26 Feb 2014 23:33:33 +0100 Received: from [172.20.10.2] (181-225.197-178.cust.bluewin.ch [178.197.225.181]) by smtp.webfaction.com (Postfix) with ESMTP id B8E8A2258323; Wed, 26 Feb 2014 22:33:26 +0000 (UTC) Date: Wed, 26 Feb 2014 23:33:23 +0100 From: =?utf-8?Q?Daniel_B=C3=BCnzli?= To: Mads Hartmann Jensen Cc: caml-list@inria.fr Message-ID: <1293A504B1F543729B76D6716F128155@erratique.ch> In-Reply-To: References: <1BFC6E68C5814BADBDE735FACE53E815@erratique.ch> X-Mailer: sparrow 1.6.4 (build 1178) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Subject: Re: [Caml-list] Creating an OPAM package that wraps c functions that can be used in a non-custom utop Le mercredi, 26 f=C3=A9vrier 2014 =C3=A0 22:49, Mads Hartmann Jensen a =C3= =A9crit : > Thanks for your help so far. I think I've gotten further but I'm not > quite there yet. I've followed the instructions that were outlined in=20= =20 > the ocaml-ctypes issue and I've also created a META and .install file. First if your opam package name is called ocaml-geoip that file must be cal= led `ocaml-geoip.install` not `.install`. What you need to build is everyth= ing you want to install through the .install file. So just make a target `p= kg` in your Makefile as follows: pkg: ocamlbuild -use-ocamlfind tgeoip.{mli,cmi,cmx,cma,a,cmxa,cmxs} dllt= geoip.so META you may need to add ` : include` to your `_tags` file and I'm no longe= r sure if Makefile supports globbing as above. Verify that after a `make pk= g` you have all the build artefacts mentioned in the .install file build at= that place. I don't see your `opam` file (add one at the toplevel of the project, this = allows opam to use this opam file when you pin the package which can be use= ful when you want people to test for fixes and that your deps or build proc= edure has changed) but the build section should then read: build:=20=20 [ [ "make" "pkg"] ] That's all, no need to have a `remove` section, since you are using a .inst= all file. After having executed this make invocation, opam will use the fil= e ocaml-geoip.install to copy the files you built at the right places. See = the opam developer manual [1] for more information about .install files.=20= =20 =20=20 > I tried running `ocamlfind install tgeoip META` to install the package > but that just copied the meta file to=20=20 > /Users/hartmann/.opam/issuu/lib/tgeoip/META. If you run ocamlfind by yourself you need to specify each file you want to = install (basically those that are in the .install file) so that would be: ocamlfind install tgeoip META _build/tgeoip.{mli,cmi,cmx,cma,a,cmxa,cmxs} _= build/dlltgeoip.so=20=20 See `man ocamlfind`, Best, Daniel [1] https://github.com/OCamlPro/opam/raw/master/doc/dev-manual/dev-manual.p= df