Friday, 28 September 2012

Linux packages

I created some time ago the Linux auto installation packages, some people asked me how, so I decide to put all needed files on Github.
Github link is the following:
How to make a Linux package?
It's very simple:
  • first of all you need to create a directory with you package name (for example "rebol")
  • inside this folder you must put the folders that you want to install in pc, the same structure parting from "/" (the roo folder). In my case I needed to copy rebol intepreter in "/usr/bin" and something else in "/usr/share/". So this is my directory structure:
  • As you probably noticed, I also created a "DEBIAN" directory, this is requested by .deb package format. Inside the DEBIAN directory you must put a "control" file. This is my control file:

    Package: rebol
    Architecture: i386
    Installed-Size: 1175
    Section: devel
    Priority: optional
    Depends: libc6, libstdc++6, libx11-6, libxcb1, libxaw7, libfreetype6, libxext6, libxt6, libxmu6, libgcc1, libsm6, libice6, libxpm4, zlib1g, libxau6, libxdmcp6, libuuid1, xfonts-100dpi, xfonts-75dpi
    postinst: mandb; update-app-install
    Maintainer: Massimiliano Vessi <>
    Description: REBOL stands for relative expression based object language.
    Software systems have become too complex,
    layers upon layers of complexity, each more brittle and
    vulnerable to failure. In the end software becomes the
    problem, not the solution. We rebel against such complexity,
    fighting back with the most powerful tool available:
    language itself.
    This package contains the REBOL/View binary
  • Then I added the man pages
  • Then I added the icon to display in the application menu, in "/usr/share/pixmaps/"
  • Then I wrote the rebol.desktop, a file that add rebol in the application panel like this:
    to obtain this result, I wrote the file this way:
    [Desktop Entry]
    Comment=Programming is fun again

    terminal=true is important to start rebol from a terminal, or you won't see console.
  •  Now you must have alien installed, in order to convert the debian package in other formats (RPM, tar.gz, etc.)
  • Launch my script ( and you'll obtain all packages for all linux platforms. My script is very simple:
    #removing old versions
    rm rebol*.deb
    rm rebol*.tgz
    rm rebol*.rpm
    #creating new ones
    dpkg-deb -b rebol
    dpkg-deb -b rebol_amd64
    sudo alien --to-rpm --to-tgz rebol.deb
    sudo alien --to-rpm rebol_amd64.deb
If you have any question, post a comment!

No comments:

Post a Comment