You are not logged in.

#1 2006-08-19 17:52:50

nogoma
Member
From: Cranston, RI
Registered: 2006-03-01
Posts: 217

Questions about packaging libraries (amanith in particular)

In investigating packaging amanith for the FretsOnFire thread, I ran into some problems I'd like to know the general answers for. First off, the source doesn't bother to provide an install option in the Makefile, which isn't that big a deal, since I guess I can use "install -D..." to install the library.

This, however, is where the real trouble begins. amanith distributes and compiles several third party libraries in its package (namely freetype2, libjpeg, libpng, zlib, under '3rdpart' in their tarball). So, obviously, this is going to create file conflicts if I try and install my package when libpng or whatever is already installed. AFAICT, the version amanith is handing out is different than Arch's libpng package, so I can't just overwrite these library files. So, my first question is, in installing a package like this, can I install these in a separate subdir? For example, I tried plunking them (the amanith libs and the 3rd party libs from $amanithdir/lib) all down in /usr/lib/amanith, but that didn't seem to work... perhaps I am just missing a step, possibly involving using ldconfig to add these library files to the linker's cache?

Furthermore, amanith requires some files located in $amanithdir/plugins... these are more shared objects. So, more headaches. My inclination then is to do the following: create /usr/lib/amanith, install the files from $amanithdir/lib to /usr/lib/amanith/lib and from $amanithdir/plugins to /usr/lib/amanith/plugins. amanith also wants some env variables set to help it along (AMANITHDIR, add $AMANITHDIR/lib to LD_LIBRARY_PATH, etc.), so that is perhaps what is complicating this situation...

Maybe I'm making a mountain out of a molehill here, but in general, what are good guidelines for packaging and installing libraries (I guess particularly ones w/o a nice "make install")? Making a messy PKGBUILD for some application is one thing, but I think messing up a library install could have pretty heinous consequences.


-nogoma
---
Code Happy, Code Ruby!
http://www.last.fm/user/nogoma/

Offline

#2 2006-08-19 19:16:36

mpie
Member
From: 404 Not found
Registered: 2005-03-06
Posts: 649

Re: Questions about packaging libraries (amanith in particular)

Put the whole lot in /opt/amarinth.
create an /etc/profile.d/amarinth.sh (just base it on the qt one)

use a .install file to add to /etc/ld.so.conf

Offline

#3 2006-08-19 19:24:17

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Questions about packaging libraries (amanith in particular)

Firstly, disclaimer for this post - I haven't tried any of this, nor am I going to.

Now, the actual post. I have an irrationally deep, visceral, loathing for apps that come tarred up with specific versions of well-known libs. It's like they're saying "We don't trust those libfoo devs, so use our version of libfoo instead." Fortunately, there are others who share this particular quirk, so someone usually comes up with a patch to allow the app to build against external libs. In this case, it is here - or it seems to be anyway. Maybe someone who knows Turkish can confirm? wink
Anyway, try it and see. If it doesn't work, then yes, I suppose some horribly kludgy stuff with /usr/lib/amanith and ldconfig is in order, but I'm not going any further with that, due to that loathing business mentioned above.

Offline

#4 2006-08-19 19:31:04

mpie
Member
From: 404 Not found
Registered: 2005-03-06
Posts: 649

Re: Questions about packaging libraries (amanith in particular)

ok tom nice find will checkout the patch...

one question, what would be the correct patch command (my turkish is no doog)

Offline

#5 2006-08-19 19:44:59

nogoma
Member
From: Cranston, RI
Registered: 2006-03-01
Posts: 217

Re: Questions about packaging libraries (amanith in particular)

Thanks for the advice re: packaging it up into /opt, and following qt's example. I toyed around with some more, and I made some findings, which I'm posting back in the FretsOnFire thread, since I intended this thread to be a more general "ZOMG how do I package libraries?!?!?" thread wink


-nogoma
---
Code Happy, Code Ruby!
http://www.last.fm/user/nogoma/

Offline

Board footer

Powered by FluxBB