How To Compile Everything

Revision as of 07:01, 29 June 2013 by imported>Geofft
  • Is there a README?
    • Read it.

Dynamic languages

  • Is it mostly PHP?
    • Does it need PHP libraries?
    • It probably needs a web server
    • Does it need a database?
  • Is it mostly Python?
    • Is there a setup.py?
      • python setup.py build, python setup.py install, I think.
    • Is there a requirements.txt?
      • Install the things there, maybe with pip or something??
    • Does it need a web server? (Does it need a web server, or does a builtin one suffice?)
    • Does it need a database? (Does it need a database, or does SQLite suffice?)
  • Is it mostly Ruby?
    • Ask someone not me.
  • Is it mostly Perl?
    • Is there a Makefile.PL at the top level, and no Makefile?
      • Run perl Makefile.PL, then follow the Makefile instructions.
      • If you want to set a prefix, run perl Makefile.PL PREFIX=/home/geofft. You don't need to pass the prefix to any other commands.

C

  • Is there a Makefile or GNUmakefile?
    • Usually you can just run make to compile it.
    • Often you can also run sudo make install to install it systemwide. Sometimes this won't exist, and all you get is compiled code in the same directory.
    • If you want to install it, but not systemwide, generally you can use a prefix variable to make it install elsewhere; for instance I might want to set the prefix to /home/geofft so things are in /home/geofft/bin, etc. If there was just a Makefile and nothing special, try running make PREFIX=/home/geofft and make install PREFIX=/home/geofft, without sudo. Or read the Makefile or README.
  • Is there a configure?
    • Usually you can just run ./configure, followed by make and sudo make install, as per the Makefile decision branch.
    • To set a prefix, run ./configure --prefix=/home/geofft.
    • Running configure will error out if it requires something you don't have installed. But check its output, as it might be skipping something optional but useful, that you should have installed.
  • Is there a autogen.sh?
    • Make sure you have autoconf and automake installed.
    • Run ./autogen.sh, then start from the configure decision branch.
    • Rarely, autogen.sh will also run configure for you; if you want to pass options, you can either rerun ./configure yourself, or pass them to ./autogen.sh.
  • Is there a configure.ac or configure.in, but no autogen.sh?
    • Make sure you have autoconf and automake installed.
    • Run autoreconf -fvi, then start from the configure decision branch.

Other things

  • Is there a debian directory? Are you building something Debian-specific?
    • Make sure everything in the Build-Depends line of debian/control is installed. If the package is in the Debian/Ubuntu archive, the easiest way to do this is sudo apt-get build-dep package. This works even if you're building a package from a slightly different source than the one in the archive; it'll get you at least 90% of the way there.
    • Run debuild, which is in the devscripts package.