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 6617B7EE99 for ; Mon, 9 Dec 2013 16:23:24 +0100 (CET) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of sebastien.mondet@gmail.com) identity=pra; client-ip=74.125.82.50; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="sebastien.mondet@gmail.com"; x-sender="sebastien.mondet@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of sebastien.mondet@gmail.com designates 74.125.82.50 as permitted sender) identity=mailfrom; client-ip=74.125.82.50; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="sebastien.mondet@gmail.com"; x-sender="sebastien.mondet@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-wg0-f50.google.com) identity=helo; client-ip=74.125.82.50; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="sebastien.mondet@gmail.com"; x-sender="postmaster@mail-wg0-f50.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgIEAFTfpVJKfVIylGdsb2JhbABZgz9Tgn+jIooiiFKBJwgWDgEBAQEHCwsJEiqCJQEBAwEBIx0BGxILAQMBCwYFCxodAgIiAREBBQEKEgYTCAqHXQEDCQYNpgWMBlODCYQVChknAwpkhgMRAQUMjQuBdQQHgmuBSAOJQo5SgTCOdhgphHMe X-IPAS-Result: AgIEAFTfpVJKfVIylGdsb2JhbABZgz9Tgn+jIooiiFKBJwgWDgEBAQEHCwsJEiqCJQEBAwEBIx0BGxILAQMBCwYFCxodAgIiAREBBQEKEgYTCAqHXQEDCQYNpgWMBlODCYQVChknAwpkhgMRAQUMjQuBdQQHgmuBSAOJQo5SgTCOdhgphHMe X-IronPort-AV: E=Sophos;i="4.93,858,1378850400"; d="scan'208";a="40082081" Received: from mail-wg0-f50.google.com ([74.125.82.50]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 09 Dec 2013 16:23:23 +0100 Received: by mail-wg0-f50.google.com with SMTP id a1so3528571wgh.17 for ; Mon, 09 Dec 2013 07:23:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=G+jHFBngejtYuFghhsdGia6yIjtm5Sejgmqbb0WyXaU=; b=x95L9xnlmlUQG4xbHPtZATyhQtePJU6gfcYvSXHgV9kSV7PApTwWlxlrd4rG1bWRRI V6Cv3ubU3wjh6AR9NavfjE7D27LAIlqVDzeMCJNbBFF+e4NQusAMemtyjVU6IFZqxoYw DmnqBbteKmbi+fXyiaUWf4sE2fj+Mh8y6Daj/tCVLtQALt0AI5mFJ1/cXDI5xXM8pd7y +/M9MgP/fsrkqlRTMjnEAdM26wrlNojogG4l/px6w8vXENT2cenyWfg7m4BzyGPUXXG6 gBlQoHfUNflpI43e7crbaVSQ8E2KlNeWygXYeg0ZPhYkeRRjDdgfWLCGAmkUbyszsx0F wWeQ== X-Received: by 10.180.211.199 with SMTP id ne7mr12869238wic.6.1386602603472; Mon, 09 Dec 2013 07:23:23 -0800 (PST) MIME-Version: 1.0 Received: by 10.216.70.202 with HTTP; Mon, 9 Dec 2013 07:23:03 -0800 (PST) In-Reply-To: References: From: Sebastien Mondet Date: Mon, 9 Dec 2013 10:23:03 -0500 Message-ID: To: =?UTF-8?Q?Daniel_B=C3=BCnzli?= Cc: Anthony Tavener , "caml-list@inria.fr" Content-Type: multipart/alternative; boundary=001a11c3473a9feed104ed1b93ca Subject: Re: [Caml-list] Library installation procedure (for use with OPAM)? --001a11c3473a9feed104ed1b93ca Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Mon, Dec 9, 2013 at 10:04 AM, Daniel B=C3=BCnzli wrote: > Le dimanche, 8 d=C3=A9cembre 2013 =C3=A0 21:55, Anthony Tavener a =C3=A9c= rit : > > Is there a simple example of an appropriate install process suitable for > use with OPAM? I've tried looking at a few existing packages and the > build+install process, as usual, is convoluted... not as obscure as > autotools, but different for each project. Is findlib still applicable? Or > some other means to query the system install directory? > > > For my packages I now generate an opam .install file at the root of the > distribution. This .install file indicates the type of build artefacts you > generated and where they are located. This lets opam figure out where it > should put that. The advantage over using `findlib install` is that it al= so > support installing binaries, man pages, documentation, configuration file= s, > etc. Note that you still want your users to be able to use findlib for > using your package so be sure to also install a META file (no need to use > `findlib install` for that). > > hi Opam's .install files should be used only to fix packages whose installation is already broken or unsufficient, shouldn't it? If you rely *only* on the .install, your package can be installed only with opam, it will break for other users (GODI, WODI, Manual Package Management=E2=84=A2, etc.). I think it's good hygiene to at least provide an ocamlfind-based installation of the libraries. Cheers Seb > At the moment for achieving this I use a very simple build script [2] that > allows you to describe what you want (see [3]), builds what you describe > with ocamlbuild and generates a corresponding .install file. The resulting > opam file for this example is here [4] (the pkg-git invocation is for > massaging the checkout when you pin the package). > > Best, > > Daniel > > [1] See section 2.2.3 in > https://github.com/OCamlPro/opam/raw/master/doc/dev-manual/dev-manual.pdf > [2] https://github.com/dbuenzli/xmlm/blob/master/pkg/pkg-builder > [3] https://github.com/dbuenzli/xmlm/blob/master/pkg/build > [4] https://github.com/dbuenzli/xmlm/blob/master/opam > > > -- > Caml-list mailing list. Subscription management and archives: > https://sympa.inria.fr/sympa/arc/caml-list > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs > --001a11c3473a9feed104ed1b93ca Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable



On Mon, Dec 9, 2013 at 10:04 AM, Daniel B=C3=BCnzli <dan= iel.buenzli@erratique.ch> wrote:
Le dimanche, 8 d=C3=A9cembre 2013 =C3=A0 21:= 55, Anthony Tavener a =C3=A9crit :
> Is there a simple example of an appropriate install = process suitable for use with OPAM? I've tried looking at a few existin= g packages and the build+install process, as usual, is convoluted... not as= obscure as autotools, but different for each project. Is findlib still app= licable? Or some other means to query the system install directory?


For my packages I now generate an opam .install file at the root of t= he distribution. This .install file indicates the type of build artefacts y= ou generated and where they are located. This lets opam figure out where it= should put that. The advantage over using `findlib install` is that it als= o support installing binaries, man pages, documentation, configuration file= s, etc. Note that you still want your users to be able to use findlib for u= sing your package so be sure to also install a META file (no need to use `f= indlib install` for that).



hi

Opam's .i= nstall files should be used only to fix packages whose installation is alre= ady broken or unsufficient, shouldn't it?

If you rely= *only* on the .install, your package can be installed only with opam, it w= ill break for other users (GODI, WODI, Manual Package Management=E2=84=A2, = etc.).
I think it's good hygiene to at least provide an ocamlfind-b= ased installation of the libraries.


Cheers=
Seb




=C2=A0
At the moment for achieving this I use a very simple build script [2] that = allows you to describe what you want (see [3]), builds what you describe wi= th ocamlbuild and generates a corresponding .install file. The resulting op= am file for this example is here [4] (the pkg-git invocation is for massagi= ng the checkout when you pin the package).

Best,

Daniel

[1] See section 2.2.3 in https://github.com/OC= amlPro/opam/raw/master/doc/dev-manual/dev-manual.pdf
[2] https://github.com/dbuenzli/xmlm/blob/master/pkg/pkg-bu= ilder
[3] https://github.com/dbuenzli/xmlm/blob/master/pkg/build
[4] https://github.com/dbuenzli/xmlm/blob/master/opam


--
Caml-list mailing list. =C2=A0Subscription management and archives:
ht= tps://sympa.inria.fr/sympa/arc/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs
--001a11c3473a9feed104ed1b93ca--