LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   get, modify and compiling source code (https://www.linuxquestions.org/questions/linux-newbie-8/get-modify-and-compiling-source-code-539463/)

peji 03-21-2007 06:33 PM

get, modify and compiling source code
 
Hi all,

I was wondering if somebody knows where to find a How-to, article or whatever related to what I'd like to do.
This is I'd like to get a source code from a particular package, I know this is possible by using apt-get source command and in fact there are some articles I've read in Debian web site but I'd like to go a little bit far I mean, once I have downloaded the code I'd be interested in modifying and compiling it.

Any comment related to this issue will be welcome.

Thanks in advance.

XavierP 03-21-2007 06:43 PM

Well done? As long as you know how it was put together and can program you should be fine.

peji 03-21-2007 06:53 PM

hi,

yes, for sure when I'm talking of modifiying the code I know that's a thing I have to make it alone :study: , my request is if someone knows about an example article that includes step by step, with an example, the way to proceed.

Sorry for the missunderstanding.

thanks in advance.

Dark_Helmet 03-22-2007 01:44 AM

Well, you don't need an article... If you've done much programming, it should be straightforward.

The traditional way I do it is:
  1. go to Freshmeat
  2. search for the package name
  3. download the most recent tarball
  4. create a temporary workspace to work in
  5. un-tar the tarball into the workspace
  6. start modifying the code

When you're ready to compile, run the configure script (if one was provided - and you only need to run it once), and then issue "make" as usual. Then after it finishes compiling, try out your new version by running it from within the workspace before copying/installing it into the system.

Which step are you having trouble with?

peji 03-22-2007 04:00 AM

hi,

first of all thanks for your comments.

That's not a particular point that I'm having troubles with. I have just begun to work with Linux and I didnīt have a clear idea how the programming environment works, in terms of where the header and libraries are for example, and in case I'd like to modify and compiling a source code if I had to change or referencing those headers or libraries in a particular way so I read that Debian had an application which was able to download the code sources for whatever package you want, I'm talking about apt. I have just know, by your commments, that I can go to Freshmeat web site in order to download sources from there, I suppose Debian also can manage getting sources from this website through apt, am I right? how can we do this?

again, thanks for your feedback.

regards.

Harmaa Kettu 03-22-2007 05:27 AM

This seems to be exactly what you were asking for.

peji 03-22-2007 07:16 AM

hi,

thanks Harmaa, yes it's an approach, although after reading the post comments, if you check the last one you could see that there is a guy who is asking the same as me, the post is:


**********************************************


I'm trying to modify apache source.

That's what i did

apt-get update
apt-get source apache

to get the source, but...

I actually can't find any c.file !

Clearly i've got lots to learn.

I googled massively on the subject, but i didn't find a practical example of:

- getting debian package (source, of course)
- unpacking it
- modify sources
- repackage it

What am i missing ?

********************************************

regards.


All times are GMT -5. The time now is 09:02 PM.