Develop software with open source tool: new software development

xiaoxiao2021-03-06  46

DEB file pack

Introduction

DEB files should be written before packaging, including Scripts like pkgtools, Debian also has these ScriptsTall Preinstall PostRemove preremove, which is like Solaris, can be used, where the most important information is a name called Control files

Some tools needed

Two of DPKGDPKG-Deb is the most basic if they want to become debian's Distribution developers, because they have some game rules, including Source Code's revision, the rules such as the necessary files, the following suite will help you, if you don't want Submit Your debM Set to Debian, you don't have to install it.

DH-MAKE Makes the necessary information of the Sample file, which is actually a very useful debhelper dh-make, Dependencydevscripts Some ScriptsFakerOot pretend to be root Tools Lintian Tools and check Package files

Establish a step

Deb must have Source Tree, standing on the top of Source Tree, directly

$ DH_MAKE helps you build a directory called Debian and write a bunch of sample and change it, I use CSCope 15.1 to do an example.

First go to cscope.sourceforge.net to catch the original file .tar.gz Back unwounded in /Home/cyril/cscope-15.1, so you must use pkgname-version to enter CSCope-15.1 in the top of Source Code DH_MAKE, will create a directory called Debian, then change the inside of the information, there are two cases, want to be debian's Distribution developer, if there is a Configure file to execute directly

$ DPKG-BuildPackage -rfakeroot, will call Configure to create makefile, otherwise you want to create a Makefile called DPKG-BuildPackage -rfakerOot you will create xxxx.deb yourself. Just want to pack a suite without sending the package to the Debian organization, just need to install it into a fake root directory.

$ ./configure --prefix = ~ / fakeroot / usr / $ make; make install built a directory called Debian in ~ / Fakeroot, which is to put a set of SpriPTS files with the installation of the SLR.

ControlPreinst Four Shell Script files will be automatically called this. POSTINST can see / var / lib / dpkg / info example prerrrPostrm Fakeroot is like a fake root directory, want to put files to / etc / or / usr Put it in Fakeroot / etc / fakeroot / usr / share / doc under / share / doc. Outside Fakeroot

$ DPKG -B FAKEROOT CSCOPE_15.1.0_i386.deb creates a DEB file with a naming runture pkgname_version_cpuarch.deb. Version usually has three layers of Level, Ver.Patch.SUBLEVEL. Not necessarily abide by. use

$ dpkg -c cscope_15.1.deb See those files, with

$ dpkg -i cscope_15.1.deb See those information.

The meaning and use format of the insignment, the two methods are different, and the general developers will be better in Debian's debi, and the developers who want to send to the Debian organization. Note that DEBIAN is different from DEBIAN two directory. In the file created in DH_make, Control This is the main package. Copyright This file will also appear in many commercial software. It is your copyright. CHANGLOG is to keep the difference between the two will be put in / usr / share / doc / cscope / rules This is a major install script is a makefile, which will call a lot of DH_XXX Command, which four files above the debian organization are required to have more read.debian is Readme, what is the original The program is different for Debian's case configuration file, usually / etc / xxx Software No configuration file, such as init.d debi, is the system v style Initial Script put in /etc/init.d Software is not Initial Script, usually DEAMON is required to use PostInstall Script to install DIRS real-in-directory DOCS This is in addition to Man Page, this is placed in / usr / share / doc / pkgname / manpage.1 manpage. 2 ..... MANPAGE.9 This is your man Page file. We have to change the Source Code of MANPAGE to cscope.1 / usr / share / man / actually this is not used, as long as Make Install is MAN Page Don't write This Doc-Base except Man Page Document / USR / Share / Doc-Base / Menu Debian has a set of x-window Menu Install systems in / usr / lib / menu can write some information to let menu system help User installation preInst four shell script files will be automatically called by DPKG to call the thing PostInst can see / var / Example PRERM POSTRM under lib / dpkg / info automatically creates an Example file such as preinst.ex, ex.doc-base.package, etc., take EX and change it yourself, DPKG-buildpackage -rfakeroot. False root directory in Debian / TMP

The most important in the format of each file is Control this file, even if you have this file in the debian directory, Man Deb-Control can be explained in detail.

Package: grepEssential: yesPriority: requiredSection: baseMaintainer: Wichert Akkerman Architecture: sparcVersion: 2.4-1Pre-Depends: libc6 (> = 2.0.105) Provides: rgrepConflicts: rgrepDescription: GNU grep, egrep and fgrep. The GNU family of grep utilities may be the "fastest grep in the west" .GNU grep is based on a fast lazy-state deterministic matcher (abouttwice as fast as stock Unix egrep) hybridized with a Boyer-Moore-Gospersearch for a fixed string that eliminates impossible text from beingconsidered by the full regexp matcher without necessarily having tolook at every character. the result is typically many times fasterthan Unix grep or egrep. (Regular expressions containing backreferencingwill run more slowly, however.) section and priority are some debian Define DSELECT can see those Section: base admin doc libs Editors Develop: this can see the directory name in Debian's CD Distribution, you know Priority: Required Standard Important Optional Extra

转载请注明原文地址:https://www.9cbs.com/read-45306.html

New Post(0)