Friday, June 5, 2015

Tagged Under:

Create Simple Debian Package

By: sachin On: 10:10 PM
  • Share The Gag
  • Creating debian packages

    All major linux system has their own packaging system, Such as rpm for red hat package manager, .deb for Debian systems and there are several more formats. This article deals with the creation of a very simple .deb / Debian package of a python script, this method of debian package also works for java and c scripts , but in case of complex software which need several dependencies this is not suitable.


    What is a Debian (.deb) package
    A package is the collection of necessary data in specified format which enables the operating system to fetch necessary information about the script/software which you are going to install. This concept is used all the modern day computer Operating systems like windows (.exe ) which is also a package with extension .exe.
    SIMPLE PACKAGING OF A PYTHON SCRIPT
    1. Create a folder with any name on your home eg: mypyscript.
    2. Open the folder and create two folders with names ‘DEBIAN’ and ‘usr’.
    3. Open the folder DEBIAN. Create a text file (without extension) with name ‘control’ there.
    4. Open ‘control’ and type as follows and save it on DEBIAN
    Package: mypyscript
    Version: 0.01
    Architecture: all
    Maintainer: your name<your mail id>
    Installed-Size: 2
    Depends: python-appindicator
    Section: extras
    Priority: optional
    Homepage: your homepage
    Description: describe
    5. Back to the folder named mypyscript. Open ‘usr’. Create a folder named ‘bin’. Open ‘bin’ and
    paste your pythonscript file there.
    6. Back to the home folder where the folder ‘mypyscript’ lies or close the file browser.
    Open terminal. Be sure that terminal is in the home folder. type dpkg -b mypyscript .Then
    press enter. In seconds your deb package is ready
    Note: This is just a simple packaging.

    0 comments:

    Post a Comment