[PLUG] Compile from source to .deb or .rpm package?

Aaron Burt aaron at bavariati.org
Tue Jun 4 23:00:44 UTC 2013


On Tue, Jun 04, 2013 at 12:03:17PM -0700, John Jason Jordan wrote:
> There is a free open source software on Sourceforge that I would like
> to compile to packages. I assume this can be done, but I need some
> clues where to start.

Exciting stuff.  Here's some general options, from easiest to hardest:
1. Find a package someone else already built.
2. Build from source and use as-is, unpackaged.
3. Build a package using a manifest from a similar or older version.
4. Build a package from a new manifest.

1. Finding a package:
Many folks build packages that never make it into the regular repositories.
Often those are gathered into other repositories, such as EPEL or DAG (RPM)
or Launchpad (DEB).  Others just sit on webpages and such, waiting to be
Googled.  Those packages can be installed, though you might want to add the
repo so you get any dependent packages.

2. Building from source:
You already looked for a package, and just want to try a program out.
Download the tarball, expand it ("tar -zxvf blah.tar.gz" or
"tar -jxvf blah.tar.bz2") and look for README and INSTALL files.
Also look for "Makefile" or "configure".
You will probably have to install development tools and libraries to build
the program, INSTALL may have some info on that.  On Ubuntu/Debian, that's
covered by the "build-essential" package, on CentOS/RH, the "Development
Tools" group.  After that, there will be some libblah-dev or libblah-devel
packages to cover some specific libraries used by the program.  I usually
take a "run make, install libraries when it breaks, repeat" approach.

3-4. Building your own package:
If you are supplying the program for ther Linux users or for many machines,
it may be worth setting aside a few days to learn how to package it
yourself, or convincing someone to do it for you.

If you can say what program it is, folks might be able to offer more
specific pointers.

Regards,
  Aaron



More information about the PLUG mailing list