Package from source code in Ubuntu

Source: Internet
Author: User
Sudo apt-Get install build-essential fakeroot DH-make

Tar zxvf wbuscanner-0.1.0.tar.gz
CD wbuscanner-0.1.0
Dh_make-e china.newlad@gmail.com-f ../wbuscanner-0.1.0.tar.gz
Enter s, and then press OK.
Dpkg-buildpackage-rfakeroot

The name of the package must conform to the general rules of linux. the file name is ".tar.gz" and the name of the decompressed folder must be the same as that of the package. Otherwise, the package name will not work.
Than emacs23-20080310.tar.gz after decompression is Emacs, you must change to emacs23-20080310

Where-e china.newlad@gmail.com is the e-mail of the specified maintainer,-F is the compressed package of the specified source code
After entering dh_make..., multiple options will be entered. We can select S.

To modify the package description, you only need to find the control under the Debian directory. The last two lines let you fill in the package description

There is a Debian directory in the root directory. Some configuration files about the package include control and rules.
Control is about the package description, dependencies, and so on, while rules is the compilation rule. If the compilation package requires a special parameter or other compilation statements, you can change it here,

For example, when packaging Emacs, make Bootstrap instead of make is required. At this time, in the build-stamp of rules
# Add here commands to compile the package.
$ (Make)
Change
$ (Make) bootstrap

Similarly, if you need to specify some parameters during configure, find the configuration statement starting with. Configure in config. Status and add yourself to it.
The specified parameter.

. /Configure -- Host = $ (deb_host_gnu_type) -- Build = $ (deb_build_gnu_type) -- prefix =/usr -- Mandir =/$ {prefix}/share/man -- infodir =/$ {prefix}/share/INFO cflags = "$ (cflags) "ldflags ="-wl,-Z, defs"

Add the parameter -- With-xft -- With-x

. /Configure -- With-xft -- With-X -- Host = $ (deb_host_gnu_type) -- Build = $ (deb_build_gnu_type) -- prefix =/usr -- Mandir =/$ {prefix}/share/man -- infodir =/$ {prefix}/share/INFO cflags = "$ (cflags) "ldflags ="-wl,-Z, defs"

After the modification, return to the source code root directory, where dpkg-buildpackage-rfakeroot is enough.

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.