libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: OS-sympathetic installation (fwd)


From: David Lee
Subject: Re: OS-sympathetic installation (fwd)
Date: Wed, 14 Feb 2001 17:52:16 +0000 (GMT)

On 14 Feb 2001, Tom Tromey wrote:

> >>>>> "David" == David Lee <address@hidden> writes:
> 
> David> But any such project would, I think, have a "libtool"
> David> interaction, and I know almost nothing about the insides of
> David> libtool.  It would seem to require a variant of "libtool
> David> --mode=install" that doesn't actually do the install/cp/chmod
> David> commands, but instead could produce information (or a file?)
> David> listing sources destinations, permissions, etc. (which could
> David> then be used to build the OS-native package definition).
> 
> Why not just include libtool in the package and invoke `libtool
> --mode=install'?

As I say, I'm a raw beginner, so I'm probably overlooking something basic
and perhaps obvious.  But using a sample example (GNU gdbm) we have:

   draco [sparc.sunos5] 36% make -n install
   ../mkinstalldirs /usr/lib /usr/include /usr/man/man3 /usr/info
   /bin/sh ./libtool install -c libgdbm.la /usr/lib/libgdbm.la
   /usr/local/gnu/bin/install -c -m 644 -o bin -g bin gdbm.h /usr/include/gdbm.h
   /usr/local/gnu/bin/install -c -m 644 -o bin -g bin ../gdbm.3 \
           /usr/man/man3/gdbm.3
   /usr/local/gnu/bin/install -c -m 644 -o bin -g bin ../gdbm.info \
           /usr/info/gdbm.info
   draco [sparc.sunos5] 37% 

Then using its "/bin/sh ./libtool install ..." (but with a -n flag for this
illustration so it doesn't interfer with my real installation):

   draco [sparc.sunos5] 37% /bin/sh ./libtool -n install -c libgdbm.la 
/usr/lib/libgdbm.la
   install -c .libs/libgdbm.so.2.0.0 /usr/lib/libgdbm.so.2.0.0
   rm -f /usr/lib/libgdbm.so.2 /usr/lib/libgdbm.so
   (cd /usr/lib && ln -s libgdbm.so.2.0.0 libgdbm.so.2)
   (cd /usr/lib && ln -s libgdbm.so.2.0.0 libgdbm.so)
   install -c libgdbm.la /usr/lib/libgdbm.la
   install -c .libs/libgdbm.a /usr/lib/libgdbm.a
   ranlib /usr/lib/libgdbm.a
   chmod 644 /usr/lib/libgdbm.a

But the "big picture" is to be able to produce something along the lines of:

   # Directories...
   $prefix=/usr
   $exec_prefix=${prefix}
   $libdir=${exec_prefix}/lib
   $mandir=${prefix}/man
   $infodir=${prefix}/info
   $includedir=${prefix}/include
   $srcdir=..
   
   # Product information
   %license ${srcdir}/COPYING
   %readme ${srcdir}/README
   %description key/value database handling
   %version 1.8.0
   
   # Manpage extensions...
   $MAN3EXT=3
   
   # Installables
   %system all
   f 0555 root sys ${libdir}/libgdbm.so.2.0.0 .libs/libgdbm.so.2.0.0
   l 0555 root sys ${libdir}/libgdbm.so.2 libgdbm.so.2.0.0
   l 0555 root sys ${libdir}/libgdbm.so libgdbm.so.2.0.0
   f 0555 root sys ${libdir}/libgdbm.la libgdbm.la
   f 0644 root sys ${libdir}/libgdbm.a .libs/libgdbm.a
   
   f 0444 root sys ${includedir}/gdbm.h gdbm.h
   
   f 0444 root sys ${mandir}/man3 $srcdir/*.$MAN3EXT
   f 0444 root sys ${infodir} $srcdir/*.info

(which particular case happens to be suitable for ESP's "epm" generic
package manager).  "libtool" would need to be responsible for the lines
containing "libgdbm".

As I say, I'm floundering, and may be overlooking something obvious.


-- 

:  David Lee                                I.T. Service          :
:  Systems Programmer                       Computer Centre       :
:                                           University of Durham  :
:  http://www.dur.ac.uk/t.d.lee/            South Road            :
:                                           Durham                :
:  Phone: +44 191 374 2882                  U.K.                  :




reply via email to

[Prev in Thread] Current Thread [Next in Thread]