LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   /usr/lib klibc question (http://www.linuxquestions.org/questions/slackware-14/usr-lib-klibc-question-779170/)

Daedra 12-31-2009 08:57 PM

/usr/lib klibc question
 
I'm trying to make a klibc slackbuild for personal use. However there is no option to set the libdir and as such is keeps in stalling the libraries to /usr/lib. I'm not overly concerned at this point with the quality of the slackbuild since I'm not going to submit it(not now at least), however I would like to honor the slackware lib directories. So I guess my question is how can set the build to use /usr/lib64 if there is not configure flags?

or is it safe just to change to the temporary package directory and just move the files by hand to /usr/lib64 and then make the package?

Thanks Guys :)
and HAPPY NEW YEAR

gnashley 01-01-2010 03:03 AM

You could probably just move them over, but it would be better to create a patch or use sed to change the paths in the Makefiles before compiling.

Daedra 01-01-2010 03:40 AM

I'm getting fairly familiar with making slackbuilds but there are still some bash that I am learning. Could you point me to any guides or howto's? Or also some reference slackbuilds with the sort of sed commands your talking about.

Thanks

Daedra 01-05-2010 06:43 PM

Quote:

Originally Posted by gnashley (Post 3810607)
You could probably just move them over, but it would be better to create a patch or use sed to change the paths in the Makefiles before compiling.

Quick question. Please forgive me if I'm wording this incorrectly. I have my klibc build finished, I just need to get this libdir part worked out. I looked through the Makefile and found the section that deals with libdir... from Makefile

# Location for installation
export prefix = /usr
export bindir = $(prefix)/bin
export libdir = $(prefix)/lib
export mandir = $(prefix)/man
export INSTALLDIR = $(prefix)/lib/klibc
export INSTALLROOT =

Now if I manullay edit the libdir and INSTALLDIR line to /usr/lib64 it will install correctly to lib64, however this ugly since If I decide to use the build on my i486 machine then I will have to edit the Makefile by hand and change it back. Like you said above I should probably use sed or make a patch. I'm not to familiar yet with sed, but I am learning :). So I guess my question is, if I write a patch that fixes the lib64 path issues, how would I tell the slackbuild to say use the patch for x86_64 and to ignore it if I am using i486? I think I got an Idea how to do this, you would use the if and then command?

Or is it possible to patch the Makefile so that it can automatically recoginze what ARCH I'm using and act accordingly?


Thanks for the help guys.

gnashley 01-06-2010 12:47 AM

To create the patch esaily, use 'gendiff':
'cp Makefile Makefile.00'
Then hand edit Makefile. Then, from inside the sources:
gendiff . .00 > ../klibc-libdir.diff
That will place the diff above the toplevel of the sources. Then, in you SlackBuild:
Code:

if [ $ARCH = x86_64 ] ; then
 patch -p1 < $CWD/klibc-libdir.diff
fi

Place the above just after the line where you cd into the unpacked sources.

Daedra 01-06-2010 03:25 AM

Quote:

Originally Posted by gnashley (Post 3815795)
To create the patch esaily, use 'gendiff':
'cp Makefile Makefile.00'
Then hand edit Makefile. Then, from inside the sources:
gendiff . .00 > ../klibc-libdir.diff
That will place the diff above the toplevel of the sources. Then, in you SlackBuild:
Code:

if [ $ARCH = x86_64 ] ; then
 patch -p1 < $CWD/klibc-libdir.diff
fi

Place the above just after the line where you cd into the unpacked sources.

thanks so much man, It's working perfectly now :). Big thanks for the gendiff heads up.


All times are GMT -5. The time now is 12:35 AM.