Getting Started Guide for Debian/ubuntu packaging tools

Source: Internet
Author: User
Keywords nbsp we compile use source code
Tags added aliyun code compile deb package debian directory file

A number of packages that were not included in the Ubuntu software warehouse were added to the warehouse under a part of the http://www.aliyun.com/zixun/aggregation/13835.html ">ubuntusci" effort. Porting software on other Unix-like systems (or software on other Linux distributions) to Ubuntu Linux is a complex task that takes more time and effort than expected.

Regardless of the Ubuntu software warehouse, any software that has been in the Debian repository for at least 4-5 years will likely be a potential challenge for our porting package. This is a conservative assumption. If you just copy the source code and simply compile it for Ubuntu (or Debian), I believe a lot of people have already done it. Those specific, never-before-ported software are mainly because they do not compile perfectly on debian/ubuntu.

This document is intended for readers who have never tried to make software packages for Debian/ubuntu. Because we found that even if software compiles and runs without errors, the actual process of packaging can still be confusing. I hope that as the project progresses, the community will spend more energy on software package inspection, so that we make the software package quality.

Tools

Novice developers of Ubuntu/debian often find the word "source" confusing. "Source-code" usually refers to a program, or an application (creator), or the source code of a package. When we say "Sources", we refer to the file used to build the package. For example, the "Source-code" of the Package "foo" (source code) is a text file, or a stack of texts, that can produce binary executables after the connection is compiled via GCC, and the "sources" of the "Foo" package, as we call it, Refers to all the files used to build the Debian package for Foo.deb, including source code files.

The basic process for building a Deb package is as follows:

* Download the software source package;
* Unzip the source package to a directory;
* Create a Debian catalog (./debian) in the source directory.
* Modify the files in the/debian directory, such as the details of the package maintainer, package description, etc.;
* Compile source code on the machine;
* Generate. deb package on this machine;
* Upload sources to Launchpad Ppa[1] after we have modified to successfully compile and build the Deb package.

When the software was successfully uploaded to Launchpad and the Deb package was successfully compiled on Launchpad, our work was basically done. Our launchpad PPA source address can be shared with other people who want to use our Deb package. We can even apply to move our Deb Pack into Ubuntu's official main software repository.

The tools that need to be used in this process are at least:

* Browser, or similar software-for downloading software source code package;
* Decompression software-for decompression download back source code package;
* Dh_make (part of Dh-make package)--for automatically creating./debian directories and other skeleton template files for creating. Deb packages;
* Make (Gnu made)-the tools to be used in the build process;
* DEBCHANGE/DCH (part of devscripts package)--for editing the version number of the package;
* Debuild (part of the devscripts package)-run the build process, including compiling the connection, and generating the Deb package;
* Fakeroot (part of Fakeroot package)--this thing is necessary;
* dput--upload the signed Deb file.

It is recommended that all packaging work be done under a newer Ubuntu system, which can greatly facilitate and simplify the entire process.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.