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

Shared libraries and symlinks



I sent this (attached) a couple of days ago and didn't get a reply.  Not to
worry - I've since found out how to make it work.  Maybe I should become a
mentor :-)

It turns out that the way to build the symlink for a shared library package
is more or less this:

- in the rules file, in the install section, copy the shared library to
wherever it belongs in the debian/tmp target hierarchy, eg
debian/tmp/usr/X11R6/lib
- then, have the makefile (rules) cd to debian/tmp/usr/X11R6/lib, ln -s
<libraryfile> <symlink>, and cd back up again.
- the magic is that dh_movefiles does the clever stuff for you.  It leaves
the job of moving the symlinks (to the tar file) until last.

So, things I wish I'd known:
- debhelper and dh-make are what you want.  deb-make doesn't seem to do all
this.  (I know it's "deprecated" but there's a lot of manuals to wade
through !)
- Section 12 of the packaging manual, which discusses this, needs updating,
with something like
  ** NOTE FOR NEWBIES - DON'T PANIC - DH_MOVEFILES DOES ALL THIS **
- in fact, I wonder if there isn't a need for "yet another" introduction to
packaging, possible based on a combination of the packaging manual and Josip
Rodin's guide.  I would be happy to help with such a document, if only to
check it for newbie-proof-ness.

Another thing which would be REALLY USEFUL would be if there was a source
archive containing the debian directory.  The .orig archive is cool but
doesn't let us build an exact copy of the package.

---------------------------------------------------------------
|\ | o  _ |/                               Life's like a jigsaw
| \| | |_ |\                          You get the straight bits
                    But there's something missing in the middle

Nick Brown, Strasbourg, France (Nick(dot)Brown(at)coe(dot)fr)
---------------------------------------------------------------

---------- cut here for original post ----------
This is my first post - hope this works...

The scenario:
I'm trying to install KDE 1.1 on Debian 2.1.  The KDE .deb files depend on
libqt 1.42.  Debian ships 1.40.  (Of course, I know _now_ that 1.42 is in
unstable, but in the meantime, I've got interested in this problem - and I'd
like to use this method to fix similar problems in future when maybe there
isn't an unstable version).

So, I thought, I'll get QT 1.42 from Troll (easy to build, works great), and
then build my own (internal use only, no PGP stuff, etc) libqt_1.42 package
to keep dpkg happy.  (I don't like to use --force-depends, that way you miss
other, more important dependencies).

Well, I've been hacking my way through the "how to build .deb"
documentation.  I think at the end of this, I shall write my own, but that's
another story.  They all, of course, discourage you from doing a shared
library as your first package!

I decided as my benchmark of my package to see if I could convince lintian
to OK it.  It's certainly educational - lintian seems to set very high
standards.

Currently my problem (we're getting to the question now :-} ) is the
symlink.  I need to provide a symlink libqt.so.1 to the file libqt.so.1.42.
But this has to be after the shared library file in the archive.  Can anyone
supply an example of a rules file which does this ?  Section 12 of the
packaging manual is rather obscure in this area.  Better still, could
someone provide an example rules file for a shared library binary ?



Reply to: