The RPM packaging has been a bit of a problem for me as well, with
binaries or srpms.
First of all, libmysqlpp.so itself (the symlink) doesn't show up as a
file owned by the package, because it's only created and destroyed
during %post & %postun stages of the installation. This had two effects:
1) installing two different versions did not create a conflict; this
could be considered handy, if you had some reason to link to two
different versions of the library, but I think that's kind of far
fetched. More likely, it gave us some difficult-to-detect bugs, but I'm
not completely sure.
2) doing rpm -Uvh new.i386.rpm ... deleted the symbolic link without
recreating it. honestly, that seems like a bug, to me, in the upgrade
process to run %postun for the old version before doing %post for the
new one.
I don't yet completely understand the -soname option to gcc (is that
what it's from? I'll read up on it soon, I suppose), but what I did in a
locally modified .spec file is take out the ln and rm commands from
%post and %postun (respectively), and added
pushd $LIBDIR && ln -sf libmysqlpp.so.%{version} libmysqlpp.so && popd
to the %install area, and
/usr/lib/libmysqlpp.so
to the %files area.
Also, I've read that RPM automatically detects dependencies, but it did
not appear to do so, when I was using rpmbuild (RPM version 4.2.3).
What do you think is wrong with writing a patch for the Makefile (i
presume to add -soname to the gcc options)?
-Jack Eidsness
Before I joined the mailing list, Remi Collet wrote:
> I'm working on the RPM packaging of MySQL++ (for Fedora)
>
> In the provided specfile we can see
>
> ...
> mv $LIBDIR/*.so $LIBDIR/libmysqlpp.so.%{version}
> ...
> ln -sf /usr/lib/libmysqlpp.so.%{version} /usr/lib/libmysqlpp.so
>
>
> But this is not useful as the shared library is not build with -soname flag.
>
> More, this should use the ABI version, not the source version as this is
> used to detect ABI changes (which require a rebuild).
>
> I think ABI version is 2.0.0, according to
> http://tangentsoft.net/mysql++/doc/userman/html/breakages.html
>
> I'm searching a way to enable this using bakefile but i don't really
> find useful documentation on this.
>
> Can you point me to some good sources ?
>
> Of course, i could make a patch for Makefile.in, but i really think it's
> not a good solution.
>
> I also really think this should be take upstream, so i'd like to make a
> patch proposal of my work.
>
> Regards