Ubuntu – How to compile a program from launchpad

ccompilinglaunchpad

I tried looking through the documentation but I couldn't figure it out. make and ./configure don't work so I thought I would ask here.

I'm trying to install this ( https://launchpad.net/livewallpaper ) on 13.10. I've extracted it to /usr/local/src. I've installed build essentials, checkinstall, cvs, mercurial, git-core, and subversion.

What terminal commands do I need to run to install it?

colton@Persistence:/usr/local/src/livewallpaper-0.4.1$ make
make: *** No targets specified and no makefile found.  Stop.
colton@Persistence:/usr/local/src/livewallpaper-0.4.1$ ./configure
bash: ./configure: No such file or directory
colton@Persistence:/usr/local/src/livewallpaper-0.4.1$ 

Best Answer

Don't bother using make yourself. The software source comes with a debian/ directory which means you can build the packages yourself.

  1. Install some basic build dependencies:

    sudo apt-get install dpkg-dev build-essential bzr
    
  2. Do a checkout of the code:

    bzr branch lp:livewallpaper
    
  3. Go into the downloaded source:

    cd livewallpaper
    
  4. Attempt to build the package:

    debuild -uc -us
    

    As this is a plain source directory and no classic debian .dsc or apt-get source download you might see this warning:

    This package has a Debian revision number but there does not seem to be
    an appropriate original tar file or .orig directory in the parent directory;
    [...]
    

    Answer "y".

  5. It will probably fail first with a line:

    dpkg-checkbuilddeps: Unmet build dependencies: [...]
    
  6. Install the build dependencies from the step above:

    sudo apt-get install [...]
    
  7. Build again:

    debuild -uc -us
    

    That will take a while.

  8. Install the packages that were built:

    $ ls -al ../livewallpaper*.deb
    -rw-r--r-- 1 gert gert 966020 Oct 16 01:32 livewallpaper_0.4.1-0_amd64.deb
    -rw-r--r-- 1 gert gert  84242 Oct 16 01:32 livewallpaper-config_0.4.1-0_amd64.deb
    -rw-r--r-- 1 gert gert  45874 Oct 16 01:32 livewallpaper-config-dbg_0.4.1-0_amd64.deb
    -rw-r--r-- 1 gert gert 142000 Oct 16 01:32 livewallpaper-dbg_0.4.1-0_amd64.deb
    -rw-r--r-- 1 gert gert  15744 Oct 16 01:32 livewallpaper-dev_0.4.1-0_all.deb
    -rw-r--r-- 1 gert gert  47258 Oct 16 01:32 livewallpaper-doc_0.4.1-0_all.deb
    -rw-r--r-- 1 gert gert  73196 Oct 16 01:32 livewallpaper-indicator_0.4.1-0_amd64.deb
    -rw-r--r-- 1 gert gert  13118 Oct 16 01:32 livewallpaper-indicator-dbg_0.4.1-0_amd64.deb
    -rw-r--r-- 1 gert gert  10680 Oct 16 01:32 livewallpaper-nautilus_0.4.1-0_amd64.deb
    

    Install them with dpkg -i ../livewallpaper*.deb

  9. The above step might fail with unmet dependencies if you install the packages on another machine than you built them on. In that case, run sudo apt-get install -f to resolve them and it will finish the installation of the livewallpaper packages.