Lesson 11

Dates: 4/10/2014
Application compilation and installation on Linux
Linux for Engineering and IT Applications


Debian/Ubuntu package building


  • When you need to destribute a compiled software you can use tar archives or build .deb packages.
  • Create a directory tree to build a package
    mkdir BUILD
    mkdir -p BUILD/usr/local
    mkdir BUILD/usr/local/bin
    ...
    
    Copy the binaries, libraries, config files into BUILD/usr/local/ directory tree.
    Create subdirectory DEBIAN with the control file and post/pre installation/removal scripts:



  • Building package soft_20100217-0_i386.deb on a 32 bit system.
    cd BUILD
    dpkg -b . /tmp/soft_20120208-0_i386.deb
    
  • The package can be transfered to another Ubuntu or Debian system with similar 32 bit architecture, i386, and installed:
    dpkg -i soft_20120208-0_i386.deb
    
  • On a 64 bit architecture, the package file name suffix is _amd64.deb:
    cd BUILD
    dpkg -b . /tmp/soft_20120208-0_amd64.deb
    dpkg -i soft_20120208-0_amd64.deb
    



  • Take me to the Course Website