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

Re: add libssh.pc for pkg-config?


Hi Aris,

Yes I agree it's easier to link with -lssh, but it won't be that easy to
check if the version is >= 0.4. For example, currently I can do this by
checking a new API only in 0.4 like this:

AC_CHECK_LIB(ssh, ssh_option_set, [echo you have 0.4], [echo you have
old version of you don't have libssh at all])

with libssh.pc I can simply say:

PKG_CHECK_MODULES(SSH, libssh >= 0.4)

So this is really the point. But I also agree this could be a packing
issue. But as Bernhard said in the previous email, we should really
consider to keep *at least* source compatibility for future version,
since 0.4. Of course binary compatibility is even better, but I think
people can live without it. :)

By the way, I am using both Debian and Ubuntu, and the libssh-3 package
simply conflict and replace libssh-2 in their repository. I bet they
will do the same thing when packaging libssh 0.4 - conflict+replace 2&3.

Well, this is probably not (yet) a problem for Debian/Ubuntu, since it
seems I am still the only developer that actually have a project
depending on libssh in their repository, and I made my project's
previous version source-compatible with both 0.2 and 0.3. But things is
going to be changed since KDE is in now. :)

Thanks,

Vic

On Fri, 2009-10-30 at 11:33 +0100, Aris Adamantiadis wrote:
> Hi Vic,
> 
> Imho it can't hurt, but more generaly libssh is easy to link to:
> gcc -o program program.c -lssh
> 
> *but*
> 
> It might become a packaging issue. Let's say that someone wants to have
> both libssh0.3.4-dev and libssh0.4-dev: the library files are different
> indeed (libssh.so.0.3.4 and libssh.so.0.4.0) but the include files are
> in the same directory (/usr/include/libssh/).
> Then it may make sense of giving out a script that can point to the good
> include directory (/usr/include/libssh0.4) when needed. That directory
> would have a symbolic link "libssh" to itself so people can continue
> including "libssh/libssh.h" as usual.
> 
> I really think it's a package problem and thus something to provide with
> packages. Anyone have taken a look at the debian package system yet ?
> 
> Aris
> Vic Lee a écrit :
> > Hi,
> > 
> > Does it make sense to add a libssh.pc file to support pkg-config in 0.4?
> > 
> > I think it's quite common to use pkg-config for library development
> > nowadays. Please refer to:
> > 
> > http://en.wikipedia.org/wiki/Pkg-config
> > 
> > This makes it much easier for projects checking for libssh, and it also
> > has native macro PKG_CHECK_MODULES for GNU make systems. And it does not
> > affect any other source codes - just an extra file install
> > in /usr/lib/pkgconfig.
> > 
> > Any comments?
> > 
> > Thanks,
> > 
> > Vic
> > 
> > 
> > 
> 
> 



Follow-Ups:
Re: add libssh.pc for pkg-config?"Bernhard R. Link" <brlink@xxxxxxxxxx>
References:
add libssh.pc for pkg-config?Vic Lee <llyzs@xxxxxxx>
Re: add libssh.pc for pkg-config?Aris Adamantiadis <aris@xxxxxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org