From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: HiPhish Newsgroups: gmane.lisp.guile.user Subject: Make a library installable? Date: Sun, 12 May 2019 16:50:28 +0200 Message-ID: <6372591.9J7NaK4W3v@aleksandar-ixtreme-m5740> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="165169"; mail-complaints-to="usenet@blaine.gmane.org" To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Sun May 12 17:00:52 2019 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hPpy8-000gq2-19 for guile-user@m.gmane.org; Sun, 12 May 2019 17:00:52 +0200 Original-Received: from localhost ([127.0.0.1]:44030 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hPpy7-0001qb-3y for guile-user@m.gmane.org; Sun, 12 May 2019 11:00:51 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:35998) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hPpwx-0001K1-AH for guile-user@gnu.org; Sun, 12 May 2019 10:59:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hPpoF-0007W4-U9 for guile-user@gnu.org; Sun, 12 May 2019 10:50:42 -0400 Original-Received: from mout01.posteo.de ([185.67.36.65]:52975) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hPpoF-0007Tc-FC for guile-user@gnu.org; Sun, 12 May 2019 10:50:39 -0400 Original-Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id 848D2160071 for ; Sun, 12 May 2019 16:50:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1557672634; bh=lSFMMyazOd9+CF8nUrWvSC8hWry2lpKNqOlTNom2oww=; h=From:To:Subject:Date:From; b=lMmAF5MUNWgz59U8weI+iIdypR/n7vbYe+GcQIbbThMst0ZQMgphBsedZgO+0s1H9 ey0H4kkRmCqwFuCRXUtPxts+hMfZcPOS/keiJlt+/wuyRGNg8T2u15KwyoaUZR5vzh lIJlqKqWlR7UcRxW0KXvLQeK03FZ25eGxH3igHmJ++cp2NDmtrMaqZHPn+nBSE4bRj exNr/KFrJqCGvYyYeabU9rypRs9cJ2LzR74PDGWrR0nNBD3pzIKfYofnI9etss9sMm VBRwP3VqOg4rcn3Ga3JGM2cX8e8wXk8zJOH1hW6hinfzZCq7CHREXHztoO49pY6H2l dF92TyvzRtw9g== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4526Ly02QKz6tmF for ; Sun, 12 May 2019 16:50:33 +0200 (CEST) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 185.67.36.65 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.org gmane.lisp.guile.user:15463 Archived-At: Hello Schemers, A while ago I presented my MessagePack implementation for Guile[1] here and I want to make it available to users. Guile has no dedicated package manager, so it's either manual or Guix, and I would like to support both. What it the best way of doing it? So far I have a repository that can be used right away with Guile by adding its path to the load path. This is handy for testing and working where I just just invoke Guile as `guile -L .`. For more permanent installation I have a makefile, it "builds" everything into `./build` (i.e. inside the repo) and from there the user could copy-paste the files into the desired directory. I was thinking of adding an "install" target to the makefile which would copy the directory structure of `./build` to the directory given by `$PREFIX`. The user could then type make lib doc && make PREFIX=/usr/local install to get everything installed globally. A package manager like Guix could just specify a different `PREFIX`. Is this reasonable? And where exactly should the Guile code be placed? I have $(PREFIX)/share/guile/site/$(guile_ver)/msgpack as the directory for now. The value of `$guile_ver` is determined automatically at build time: guile_ver = $(shell $(GUILE) -c '(display (effective-version))') This would only make the module available for Guile 2.2, no other version. Is there a better directory? I guess I could use GNU Autotools instead of a manually written makefile, but I would rather stick to what I know and is simple for such a simple project. [1] https://gitlab.com/HiPhish/guile-msgpack