views:

58

answers:

3

I have written an open source (GPL) application for Linux and OSX and now wish to distribute it. Is it normal to distribute the source code along with the binaries by default, or just provide a link to where it can be obtained?

If I include the source files, where is the normal location for writing them on the users system for Linux and OSX (I thought /usr/local/src but on my Ubuntu machine, supposedly chock-full of open source apps, this directory is empty).

+4  A: 

It is usual to distribute the sources and binaries separately. Binaries would normally be distributed in distro-specific package formats whilst sources would be a simple .tar.gz containing a project folder. The user could unpack it to /usr/local/src if they wanted but it should build anywhere. It's not up to your program to drop its sources in any particular location.

I thought /usr/local/src but on my Ubuntu machine, supposedly chock-full of open source apps, this directory is empty

It will be empty if you are only using the Ubuntu repos. The OS is in charge of /usr and will drop any sources you install into /usr/src. But /usr/local is left for you to play with; that's where you install stuff that the distro doesn't provide.

bobince
A: 

It's worth looking at a few projects on Sourceforge (http://www.sf.net). As menioned by @bobince it's normal to distribute binaries and source separately. It's certainly kind to users not to require compilation so they can download and run.

peter.murray.rust