scsh-hackers
[Top] [All Lists]

Re: Debian and scsh packaging proposal

To: Martin Gasbichler <gasbichl@informatik.uni-tuebingen.de>
Subject: Re: Debian and scsh packaging proposal
From: Lionel Elie Mamane <lmamane-scsh@conuropsis.org>
Date: Sun, 17 Oct 2004 23:06:52 +0200 (MST)
Cc: scsh-hackers@scsh.net, lmamane-scsh@conuropsis.org
List-id: Discussion among the implementors <scsh-hackers.list-id.scsh.net>
Mail-followup-to: lmamane-scsh@conuropsis.org, Martin Gasbichler <gasbichl@informatik.uni-tuebingen.de>, scsh-hackers@scsh.net
Reply-to: lmamane-scsh@conuropsis.org
Sender: Lionel Elie Mamane <master@tofu.mamane.lu>
Sorry I took so much time to react; I moved since then and it has
sucked a lot of my time, along with summer school, conferences, a bit
of holidays, etc.

On Wed, Jul 28, 2004 at 04:45:53PM +0200, Martin Gasbichler wrote:
> Lionel Elie Mamane <lionel@mamane.lu> writes:

>> (I'm the maintainer of the Debian package of scsh.)

>> I was looking into what it would take to make the Debian package of
>> scsh play nice with the packaging proposal and I noticed that right
>> now (mostly) everything is stuck in /usr/lib/scsh. Most of these
>> files (*.scm) look architecture-independent at first glance to me;
>> in this case, they should be in /usr/share/scsh/.

> The files in the scsh/ subdirectory are not really needed after
> installation because all this code is already contained in the
> image.

> The architecture-dependent files are the ones that live in the
> machine/ directory, i.e.

> However, I don't know why the dirctory structure below scsh/ is
> flattened during installation.

It's worse, actually: for the machine/ directory, the files for the
last architecture (alphabetically, currently that's sun) win and get
installed. So on my Debian/GNU Linux system, I get the .scm files for
a sun machine in /usr/lib/scsh/scsh/ :-|

I changed the Makefile.in to install only from the non-architecture
directories in scsh and from machine/ . I also changed it to use
$prefix/share (@datadir@) instead of $prefix/lib (@libdir@) for
architecture-independent files.

For backwards-compatibility reasons, I put symlinks in libdir for the
things in datadir.

I also significantly revamped my Debian package in order to permit
parallel installation of scsh 0.6, 0.7, 1.0, etc. I understood from
the intent of the packaging proposal that the major/minor version
number is what versions the API.

My Makefile.in changes also include separation of program installation
and documentation installation (mainly so that I can put the
documentation in another package).

A few comments about my Makefile.in changes:

-RUNNABLE = scsh
+RUNNABLE = scsh-0.6

You may not want to include this change in your distribution; I made
it so that now everything installs as scsh-0.6. When scsh 0.7 will
come, everything will install as scsh-0.7, etc. I then create symlinks
from /usr/bin/scsh to /usr/bin/scsh-newest_version. I'll be happy to
have it as a Debian-specific change, meaning something that is not in
your tarball, but that I put in the sources of the Debian package.

-dirs:
-       for dir in $(libdir) $(bindir) $(incdir) $(LIB) $(mandir) $(htmldir); 
do\
+dirs: go
+       for dir in $(libdir) $(bindir) $(incdir) $(LIB) $(DATA) $(mandir); do\
                { mkdir -p $(DESTDIR)$$dir && [ -w $(DESTDIR)$$dir ]; } || {    
\
                        echo "$(DESTDIR)$$dir not a writable directory" >&2;    
\
                        exit 1;                                         \
        }                                                               \
        done &&                                                         \
+       LIBRPATH="`./go -s relative-from-absolute.scm '$(DATA)' '$(LIB)'`" &&   
\
        for dir in                                                              
\
-               rts env big opt misc link srfi scsh doc/scsh-manual             
        \
-               doc/s48-manual/html doc/scsh-paper/html cig; do                 
\
+               rts env big opt misc link srfi scsh; do                 \
+               { mkdir -p $(DESTDIR)$(DATA)/$$dir && [ -w 
$(DESTDIR)$(DATA)/$$dir ]; } || {    \
+                       echo "$(DESTDIR)$(DATA)/$$dir not a writable directory" 
>&2;    \
+               exit 1;                                                         
\
+               };                                                              
\
+               if [ "$$dir" != "scsh" ]; then                                  
\
+                 ln -s $${LIBRPATH}/$$dir $(DESTDIR)$(LIB)/$$dir;              
\
+               fi;                                                             
\
+       done && { mkdir -p $(DESTDIR)$(LIB)/scsh   && [ -w 
$(DESTDIR)$(LIB)/scsh   ]; } ||      \
+               { echo "$(DESTDIR)$(LIB)/scsh not a writable directory" >&2; 
exit 1; }
+

For Debian-internal reasons, I needed the compatibility symlinks to be
relative and not absolute. I thus wrote an scsh script to compute the
shortest relative symlink from $(LIB) to $(DATA), and I use it
here. That's probably horrendously complicated for "general
consumption" and for your distribution. I'll be happy to have it as a
Debian-specific change. You may want to simply use absolute symlinks
in your distribution.

The same in the install-scsh target.


Best Regards,

-- 
Lionel

Attachment: scsh-Makefile-debian-0.6.6-5.diff
Description: Text document

<Prev in Thread] Current Thread [Next in Thread>