maint-guide HEAD - en to zh_CN translation catalogue (961 entries)

note: type: Attribute 'lang' of: <book>
en: en
zh_CN: zh-tw

note: type: Content of: <book><title>
en: Debian New Maintainers' Guide
zh_CN: Debian 新維護人員手冊

note: type: Content of: <book><bookinfo><authorgroup><author><contrib>
en: original contents
zh_CN: 原始內容

note: type: Content of: <book><bookinfo><authorgroup><author><contrib>
en: updated contents
zh_CN: 更新內容

note: type: Content of: <book><bookinfo><releaseinfo>
en: version &docversion;
zh_CN: 版本 &docversion;

note: type: Content of: <book><bookinfo><legalnotice><para>
en: This document may be used under the terms of the GNU General Public License version 2 or higher.
zh_CN: 本文件可在 GNU 通用公共許可證第二版或更高版本的條款規定下使用。

note: type: Content of: <book><bookinfo><legalnotice><para>
en: This document was made using these two documents as examples:
zh_CN: 本文檔在撰寫過程中參考了以下兩篇文檔：

note: type: Content of: <book><chapter><title>
en: Getting started The Right Way
zh_CN: 從一條正確的路開始

note: type: Content of: <book><appendix><para>
en: The rewrite of this tutorial document with updated contents and more practical examples is available as <ulink url="&guidedeb;">Guide for Debian Maintainers</ulink>.  Please use this new tutorial as the primary tutorial document.
zh_CN: 本教程文件已被重寫為另外的 <ulink url="&guidedeb;">Debian 維護者指導</ulink> 文件，其中包含了更新的內容與更多實際例子。請使用新的教程作為主要的教程文件。

note: type: Content of: <book><chapter><para>
en: This document tries to describe the building of a Debian package to ordinary Debian users and prospective developers.  It uses fairly non-technical language, and it's well covered with working examples.  There is an old Latin saying: <emphasis>Longum iter est per praecepta, breve et efficax per exempla</emphasis> (It's a long way by the rules, but short and efficient with examples).
zh_CN: 這篇文檔試圖爲普通 Debian 用戶，和希望對 Debian 軟件包有所瞭解的開發人員講述如何製作 Debian 軟件包。在這裏，我們儘可能使用通俗的語言，並輔以大量實例來直觀地展示每一個細節。正如一句古羅馬諺語說得好：<emphasis>一例勝千言！</emphasis>

note: type: Content of: <book><chapter><para><footnote><para>
en: The document assumes you are using a <literal>&base-release;</literal> or newer system.  If you need to follow this text in an older system (including an older Ubuntu system etc.), you must install backported <systemitem role="package">dpkg</systemitem> and <systemitem role="package">debhelper</systemitem> packages, at least.
zh_CN: 在寫這份文檔時，我們默認你使用 <literal>squeeze</literal> 操作系統。如果你需要在 <literal>lenny</literal> 系統上使用本文所記述的方法，則必須安裝 backports 倉庫中的 <systemitem role="package">dpkg</systemitem> 和 <systemitem role="package">debhelper</systemitem> 軟件包。

note: type: Content of: <book><chapter><para>
en: This document is made available for the Debian <literal>Buster</literal> release since this offers many translations.  This document will be dropped in the following releases since contents are getting outdated.  <placeholder type="footnote" id="0"/>
zh_CN: 該文件在 Debian <literal>Buster</literal> 釋出時仍然可用，因為它已提供了許多語言的翻譯版本。該文件會在之後的 Debian 版本中被移除，因為其內容正在逐漸過時。<placeholder type="footnote" id="0"/>

note: type: Content of: <book><chapter><para><footnote><para>
en: You can learn about the basic handling of a Debian system from the <ulink url="&debref;">Debian Reference</ulink>.  It contains some pointers to learn about Unix programming, too.
zh_CN: 在 <ulink url="&debref;">Debian Reference</ulink> 中，你可以瞭解到使用 Debian 系統的一些基本信息和關於 Unix 編程的一些指引。

note: type: Content of: <book><chapter><para>
en: One of the things that makes Debian such a top-notch distribution is its package system.  While there is a vast quantity of software already in the Debian format, sometimes you need to install software that isn't.  You may be wondering how you can make your own packages; and perhaps you think it is a very difficult task.  Well, if you are a real novice on Linux, it is hard, but if you were a rookie, you wouldn't be reading this document now&nbsp;:-)  You do need to know a little about Unix programming but you certainly don't need to be a wizard.  <placeholder type="footnote" id="0"/>
zh_CN: Debian 的軟件包系統是使它躋身頂級發行版行列的重要原因之一。儘管已經有相當數量的軟件被打包成 Debian 的格式，但有時還是需要安裝一些不是這一格式的軟件。可能你正爲如何製作自己的軟件包而感到迷惑，也可能正認爲這麼做很難。如果你是一個剛剛接觸 Debian 的初學者，那麼是的，它的確很難；不過假如你真的只是一個初入此門的新手，現在大概也不會來讀這篇文檔了。:-) 你的確需要對 Unix 編程有所瞭解，但顯然沒必要是這方面的天才。<placeholder type="footnote" id="0"/>

note: type: Content of: <book><chapter><para>
en: One thing is certain, though: to properly create and maintain Debian packages takes many hours.  Make no mistake, for our system to work the maintainers need to be both technically competent and diligent.
zh_CN: 對於 Debian 軟件包維護人員來說，有一件事是非常明確的：創建並維護一個 Debian 軟件包需要花費很多精力，所需的時間很可能遠不只是幾個小時。維護人員需要有良好的技術基礎，同時也需要十分勤奮，這樣才能保證我們的系統正常運行而不出現問題。

note: type: Content of: <book><chapter><para>
en: If you need some help with packaging, please read <xref linkend="helpme"/>.
zh_CN: 如果你在軟體包製作方面需要他人幫助，請閱讀 <xref linkend="helpme"/>。

note: type: Content of: <book><chapter><para>
en: Newer versions of this document should always be available online at <ulink url="&maint-guide;"/> and in the <systemitem role="package">maint-guide</systemitem> package.  The translations may be available in packages such as <systemitem role="package">maint-guide-es</systemitem>.  Please note that this documentation may be slightly outdated.
zh_CN: 本文的最新版隨時都可以在 <ulink url="&maint-guide;"/> 上和 <systemitem role="package">maint-guide</systemitem> 軟件包裏找到。文檔的簡體中文翻譯可以在 <systemitem role="package">maint-guide-zh-cn</systemitem> 軟件包裏找到。還有一點需要注意的是，這篇文檔的內容相對於當前的開發情況可能會有略微的延遲。

note: type: Content of: <book><chapter><para>
en: Since this is a tutorial, I choose to explain each detailed step for some important topics.  Some of them may look irrelevant to you.  Please be patient.  I have also intentionally skipped some corner cases and provided only pointers to keep this document simple.
zh_CN: 由於這篇文檔是一份手把手的教程，所以在一些重要的話題上會對每個步驟都做詳細的解釋。因而你可能覺得它們之中有一些與你的想法毫不相干。請準備好足夠的耐心來學習。同時我也有意地省略了某些不必要的細節，以使這篇文檔儘可能保持簡潔。

note: type: Content of: <book><chapter><section><title>
en: Social dynamics of Debian
zh_CN: Debian 的社會驅動力

note: type: Content of: <book><chapter><section><para>
en: Here are some observations of Debian's social dynamics, presented in the hope that it will prepare you for interactions with Debian:
zh_CN: 以下是一些有關 Debian 的社會動力學報告，希望它們有助於你掌握與 Debian 項目進行互動的方法。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: We all are volunteers.
zh_CN: 我們都是志願者。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: You cannot impose on others what to do.
zh_CN: 任何人都不能把事情強加給他人。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: You should be motivated to do things by yourself.
zh_CN: 你應該主動地做自己的事情。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: Friendly cooperation is the driving force.
zh_CN: 友好合作是我們前行的動力。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: Your contribution should not overstrain others.
zh_CN: 你的貢獻不應致使他人過勞。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: Your contribution is valuable only when others appreciate it.
zh_CN: 只有當別人欣賞你的貢獻時，它才真正有價值。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: Debian is not your school where you get automatic attention of teachers.
zh_CN: Debian 不是一所學校，沒有老師會自動地注意你。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: You should be able to learn many things by yourself.
zh_CN: 你需要有自學大量知識的能力。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: Attention from other volunteers is a very scarce resource.
zh_CN: 其他志願者的注意是非常稀缺的資源。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: Debian is constantly improving.
zh_CN: Debian 在不斷進步。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: You are expected to make high quality packages.
zh_CN: Debian 期望你製作出高質量的軟件包。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: You should adapt yourself to change.
zh_CN: 你應該適時改變自己來適應變化。

note: type: Content of: <book><chapter><section><para>
en: There are several types of people interacting around Debian with different roles:
zh_CN: 在 Debian 社區中有這幾類常見的角色：

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: <emphasis role="strong">upstream author</emphasis>: the person who made the original program.
zh_CN: <emphasis role="strong">Upstream author</emphasis> (上游作者)：程序的原始作者。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: <emphasis role="strong">upstream maintainer</emphasis>: the person who currently maintains the program.
zh_CN: <emphasis role="strong">Upstream maintainer</emphasis> (上游維護者)：目前在上游維護程序代碼的人。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: <emphasis role="strong">maintainer</emphasis>: the person making the Debian package of the program.
zh_CN: <emphasis role="strong">Maintainer</emphasis> (軟件包維護者)：製作並維護該程序的 Debian 軟件包的人。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: <emphasis role="strong">sponsor</emphasis>: a person who helps maintainers to upload packages to the official Debian package archive (after checking their contents).
zh_CN: <emphasis role="strong">Sponsor</emphasis> (保證人)：檢查內容後幫助維護者上傳軟件包到 Debian 官方倉庫的人。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: <emphasis role="strong">mentor</emphasis>: a person who helps novice maintainers with packaging etc.
zh_CN: <emphasis role="strong">Mentor</emphasis> (指導者)：幫助維護者熟悉和深入打包的人。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: <emphasis role="strong">Debian Developer</emphasis> (DD): a member of the Debian project with full upload rights to the official Debian package archive.
zh_CN: <emphasis role="strong">Debian Developer</emphasis> (DD)：Debian 社區的官方成員。DD 擁有向 Debian 官方倉庫上傳的全部權限。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: <emphasis role="strong">Debian Maintainer</emphasis> (DM): a person with limited upload rights to the official Debian package archive.
zh_CN: <emphasis role="strong">Debian Maintainer</emphasis> (DM)：擁有對 Debian 官方倉庫部分上傳權限的人。

note: type: Content of: <book><chapter><section><para>
en: Please note that you cannot become an official <emphasis role="strong">Debian Developer</emphasis> (DD) overnight, because it takes more than technical skill.  Please do not be discouraged by this.  If it is useful to others, you can still upload your package either as a <emphasis role="strong">maintainer</emphasis> through a <emphasis role="strong">sponsor</emphasis> or as a <emphasis role="strong">Debian Maintainer</emphasis>.
zh_CN: 注意，你不可能在一夜之間成爲 <emphasis role="strong">Debian Developer</emphasis>，因爲成爲 DD 所需要的遠不只是技術技巧。別因此氣餒，如果你的軟件包對其他人有用，你可以作爲軟件包的 <emphasis role="strong">Maintainer</emphasis>，通過一位 <emphasis role="strong">Sponsor</emphasis> 來上傳它，或者申請成爲 <emphasis role="strong">Debian Maintainer</emphasis>。

note: type: Content of: <book><chapter><section><para>
en: Please note that you do not need to create any new package to become an official Debian Developer.  Contributing to the existing packages can provide a path to becoming an official Debian Developer too.  There are many packages waiting for good maintainers (see <xref linkend="choose"/>).
zh_CN: 還有，要成爲 Debian Developer 不一定要創建新軟件包。對已有軟件做出貢獻也是成爲 Debian Developer 的理想途徑。眼下正有很多軟件包等着好的維護者來接手(參看 <xref linkend="choose"/>)。

note: type: Content of: <book><chapter><section><para>
en: Since we focus only on technical aspects of packaging in this document, please refer to the following to learn how Debian functions and how you can get involved:
zh_CN: 在這篇文檔裏，我們的重點在於打包的技術細節，所以請參考以下的文檔來瞭解 Debian 是如何運轉的，以及如何才能參與到其中：

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: <ulink url="&logiciellibre;">Debian: 17 years of Free Software, "do-ocracy", and democracy</ulink> (Introductory slides)
zh_CN: <ulink url="&logiciellibre;">Debian: 17 years of Free Software, "do-ocracy", and democracy</ulink> (介紹性幻燈片)

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: <ulink url="&debianorghelp;">How can you help Debian?</ulink> (official)
zh_CN: <ulink url="&debianorghelp;">How can you help Debian?</ulink> (官方文檔)

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: <ulink url="&debianfaqhelp;">The Debian GNU/Linux FAQ, Chapter 13 - "Contributing to the Debian Project"</ulink> (semi-official)
zh_CN: <ulink url="&debianfaqhelp;">The Debian GNU/Linux FAQ, Chapter 13 - "Contributing to the Debian Project"</ulink> (半官方文檔)

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: <ulink url="&debianwikihelp;">Debian Wiki, HelpDebian</ulink> (supplemental)
zh_CN: <ulink url="&debianwikihelp;">Debian Wiki, HelpDebian</ulink> (補充材料)

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: <ulink url="&nm-do;">Debian New Member site</ulink> (official)
zh_CN: <ulink url="&nm-do;">Debian New Member site</ulink> (官方站點)

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: <ulink url="&debianmentorfaq;">Debian Mentors FAQ</ulink> (supplemental)
zh_CN: <ulink url="&debianmentorfaq;">Debian Mentors FAQ</ulink> (補充文檔)

note: type: Content of: <book><chapter><section><title>
en: Programs needed for development
zh_CN: 開發時需要的軟件

note: type: Content of: <book><chapter><section><para>
en: Before you start anything, you should make sure that you have properly installed some additional packages needed for development.  Note that the list doesn't contain any packages marked <literal>essential</literal> or <literal>required</literal> - we expect that you have those installed already.
zh_CN: 在開始之前，你需要確認你是否已經正確安裝了開發所需要的附加套件。注意這些套件不包含任何已經被標記爲 <literal>essential</literal> 或 <literal>required</literal> —— 我們假設你已經安裝了它們。

note: type: Content of: <book><chapter><section><para>
en: The following packages come with the standard Debian installation, so you probably have them already (along with any additional packages they depend on).  Still, you should check them with <literal>aptitude show <replaceable>package</replaceable></literal> or with <literal>dpkg -s <replaceable>package</replaceable></literal>.
zh_CN: 以下這些軟體包已經隨標準的 Debian 安裝過程進入了系統，所以你可能不需要再動手安裝它們（以及任何附加的依賴軟體包）。然而，你還是應該用 <literal>aptitude show <replaceable>package</replaceable></literal> 或者 <literal>dpkg -s <replaceable>package</replaceable></literal> 來檢查一下。（譯註：apt show PACKAGE 亦可）

note: type: Content of: <book><chapter><section><para>
en: The most important package to install on your development system is the <systemitem role="package">build-essential</systemitem> package.  Once you try to install that, it will <emphasis>pull in</emphasis> other packages required to have a basic build environment.
zh_CN: 在你的開發環境中，需要安裝的最重要的軟件包是 <systemitem role="package">build-essential</systemitem>。一旦你 嘗試安裝該包，它將 <emphasis>拉來</emphasis> 其他基本構建環境所需的基本軟件。

note: type: Content of: <book><chapter><section><para>
en: For some types of packages, that is all you will require; however, there is another set of packages that while not essential for all package builds are useful to have installed or may be required by your package:
zh_CN: 對於某些類型的軟件，以上的就是所需要的全部。然而還有一組軟件包雖不是對於所有軟件包都必須，卻可能對你有用或被你的軟件包所需要：

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: <systemitem role="package">autoconf</systemitem>, <systemitem role="package">automake</systemitem>, and <systemitem role="package">autotools-dev</systemitem> - many newer programs use configure scripts and <filename>Makefile</filename> files preprocessed with the help of programs like these (see <literal>info autoconf</literal>, <literal>info automake</literal>).  <systemitem role="package">autotools-dev</systemitem> keeps up-to-date versions of certain auto files and has documentation about the best way to use those files.
zh_CN: <systemitem role="package">autoconf</systemitem>、<systemitem role="package">automake</systemitem> 和 <systemitem role="package">autotools-dev</systemitem> - 很多新程序使用 configure 腳本和 <filename>Makefile</filename> 文件來幫助預處理程序。(參看 <literal>info autoconf</literal>、<literal>info automake</literal>)。 <systemitem role="package">autotools-dev</systemitem> 則用於保持指定的自動配置文件爲最新，並帶有關於使用那些文件的最佳方法的文檔。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para><footnote><para>
en: There are also some more specialized but similar packages such as <systemitem role="package">dh-make-perl</systemitem>, <systemitem role="package">dh-make-php</systemitem>, etc.
zh_CN: 還有幾個類似但更針對某一類軟件的軟件包，如 <systemitem role="package">dh-make-perl</systemitem>、<systemitem role="package">dh-make-php</systemitem> 等。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: <systemitem role="package">debhelper</systemitem> and <systemitem role="package">dh-make</systemitem> - <systemitem role="package">dh-make</systemitem> is necessary to create the skeleton of our example package, and it will use some of the <systemitem role="package">debhelper</systemitem> tools for creating packages.  They are not essential for this purpose, but are <emphasis>highly</emphasis> recommended for new maintainers.  It makes the whole process very much easier to start, and to control afterwards.  (See <citerefentry> <refentrytitle>dh_make</refentrytitle> <manvolnum>8</manvolnum> </citerefentry>, <citerefentry> <refentrytitle>debhelper</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>.) <placeholder type="footnote" id="0"/>
zh_CN: <systemitem role="package">dh-make</systemitem> 和 <systemitem role="package">debhelper</systemitem> - <systemitem role="package">dh-make</systemitem> 是用於創建我們示例軟件包骨架所必須的，它會使用 <systemitem role="package">debhelper</systemitem> 中的一些工具來創建軟件包。他們不是創建軟件包所必須的，但對新維護人員而言，我們 <emphasis>強烈推薦</emphasis> 使用。它使得整個過程極爲簡化，並易於在將來維護。(參看 <citerefentry> <refentrytitle>dh_make</refentrytitle> <manvolnum>8</manvolnum> </citerefentry>、<citerefentry> <refentrytitle>debhelper</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>、<filename>/usr/share/doc/debhelper/README</filename>)  <placeholder type="footnote" id="0"/>

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: The new <systemitem role="package">debmake</systemitem> may be used as the alternative to the standard <systemitem role="package">dh-make</systemitem>.  It does more and comes with HTML documentation with extensive packaging examples in <systemitem role="package">debmake-doc</systemitem>.
zh_CN: 新的 <systemitem role="package">debmake</systemitem> 可以作為標準 <systemitem role="package">dh-make</systemitem> 的代替品。debmake 能做的事情更多，並且擁有包含非常多打包例項的 HTML 文件。文件可以透過 <systemitem role="package">debmake-doc</systemitem> 軟體包獲取。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: <systemitem role="package">devscripts</systemitem> - this package contains some useful scripts that can be helpful for maintainers, but they are also not necessary for building packages.  Packages recommended and suggested by this package are worth looking into.  (See <filename>&devscripts-readme;</filename>.)
zh_CN: <systemitem role="package">devscripts</systemitem> - 此軟件包提供了一些非常好非常有用的腳本幫助維護者，但他們並非構建軟件包所必須。此軟件包所推薦或建議的軟件包都值得一看。(參看 <filename>&devscripts-readme;</filename>)

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: <systemitem role="package">fakeroot</systemitem> - this utility lets you emulate being root, which is necessary for some parts of the build process.  (See <citerefentry> <refentrytitle>fakeroot</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>.)
zh_CN: <systemitem role="package">fakeroot</systemitem> - 這個工具使你可以在編譯過程中必要的時候以普通使用者來模擬 root 使用者環境。 (參看 <citerefentry> <refentrytitle>fakeroot</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>)

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: <systemitem role="package">file</systemitem> - this handy program can determine what type a file is.  (See <citerefentry> <refentrytitle>file</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>.)
zh_CN: <systemitem role="package">file</systemitem> - 這個小程序可以檢測文件的類型。(參看 <citerefentry> <refentrytitle>file</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>)

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: <systemitem role="package">gfortran</systemitem> - the GNU Fortran 95 compiler, necessary if your program is written in Fortran.  (See <citerefentry> <refentrytitle>gfortran</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>.)
zh_CN: <systemitem role="package">gfortran</systemitem> - GNU Fortran 95 編譯器，如果你的程序是用 Fortran 編寫的則必須此軟件包完成編譯。(參看 <citerefentry> <refentrytitle>gfortran</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>)

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: <systemitem role="package">git</systemitem> - this package provides a popular version control system designed to handle very large projects with speed and efficiency; it is used for many high profile open source projects, most notably the Linux kernel.  (See <citerefentry> <refentrytitle>git</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>, git Manual (<filename>&git-doc;</filename>).)
zh_CN: <systemitem role="package">git</systemitem> - 此軟件包提供了用於快捷處理大型項目的著名版本控制系統 - git。它被廣泛用於各種開源項目，最著名的是 Linux 內核項目。(參見 <citerefentry> <refentrytitle>git</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>, git Manual (<filename>&git-doc;</filename>).)

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: <systemitem role="package">gnupg</systemitem> - a tool that enables you to digitally <emphasis>sign</emphasis> packages.  This is especially important if you want to distribute packages to other people, and you will certainly be doing that when your work gets included in the Debian distribution.  (See <citerefentry> <refentrytitle>gpg</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>.)
zh_CN: <systemitem role="package">gnupg</systemitem> - 讓你可以使用 <emphasis>數字簽名</emphasis> 簽署你的軟體包。當你想把它分發給其他人時這一點特別重要。如果你要把你的成果加入到 Debian 發行版中，那這是必須的步驟。(參看 <citerefentry> <refentrytitle>gpg</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>.)

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: <systemitem role="package">gpc</systemitem> - the GNU Pascal compiler, necessary if your program is written in Pascal.  Worthy of note here is <systemitem role="package">fp-compiler</systemitem>, the Free Pascal Compiler, which is also good at this task.  (See <citerefentry> <refentrytitle>gpc</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>, <citerefentry> <refentrytitle>ppc386</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>.)
zh_CN: <systemitem role="package">gpc</systemitem> - GNU Pascal 編譯器。如果你的程序是用 Pascal 寫的則需要此軟件包。值得一提的是 <systemitem role="package">fp-compiler</systemitem>，Free Pascal 編譯器(FPC)，也能夠很好地勝任。(參見 <citerefentry> <refentrytitle>gpc</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>, <citerefentry> <refentrytitle>ppc386</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>.)

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: <systemitem role="package">lintian</systemitem> - this is the Debian package checker, which lets you know of any common mistakes after you build the package and explains the errors found.  (See <citerefentry> <refentrytitle>lintian</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>, <ulink url="&lintian-doc;">Lintian User's Manual</ulink>.)
zh_CN: <systemitem role="package">lintian</systemitem> - Debian 軟體包檢查工具，使你可以在編譯軟體包後知道它是否犯了常見的錯誤，並對其找到的錯誤進行解釋。 (參見 <citerefentry> <refentrytitle>lintian</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>, <ulink url="&lintian-doc;">Lintian User's Manual</ulink>.)

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: <systemitem role="package">patch</systemitem> - this very useful utility will take a file containing a difference listing (produced by the <command>diff</command> program) and apply it to the original file, producing a patched version.  (See <citerefentry> <refentrytitle>patch</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>.)
zh_CN: <systemitem role="package">patch</systemitem> - 這是一個非常有用的工具，它可以把 <command>diff</command> 程序生成的差異清單文件應用到原先的文件上，從而生成一個補丁版本。(參看 <citerefentry> <refentrytitle>patch</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>)

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: <systemitem role="package">patchutils</systemitem> - this package contains some utilities to work with patches such as the <command>lsdiff</command>, <command>interdiff</command> and <command>filterdiff</command> commands.
zh_CN: <systemitem role="package">patchutils</systemitem> - 此套件提供了一些可以幫助處理補丁的工具，如 <command>lsdiff</command>、<command>interdiff</command> 和 <command>filterdiff</command> 命令。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: <systemitem role="package">pbuilder</systemitem> - this package contains programs which are used for creating and maintaining a <command>chroot</command> environment.  Building a Debian package in this <command>chroot</command> environment verifies the proper build dependency and avoids FTBFS (Fails To Build From Source) bugs.  (see <citerefentry> <refentrytitle>pbuilder</refentrytitle> <manvolnum>8</manvolnum> </citerefentry> and <citerefentry> <refentrytitle>pdebuild</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>)
zh_CN: <systemitem role="package">pbuilder</systemitem> - 此軟體包提供了建立和維護 <command>chroot</command> 環境的工具。在它的 <command>chroot</command> 環境中編譯 Debian 軟體包可以檢查編譯依賴是否合適，並避免 FTBFS (Fails To Build From Source，原始碼編譯失敗)的 Bug。(參看 <citerefentry> <refentrytitle>pbuilder</refentrytitle> <manvolnum>8</manvolnum> </citerefentry> 和 <citerefentry> <refentrytitle>pdebuild</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>)

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: <systemitem role="package">perl</systemitem> - Perl is one of the most used interpreted scripting languages on today's Unix-like systems, often referred to as Unix's Swiss Army Chainsaw. (See <citerefentry> <refentrytitle>perl</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>.)
zh_CN: <systemitem role="package">perl</systemitem> - Perl 是現今類Unix系統中使用最普遍的解釋型腳本語言，它常被稱作Unix的瑞士軍刀。(參看 <citerefentry> <refentrytitle>perl</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>)

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: <systemitem role="package">python</systemitem> - Python is another of the most used interpreted scripting languages on the Debian system, combining remarkable power with very clear syntax. (See <citerefentry> <refentrytitle>python</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>.)
zh_CN: <systemitem role="package">python</systemitem> - Python 是 Debian 系統中另一個最常用的解釋型腳本語言，它擁有着可圈可點的強大功能和十分清晰的語法。(參看 <citerefentry> <refentrytitle>python</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>)

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: <systemitem role="package">quilt</systemitem> - this package helps you to manage large numbers of patches by keeping track of the changes each patch makes. Patches can be applied, un-applied, refreshed, and more.  (See <citerefentry> <refentrytitle>quilt</refentrytitle> <manvolnum>1</manvolnum></citerefentry>, and <filename>&quilt-pdf;</filename>.)
zh_CN: <systemitem role="package">quilt</systemitem> - 此軟件包幫助你管理一系列的補丁。它們被以邏輯棧的方式組織在一起。你可以 apply (=push)、un-apply (=pop)  或簡單地刷新它們然後再放入棧內。(參看 <citerefentry> <refentrytitle>quilt</refentrytitle> <manvolnum>1</manvolnum></citerefentry>, and <filename>&quilt-pdf;</filename>.)

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: <systemitem role="package">xutils-dev</systemitem> - some programs, usually those made for X11, also use these programs to generate <filename>Makefile</filename> files from sets of macro functions.  (See <citerefentry> <refentrytitle>imake</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>, <citerefentry> <refentrytitle>xmkmf</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>.)
zh_CN: <systemitem role="package">xutils-dev</systemitem> - 一些通常用於 X11 的程序，用於使用其宏功能生成 <filename>Makefile</filename> 文件。(參看 <citerefentry> <refentrytitle>imake</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>、<citerefentry> <refentrytitle>xmkmf</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>)

note: type: Content of: <book><chapter><section><para>
en: The short descriptions that are given above only serve to introduce you to what each package does.  Before continuing please read the documentation of each relevant program including ones installed through the package dependency such as <command>make</command>, at least, for the standard usage.  It may seem like heavy going now, but later on you'll be <emphasis>very</emphasis> glad you read it.  If you have specific questions later, I would suggest re-reading the documents mentioned above.
zh_CN: 以上給出的簡短描述僅僅是爲了使你對這些軟件包有一個基本的印象。在繼續前請詳細閱讀每個程序（包括通過依賴關係安裝的程序，比如<command>make</command>）的文檔，至少瞭解其一般的用途和用法。現在看來這是一項耗時巨大的任務，但在接下來的工作中你將爲你閱讀了它們而感覺到 <emphasis>非常</emphasis> 愉快。如果一會你遇到一些特定的問題，我會建議你重新閱讀上面提到的文檔。

note: type: Content of: <book><chapter><section><title>
en: Documentation needed for development
zh_CN: 開發時需要的文檔

note: type: Content of: <book><chapter><section><para>
en: The following is the <emphasis>very important</emphasis> documentation which you should read along with this document:
zh_CN: 以下是 <emphasis>非常重要</emphasis> 的文件，你應該在讀本文件時同時參考它們：

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: <systemitem role="package">debian-policy</systemitem> - the <ulink url="&debian-policy;">Debian Policy Manual</ulink> includes explanations of the structure and contents of the Debian archive, several OS design issues, the <ulink url="&fhs;">Filesystem Hierarchy Standard</ulink> (FHS, which says where each file and directory should be), etc.  For you, the most important thing is that it describes requirements that each package must satisfy to be included in the distribution. (See the local copies of <filename>&policy-pdf;</filename> and <filename>&fhs-pdf;</filename>.)
zh_CN: <systemitem role="package">debian-policy</systemitem> - the <ulink url="&debian-policy;">Debian Policy Manual</ulink> 包含了對 Debian 軟件倉庫、操作系統設計事宜、文件系統層級標準(FHS，<ulink url="&fhs;">Filesystem Hierarchy Standard</ulink>，講述每個文件和目錄應該放在哪裏)等的描述。對於你而言，最重要的是它描述了軟件包要進入官方倉庫前必須滿足的條件。(請參見 <filename>&policy-pdf;</filename> 和 <filename>&fhs-pdf;</filename> 的本地副本)

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: <systemitem role="package">developers-reference</systemitem> - the <ulink url="&developers-reference;">Debian Developer's Reference</ulink> describes all matters not specifically about the technical details of packaging, like the structure of the archive, how to rename, orphan, or adopt packages, how to do NMUs, how to manage bugs, best packaging practices, when and where to upload, etc.  (See the local copy of <filename>&developers-refpdf;</filename>.)
zh_CN: <systemitem role="package">developers-reference</systemitem> - <ulink url="&developers-reference;">Debian 開發者參考</ulink> 描述了打包所需的包含技術細節在內的全部詳細資訊，如倉庫結構、如何重新命名/丟棄/接手軟體包、如何進行 NMU(非維護者上傳)、如何管理 Bug 以及打包最佳實踐、何時向何處上傳等。(參見 <filename>&developers-refpdf;</filename> 的本地副本)

note: type: Content of: <book><chapter><section><para>
en: The following is the <emphasis>important</emphasis> documentation which you should read along with this document:
zh_CN: 以下是 <emphasis>重要</emphasis> 的文檔，你應該在讀本文檔時同時參看它們：

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: <ulink url="&autotools-tutorial;">Autotools Tutorial</ulink> provides a very good tutorial for <ulink url="&gnu-build-system;">the GNU Build System known as the GNU Autotools</ulink>, whose most important components are Autoconf, Automake, Libtool, and gettext.
zh_CN: <ulink url="&autotools-tutorial;">Autotools Tutorial</ulink> 為 <ulink url="&gnu-build-system;">the GNU Build System known as the GNU Autotools</ulink> 中最重要的工具 —— Autoconf、Automake、Libtool 和 gettext 提供了很好的文件。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: <systemitem role="package">gnu-standards</systemitem> - this package contains two pieces of documentation from the GNU project: <ulink url="&gnu-standard;">GNU Coding Standards</ulink>, and <ulink url="&gnu-maintainer;">Information for Maintainers of GNU Software</ulink>.  Although Debian does not require these to be followed, these are still helpful as guidelines and common sense.  (See the local copies of <filename>&gnu-standard-pdf;</filename> and <filename>&gnu-maintainer-pdf;</filename>.)
zh_CN: <systemitem role="package">gnu-standards</systemitem> - 此軟件包包含了 GNU 項目中的兩篇文檔： <ulink url="&gnu-standard;">GNU Coding Standards</ulink> 和 <ulink url="&gnu-maintainer;">Information for Maintainers of GNU Software</ulink>。儘管 Debian 不要求遵守這些規範，它們作爲綱領和共識仍然很有幫助。(參見 <filename>&gnu-standard-pdf;</filename> 和 <filename>&gnu-maintainer-pdf;</filename> 的本地副本)

note: type: Content of: <book><chapter><section><para>
en: If this document contradicts any of the documents mentioned above, they are correct.  Please file a bug report on the <systemitem role="package">maint-guide</systemitem> package using <command>reportbug</command>.
zh_CN: 若本文檔所敘述的內容與 Debian Policy Manual 或 Debian Developer's Reference 有不符，則按照後兩者的要求進行，並向 <systemitem role="package">maint-guide</systemitem> 軟件包提交 Bug 報告。

note: type: Content of: <book><chapter><section><para>
en: The following is an alternative tutorial document that you may read along with this document:
zh_CN: 以下是替代性的教程文件，你可以在讀本文件時同時參看它們：

note: type: Content of: <book><chapter><section><title>
en: Where to ask for help
zh_CN: 到何處尋求幫助

note: type: Content of: <book><chapter><section><para>
en: Before you decide to ask your question in some public place, please read this fine documentation:
zh_CN: 在你決定到公共場合提問之前，請先閱讀這些（個）不錯的文件：

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: files in <filename>/usr/share/doc/<replaceable>package</replaceable></filename> for all pertinent packages
zh_CN: 所有相關軟件包的 <filename>/usr/share/doc/<replaceable>package</replaceable></filename> 目錄之中的文件

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: contents of <literal><command>man</command> <replaceable>command</replaceable></literal> for all pertinent commands
zh_CN: 所有相關命令的 <literal><command>man</command> <replaceable>command</replaceable></literal> 手冊頁

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: contents of <literal><command>info</command> <replaceable>command</replaceable></literal> for all pertinent commands
zh_CN: 所有相關命令的 <literal><command>info</command> <replaceable>command</replaceable></literal> info頁

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: contents of <ulink url="&debian-mentors-ldo;">debian-mentors@lists.debian.org mailing list archive</ulink>
zh_CN: 郵件列表歸檔 <ulink url="&debian-mentors-ldo;">debian-mentors@lists.debian.org</ulink>

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: contents of <ulink url="&debian-devel-ldo;">debian-devel@lists.debian.org mailing list archive</ulink>
zh_CN: 郵件列表歸檔 <ulink url="&debian-devel-ldo;">debian-devel@lists.debian.org </ulink>

note: type: Content of: <book><chapter><section><para>
en: You can use web search engines more effectively by including search strings such as <literal>site:lists.debian.org</literal> to limit the domain.
zh_CN: 你可以在搜索引擎中搜索時使用類似這樣的字符串 :<literal>site:lists.debian.org</literal> 來限制域名以提高效率。

note: type: Content of: <book><chapter><section><para>
en: Making a small test package is a good way to learn details of packaging.  Inspecting existing well maintained packages is the best way to learn how other people make packages.
zh_CN: 製作小的測試軟件包是學習打包的好方法，仔細查看維護較好的軟件包則是瞭解他人如何製作軟件包的最佳辦法。

note: type: Content of: <book><chapter><section><para>
en: If you still have questions about packaging that you couldn't find answers to in the available documentation and web resources, you can ask them interactively:
zh_CN: 如果你仍然對打包存有疑問，並且在文檔和WEB資源中都不能找到答案，你可以交互式地向他們提問：

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: <ulink url="&debian-mentors-ldo;">debian-mentors@lists.debian.org mailing list</ulink>. (This mailing list is for the novice.)
zh_CN: <ulink url="&debian-mentors-ldo;">&debian-mentors-ldo;</ulink>郵件 <ulink url="&debian-mentors-ldo;">debian-mentors@lists.debian.org </ulink>. (該郵件列表是新手專區。)

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: <ulink url="&debian-devel-ldo;">debian-devel@lists.debian.org mailing list</ulink>. (This mailing list is for the expert.)
zh_CN: <ulink url="&debian-devel-ldo;">debian-devel@lists.debian.org </ulink>. (該郵件列表彙集各路神通。)

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: <ulink url="&irc-debian;">IRC</ulink> such as <literal>#debian-mentors</literal>.
zh_CN: <ulink url="&irc-debian;">IRC</ulink> 比如 <literal>#debian-mentors</literal>。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: Teams focusing on a specific set of packages. (Full list at <ulink url="&wikiteams;">https://wiki.debian.org/Teams</ulink>)
zh_CN: 專注於某個軟件包集合的團隊。 (完整列表參見 <ulink url="&wikiteams;">https://wiki.debian.org/Teams</ulink>)

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: Language-specific mailing lists such as debian-devel-{french,italian,portuguese,spanish}@lists.debian.org or debian-devel@debian.or.jp. (Full listing at <ulink url="&listdevel;">https://lists.debian.org/devel.html</ulink> and <ulink url="&listusers;">https://lists.debian.org/users.html</ulink>)
zh_CN: 特定語言的郵件列表，比如 debian-devel-{french,italian,portuguese,spanish}@lists.debian.org 或 debian-devel@debian.or.jp. (完整列表參見 <ulink url="&listdevel;">https://lists.debian.org/devel.html</ulink> 和 <ulink url="&listusers;">https://lists.debian.org/users.html</ulink>)

note: type: Content of: <book><chapter><section><para>
en: The more experienced Debian developers will gladly help you, if you ask properly after making your required efforts.
zh_CN: 如果你付出了一定的努力並且提問得當，那麼有經驗的 Debian 開發者會很樂意幫助你。

note: type: Content of: <book><chapter><section><para>
en: When you receive a bug report (yes, actual bug reports!), you will know that it is time for you to dig into the <ulink url="&bts;">Debian Bug Tracking System</ulink> and read the documentation there, to be able to deal with the reports efficiently.  I highly recommend reading the <ulink url="&devref-bug-handling;">Debian Developer's Reference, 5.8.  "Handling bugs"</ulink>.
zh_CN: 當你收到一個 Bug 報告後(沒錯，真正的 Bug 報告！)，你需要研究 <ulink url="&bts;">Debian Bug Tracking System</ulink> (Debian Bug 跟蹤系統，BTS)並閱讀相關的文檔以便高效處理這些報告。我推薦閱讀 <ulink url="&devref-bug-handling;">Developer's Reference, 5.8.  "Handling bugs"</ulink>

note: type: Content of: <book><chapter><section><para>
en: Even if it all worked well, it's time to start praying.  Why? Because in just a few hours (or days) users from all around the world will start to use your package, and if you made some critical error you'll get mailbombed by numerous angry Debian users&#x2026; Just kidding.  :-)
zh_CN: 即使上邊的那些問題都解決了，也不能高興得太早。為什麼？因為幾個小時或幾天內就會有人開始使用你的軟體包，如果你犯了某些嚴重的錯誤，將會被無數生氣的 Debian 使用者進行郵件轟炸…… 哦，當然這只是開個玩笑。:-)

note: type: Content of: <book><chapter><section><para>
en: Relax and be ready for bug reports, because there is a lot more work to be done before your package will be fully in line with Debian policies and its best practice guidelines (once again, read the <emphasis>real documentation</emphasis> for details).  Good luck!
zh_CN: 放鬆一點並準備好處理 Bug 報告，在你的套件完全符合 Debian 的各項規範前還需要付出很多努力，處理 Bug 也是對你很好的鍛煉(再一次提醒，閱讀那些 <emphasis>必須的文件</emphasis> 來瞭解詳情)。祝你好運！

note: type: Content of: <book><chapter><title>
en: First steps
zh_CN: 第一步

note: type: Content of: <book><chapter><para>
en: Let's start by creating a package of your own (or, even better, adopting an existing one).
zh_CN: 讓我們嘗試創建一個自己的軟件包(或者，“收養”一個已存在的軟件包則更好)。

note: type: Content of: <book><chapter><section><title>
en: Debian package building workflow
zh_CN: Debian 軟件包構建流程

note: type: Content of: <book><chapter><section><para>
en: If you are making a Debian package with an upstream program, the typical workflow of Debian package building involves generating several specifically named files for each step as follows:
zh_CN: 如果你要基於某個上遊程序構建軟件包，那麼典型的Debian軟件包構建流程就會包含生成幾個特定的文件，如下：

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: Get a copy of the upstream software, usually in a compressed tar format.
zh_CN: 獲取上游軟件的拷貝，通常爲壓縮過的tar格式。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: Add Debian-specific packaging modifications to the upstream program under the <filename>debian</filename> directory, and create a non-native source package (that is, the set of input files used for Debian package building) in <literal>3.0 (quilt)</literal> format.
zh_CN: 在上遊程序的 <filename>debian</filename> 目錄下添加 Debian 特定的打包修改，並以 <literal>3.0 (quilt)</literal> 格式創建一個非本地源碼包。(也就是指用於構建 Debian 軟件包的輸入文件集合)

note: type: Content of: <book><chapter><section><itemizedlist><listitem><itemizedlist><listitem><footnote><para>
en: For the older style of non-native Debian source packages in <literal>1.0</literal> format, <literal><replaceable>package</replaceable>_<replaceable>version</replaceable>-<replaceable>revision</replaceable>.diff.gz</literal> is used instead.
zh_CN: 對於舊式的 <literal>1.0</literal> 格式非本地 Debian 源碼包，應當使用 <literal><replaceable>package</replaceable>_<replaceable>version</replaceable>-<replaceable>revision</replaceable>.diff.gz</literal> 。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: Build Debian binary packages, which are ordinary installable package files in <literal>.deb</literal> format (or <literal>.udeb</literal> format, used by the Debian Installer) from the Debian source package.
zh_CN: 從 Debian 源碼包構建 Debian 二進制包；二進制包的格式通常是<literal>.deb</literal> (或者 <literal>.udeb</literal>，Debian Installer 專用)

note: type: Content of: <book><chapter><section><para>
en: Please note that the character separating <literal><replaceable>package</replaceable></literal> and <literal><replaceable>version</replaceable></literal> was changed from <literal>-</literal> (hyphen) in the tarball name to <literal>_</literal> (underscore) in the Debian package filenames.
zh_CN: 請注意，在 Debian 軟件包文件名中，分隔 <literal><replaceable>package</replaceable></literal> 和 <literal><replaceable>version</replaceable></literal> 的字符從 tarball 名稱的 <literal>-</literal> (連字符)換成了 <literal>_</literal> (下劃線)。

note: type: Content of: <book><chapter><section><para><footnote><para>
en: See <ulink url="&policy-source;">5.6.1 "Source"</ulink>, <ulink url="&policy-package;">5.6.7 "Package"</ulink>, and <ulink url="&policy-version;">5.6.12 "Version"</ulink>.  The <emphasis role="strong">package architecture</emphasis> follows the <ulink url="&policy-architecture;">Debian Policy Manual, 5.6.8 "Architecture"</ulink> and is automatically assigned by the package build process.
zh_CN: 參見 <ulink url="&policy-source;">5.6.1 "Source"</ulink>, <ulink url="&policy-package;">5.6.7 "Package"</ulink>, 以及 <ulink url="&policy-version;">5.6.12 "Version"</ulink>。 <emphasis role="strong">package architecture</emphasis> 遵循 <ulink url="&policy-architecture;">Debian Policy Manual, 5.6.8 "Architecture"</ulink> 並且會在軟件包構建的過程中被自動分配。

note: type: Content of: <book><chapter><section><para>
en: In the file names above, replace the <literal><replaceable>package</replaceable></literal> part with the <emphasis role="strong">package name</emphasis>, the <literal><replaceable>version</replaceable></literal> part with the <emphasis role="strong">upstream version</emphasis>, the <literal><replaceable>revision</replaceable></literal> part with the <emphasis role="strong">Debian revision</emphasis>, and the <literal><replaceable>arch</replaceable></literal> part with the <emphasis role="strong">package architecture</emphasis>, as defined in the Debian Policy Manual.  <placeholder type="footnote" id="0"/>
zh_CN: 在上述的文件名中，將 <literal><replaceable>package</replaceable></literal> 部分替換爲 <emphasis role="strong">package name</emphasis>， 將 <literal><replaceable>version</replaceable></literal> 部分替換爲 <emphasis role="strong">upstream version</emphasis>， 將<literal><replaceable>revision</replaceable></literal> 部分替換爲 <emphasis role="strong">Debian revision</emphasis>，以及將 <literal><replaceable>arch</replaceable></literal> 部分替換爲 <emphasis role="strong">package architecture</emphasis>，根據 Debian 方針手冊。 <placeholder type="footnote" id="0"/>

note: type: Content of: <book><chapter><section><para>
en: Each step of this outline is explained with detailed examples in later sections.
zh_CN: 本大綱中的每一步都會在後續的章節中輔以詳細的例子進行解釋。

note: type: Content of: <book><chapter><section><title>
en: Choose your program
zh_CN: 選擇你的程式

note: type: Content of: <book><chapter><section><para>
en: You have probably chosen the package you want to create.  The first thing you need to do is check if the package is in the distribution archive already by using the following:
zh_CN: 可能你已經選好了要製作的軟件包。第一件要做的事是檢查它是否已經存在於發行版倉庫中了，參考方法如下：

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: the <command>aptitude</command> command
zh_CN: <command>aptitude</command> 命令

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: the <ulink url="&packages-do;">Debian packages</ulink> web page
zh_CN: the <ulink url="&packages-do;">Debian packages</ulink> 頁面

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: the <ulink url="&debtrack;">Debian Package Tracker</ulink> web page
zh_CN: the <ulink url="&debtrack;">Debian Package Tracker</ulink> 頁面

note: type: Content of: <book><chapter><section><para><footnote><para>
en: See <ulink url="&devref-adopt;">Debian Developer's Reference 5.9.5 "Adopting a package"</ulink>.
zh_CN: 參見 <ulink url="&devref-adopt;">Debian Developer's Reference 5.9.5.  "Adopting a package"</ulink>.

note: type: Content of: <book><chapter><section><para>
en: If the package already exists, well, install it! :-) If it happens to be <emphasis role="strong">orphaned</emphasis> (that is, if its maintainer is set to <ulink url="&qa-do;">Debian QA Group</ulink>), you may be able to pick it up if it's still available.  You may also adopt a package whose maintainer has filed a Request for Adoption (<emphasis role="strong">RFA</emphasis>).<placeholder type="footnote" id="0"/>
zh_CN: 如果軟件包已經存在，直接安裝就好了！:-) 如果它是被 <emphasis role="strong">拋棄(orphaned)</emphasis> 的——也就是說它的維護者被設置爲 <ulink url="&qa-do;">Debian QA Group</ulink>，那麼你可以嘗試接手維護它。你也可以“收養”維護者發出“Request for Adoption”(<emphasis role="strong">RFA</emphasis>)請求的軟件包。<placeholder type="footnote" id="0"/>

note: type: Content of: <book><chapter><section><para>
en: There are several package ownership status resources:
zh_CN: 軟件包歸屬狀態有這幾種：

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: The <command>wnpp-alert</command> command from the <systemitem role="package">devscripts</systemitem> package
zh_CN: <command>wnpp-alert</command> 命令，來自 <systemitem role="package">devscripts</systemitem> 軟件包

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: <ulink url="&wnpp-bts;">Debian Bug report logs: Bugs in pseudo-package <systemitem role="package">wnpp</systemitem> in <literal>unstable</literal></ulink>
zh_CN: <ulink url="&wnpp-bts;">Debian Bug report logs: Bugs in pseudo-package <systemitem role="package">wnpp</systemitem> 於 <literal>unstable</literal></ulink>

note: type: Content of: <book><chapter><section><para><footnote><para>
en: Having said that, there will of course always be new programs that are worth packaging.
zh_CN: 當然了，總有值得打包的新軟件。

note: type: Content of: <book><chapter><section><para>
en: As a side note, it's important to point out that Debian already has packages for most kinds of programs, and the number of packages already in the Debian archive is much larger than that of contributors with upload rights.  Thus, contributions to packages already in the archive are far more appreciated (and more likely to receive sponsorship) by other developers <placeholder type="footnote" id="0"/>.  You can contribute in various ways:
zh_CN: 作爲旁註必須指出，Debian 已經擁有了絕大多數類型軟件的軟件包，倉庫中軟件包的數量也遠遠超過了有上傳權限的貢獻者的數量。因此，爲已經在倉庫中的軟件包貢獻力量是非常受其他開發者歡迎的(且更容易獲得 sponsorship)<placeholder type="footnote" id="0"/>。你可以通過非常多的方式來實現這一目的：

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: taking over orphaned, yet actively used, packages
zh_CN: 接手被拋棄而仍然被很多人使用的套件。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: joining <ulink url="&teams;">packaging teams</ulink>
zh_CN: 加入 <ulink url="&teams;">打包小組</ulink>。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: triaging bugs of very popular packages
zh_CN: 爲某些常用的套件分類 Bug。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: preparing <ulink url="&devref-nmu;">QA or NMU uploads</ulink>
zh_CN: 在需要時準備 <ulink url="&devref-nmu;">QA 或 NMU 上傳</ulink>。

note: type: Content of: <book><chapter><section><para>
en: If you are able to adopt the package, get the sources (with something like <literal>apt-get source <replaceable>packagename</replaceable></literal>) and examine them.  This document unfortunately doesn't include comprehensive information about adopting packages.  Thankfully you shouldn't have a hard time figuring out how the package works since someone has already done the initial setup for you.  Keep reading, though; a lot of the advice below will still be applicable to your case.
zh_CN: 如果你有能力“領養”那個軟體包，那就先下載 (使用 <literal>apt-get source <replaceable>packagename</replaceable></literal> 或其他類似的工具)並分析它的原始碼。這篇文件不會詳細說明如何領養軟體包，不過幸運的是，領養軟體包時，打包的起始工作已經有人完成，接手的工作應比從頭開始輕鬆得多。儘管如此也請您不要輕敵，請繼續閱讀，下面給出的建議會對你很有幫助。

note: type: Content of: <book><chapter><section><para>
en: If the package is new, and you decide you'd like to see it in Debian, proceed as follows:
zh_CN: 如果你要製作的套件是全新的，並且希望它出現在 Debian 中，請按照以下的步驟進行：

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: First, you must know that the program works, and have tried it for some time to confirm its usefulness.
zh_CN: 首先，你必須知道這個軟件的可用性，並且需要試用一段時間。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: You must check that no one else is already working on the package on the <ulink url="&wnpp-do;">Work-Needing and Prospective Packages</ulink> site.  If no one else is working on it, file an ITP (Intent To Package) bug report to the <systemitem role="package">wnpp</systemitem> pseudo-package using <command>reportbug</command>.  If someone's already on it, contact them if you feel you need to.  If not &#x2014; find another interesting program that nobody is maintaining.
zh_CN: 一定要在 <ulink url="&wnpp-do;being_packaged">Work-Needing and Prospective Packages</ulink> 上仔細檢視，以確定並沒有其他人已經開始相關的工作。如果沒有的話，則可以提交一份 ITP (Intent To Package，打包意向) Bug 報告給 <systemitem role="package">wnpp</systemitem> 虛包 (可以使用 <command>reportbug</command>)。如果你看到已經有人在處理相關事宜，則在有需要的情況下再聯絡他(們)。如果他(們)不需要你的幫助，那就尋找其他你感興趣，而且沒有人維護的軟體包咯。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: The software <emphasis role="strong">must have a license</emphasis>.
zh_CN: 該軟件 <emphasis role="strong">必須有一個許可證</emphasis>。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: For the <literal>main</literal> section, Debian Policy requires it <emphasis role="strong">to be fully compliant with the Debian Free Software Guidelines</emphasis> (<ulink url="&dfsg;">DFSG</ulink>)  and <emphasis role="strong">not to require a package outside of <literal>main</literal></emphasis> for compilation or execution.  This is the desired case.
zh_CN: 對於 <literal>main</literal> 類的軟件， Debian 方針要求它 <emphasis role="strong"> 完全兼容 Debian Free Software Guidelines （Debian 自由軟件準則）</emphasis> (<ulink url="&dfsg;">DFSG</ulink>) 並且 <emphasis role="strong"> 不要求用 <literal>main</literal></emphasis> 類以外的軟件來編譯或執行。這是最理想的狀況。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: For the <literal>contrib</literal> section, it must comply with the DFSG but it may require a package outside of <literal>main</literal> for compilation or execution.
zh_CN: 對於 <literal>contrib</literal> 類的軟件，其許可證必須滿足 DFSG 的全部條件，但可以依賴於 <literal>main</literal> 之外的軟件包以完成編譯或運行。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: For the <literal>non-free</literal> section, it may be non-compliant with the DFSG but it <emphasis role="strong">must be distributable</emphasis>.
zh_CN: 對於 <literal>non-free</literal> 類的軟件，其許可證可以不滿足 DFSG 中的一些條件，但至少 <emphasis role="strong">必須是可分發的</emphasis>。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: If you are unsure about where it should go, post the license text on <ulink url="&debian-legal-ldo;">debian-legal@lists.debian.org</ulink> and ask for advice.
zh_CN: 如果你不清楚你的軟體應該分入哪一類，則把許可證文本發送到 <ulink url="&debian-legal-ldo;">debian-legal@lists.debian.org</ulink> 請他人提出意見。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: The program should <emphasis role="strong">not</emphasis> introduce security and maintenance concerns into the Debian system.
zh_CN: 程式 <emphasis role="strong">不能</emphasis> 給 Debian 系統帶來安全或維護問題。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: The program should be well documented and its code needs to be understandable (i.e., not obfuscated).
zh_CN: 程式應當帶有良好的文件，最好是原始碼也容易理解 （比如，不混亂）。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: You should contact the program's author(s) to check if they agree with packaging it and are amicable to Debian.  It is important to be able to consult with the author(s)  in case of any problems with the program, so don't try to package unmaintained software.
zh_CN: 你應該與程序的作者取得聯繫問一下他是否認爲程序應當被打包，以及他是否對 Debian 友好。能夠詢問作者關於程序的任何問題是非常重要的，所以不要嘗試打包一個無人維護的軟件。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: The program certainly should <emphasis role="strong">not</emphasis> run setuid root, or even better, it shouldn't need to be setuid or setgid to anything.
zh_CN: 程序一定 <emphasis role="strong">不應該</emphasis> setuid 到 root 。更好的情況是它不 setuid 或 setgid 到任何用戶或組。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: The program should not be a daemon, or go in an <filename>*/sbin</filename> directory, or open a port as root.
zh_CN: 程序不應該是守護進程，也不應該進入 <filename>*/sbin</filename> 目錄或者以 root 打開任何端口。

note: type: Content of: <book><chapter><section><para>
en: Of course, the last one is just a safety measure, and is intended to save you from enraging users if you do something wrong in some setuid daemon&#x2026; When you gain more experience in packaging, you'll be able to package such software.
zh_CN: 當然，這些都是為了安全，並試圖避免你在，比如 setuid 守護程序等問題上犯錯誤而激怒了使用者 ...  當你在打包方面有了更多經驗時，就能夠處理這樣的軟體包了，不必著急。

note: type: Content of: <book><chapter><section><para>
en: As a new maintainer, you are encouraged to get some experience in packaging with easier packages and discouraged from creating complicated packages.
zh_CN: 我們鼓勵你，作爲一個新維護人員，選擇易於打包和維護的軟件包，而不鼓勵選擇複雜的軟件包。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: Simple packages
zh_CN: 簡單軟件包

note: type: Content of: <book><chapter><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: single binary package, arch = all (collection of data such as wallpaper graphics)
zh_CN: 單二進制軟件包，arch = all （比如像壁紙那樣的資料集）

note: type: Content of: <book><chapter><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: single binary package, arch = all (executables written in an interpreted language such as POSIX shell)
zh_CN: 單二進制軟件包，arch = all （用解釋型語言編寫的可執行腳本文件，比如 POSIX shell）

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: Intermediate complexity packages
zh_CN: 中等複雜軟件包

note: type: Content of: <book><chapter><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: single binary package, arch = any (ELF binary executables compiled from languages such as C and C++)
zh_CN: 單二進制軟件包，arch = any （用C/C++等語言編寫的 ELF 二進制可執行文件）

note: type: Content of: <book><chapter><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: multiple binary packages, arch = any + all (packages for ELF binary executables + documentation)
zh_CN: 複合二進制軟件包，arch = any + all （包含ELF二進制可執行程序+文檔的軟件包）

note: type: Content of: <book><chapter><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: upstream source in a format other than <filename>tar.gz</filename> or <filename>tar.bz2</filename>
zh_CN: 既不是 <filename>tar.gz</filename> 也不是 <filename>tar.bz2</filename> 格式的上有源代碼

note: type: Content of: <book><chapter><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: upstream source containing undistributable contents
zh_CN: 源代碼中包含不可分發的內容。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: High complexity packages
zh_CN: 高複雜軟件包

note: type: Content of: <book><chapter><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: interpreter module package used by other packages
zh_CN: 被其他軟件包使用的解釋器模塊包

note: type: Content of: <book><chapter><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: generic ELF library package used by other packages
zh_CN: 被其他軟件包使用的一般ELF庫文件包

note: type: Content of: <book><chapter><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: multiple binary packages including an ELF library package
zh_CN: 複合二進制的軟件包，包含ELF庫文件包

note: type: Content of: <book><chapter><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: source package with multiple upstream sources
zh_CN: 多上游的源碼包

note: type: Content of: <book><chapter><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: kernel module packages
zh_CN: 內核模塊軟件包

note: type: Content of: <book><chapter><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: kernel patch packages
zh_CN: 內核補丁軟件包

note: type: Content of: <book><chapter><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: any package with non-trivial maintainer scripts
zh_CN: 包含冷門維護者腳本的軟件包

note: type: Content of: <book><chapter><section><para>
en: Packaging high complexity packages is not too hard, but it requires a bit more knowledge. You should seek specific guidance for every complex feature. For example, some languages have their own sub-policy documents:
zh_CN: 打包高複雜軟件包並非難如登天，但需要更多知識。你應該針對每一個複雜特性來搜尋針對性的指南。比如，一些語言有它們自己的子策略文檔：

note: type: Content of: <book><chapter><section><para><footnote><para>
en: Do not worry about the missing <filename>Makefile</filename>.  You can install the <command>hello</command> command by simply using <command>debhelper</command> as in <xref linkend="install"/>, or by modifying the upstream source to add a new <filename>Makefile</filename> with the <literal>install</literal> target as in <xref linkend="modify"/>.
zh_CN: 不用擔心失蹤的 <filename>Makefile</filename>。你可以參照 <xref linkend="install"/> ，簡單地通過 <command>debhelper</command> 來安裝 <command>hello</command> 程序，或者修改上游源代碼來添加帶有<literal>install</literal>目標的新<filename>Makefile</filename>，參照<xref linkend="modify"/>

note: type: Content of: <book><chapter><section><para>
en: There is another old Latin saying: <emphasis>fabricando fit faber</emphasis> (practice makes perfect).  It is <emphasis>highly</emphasis> recommended to practice and experiment with all the steps of Debian packaging with simple packages while reading this tutorial.  A trivial upstream tarball, <filename>hello-sh-1.0.tar.gz</filename>, created as follows may offer a good starting point:<placeholder type="footnote" id="0"/>
zh_CN: 還有一句拉丁諺語：<emphasis>fabricando fit faber</emphasis> （熟能生巧）。我們 <emphasis>強烈</emphasis> 建議你在閱讀這篇教程的時候，用一個簡單的軟體包來對所有的 Debian 打包步驟進行實驗。跟隨下邊的步驟您就可以建立一個微不足道的軟體包 <filename>hello-sh-1.0.tar.gz</filename> ，而且這會是一個非常好的開端：<placeholder type="footnote" id="0"/>

note: type: Content of: <book><chapter><section><title>
en: Get the program, and try it out
zh_CN: 獲得程式，並且試用它

note: type: Content of: <book><chapter><section><para>
en: So the first thing to do is to find and download the original source code.  Presumably you already have the source file that you picked up at the author's homepage.  Sources for free Unix programs usually come in <command>tar</command>+<command>gzip</command> format with the extension <filename>.tar.gz</filename>, <command>tar</command>+<command>bzip2</command> format with the extension <filename>.tar.bz2</filename>, or <command>tar</command>+<command>xz</command> format with the extension <filename>.tar.xz</filename>.  These usually contain a directory called <filename><replaceable>package</replaceable>-<replaceable>version</replaceable></filename> with all the sources inside.
zh_CN: 第一件要做的事就是找到並下載原始的源代碼。我們假定你已經從作者的主頁上找到了它的源代碼。Unix 下的自由軟件源代碼通常是以 <command>tar</command>+<command>gzip</command> 格式(擴展名爲 <filename>.tar.gz</filename>)或 <command>tar</command>+<command>bzip2</command> 格式(擴展名爲 <filename>.tar.bz2</filename>)或<command>tar</command>+<command>xz</command> (擴展名爲<filename>.tar.xz</filename>)的形式提供的。通常歸檔文件中包含了一個名爲 <filename><replaceable>package</replaceable>-<replaceable>version</replaceable></filename> 的子目錄，裏麪包含了全部的源代碼。

note: type: Content of: <book><chapter><section><para>
en: If the latest version of the source is available through a Version Control System (VCS) such as Git, Subversion, or CVS, you need to get it with <literal>git clone</literal>, <literal>svn co</literal>, or <literal>cvs co</literal> and repack it into <command>tar</command>+<command>gzip</command> format yourself by using the <literal>--exclude-vcs</literal> option.
zh_CN: 如果最新版本的原始碼可透過像 Git，Subversion，CVS 這樣的版本控制系統獲得的話，你可以用 <literal>git clone</literal> ， <literal>svn co</literal>, 或 <literal>cvs co</literal> 來下載它，然後將它重新打包壓縮為 <command>tar</command>+<command>gzip</command> 格式， 同時別忘了 <literal>--exclude-vcs</literal> 選項喲。

note: type: Content of: <book><chapter><section><para><footnote><para>
en: You can identify the archive format using the <command>file</command> command when the file extension is not enough.
zh_CN: 當檔案副檔名不足以判斷檔案類型時，可以使用 <command>file</command> 命令來判斷。

note: type: Content of: <book><chapter><section><para>
en: If your program's source comes as some other sort of archive (for instance, the filename ends in <filename>.Z</filename> or <filename>.zip</filename><placeholder type="footnote" id="0"/>), you should also unpack it with the appropriate tools and repack it.
zh_CN: 如果你的程序源代碼是以其他形式提供的(比如文件名以 <filename>.Z</filename> 或 <filename>.zip</filename> 結尾<placeholder type="footnote" id="0"/>)，則使用合適的工具將其解包，再重新打包。

note: type: Content of: <book><chapter><section><para>
en: If your program's source comes with some contents which do not comply with DFSG, you should also unpack it to remove such contents and repack it with a modified upstream version containing <literal>dfsg</literal>.
zh_CN: 如果你的程序源代碼中包含一些不符合DFSG的內容，你應當解包後移除它們，再以添加了 <literal>dfsg</literal> 的上游版本號重新打包。

note: type: Content of: <book><chapter><section><para><footnote><para>
en: This program is already packaged. The <ulink url="&gentoo-package;">current version</ulink> uses Autotools as its build structure and is substantially different from the following examples, which were based on version 0.9.12.
zh_CN: 需要注意的是，這個程序已經被打包好了。<ulink url="&gentoo-package;">當前的版本</ulink> 使用 Autotools 作爲其構造(build structure)，並且已經和下邊的例子大不相同，下邊的例子基於版本 0.9.12 。

note: type: Content of: <book><chapter><section><para>
en: As an example, I'll use a program called <command>gentoo</command>, a GTK+ file manager.  <placeholder type="footnote" id="0"/>
zh_CN: 作爲示例，我將使用一個名爲 <command>gentoo</command> 的程序，它是一個 GTK+ 文件管理器。<placeholder type="footnote" id="0"/>

note: type: Content of: <book><chapter><section><para>
en: Create a subdirectory under your home directory named <filename>debian</filename> or <filename>deb</filename> or anything you find appropriate (e.g.  just <filename>~/gentoo</filename> would do fine in this case).  Place the downloaded archive in it, and extract it (with <literal>tar xzf gentoo-0.9.12.tar.gz</literal>).  Make sure there are no warning messages, even <emphasis>irrelevant</emphasis> ones, because other people's unpacking tools may or may not ignore these anomalies, so they may have problems unpacking them.  Your shell command line may look something like this:
zh_CN: 在你的用戶主目錄下創建一個子目錄，命名爲 <filename>debian</filename> 或 <filename>deb</filename> 或其他你喜歡且合適的名字(本例中使用 <filename>~/gentoo</filename>)。把下載好的歸檔文件放在其中並解包(使用 <literal>tar xzf gentoo-0.9.12.tar.gz</literal> 命令)。要確定解包過程中沒有發生錯誤，即便是有一點 <emphasis>不恰當</emphasis> 也不行，因爲在別人的系統上解包這些文件時，可能他們的工具並不忽略這些反常的現象，於是就會出現問題。在你的終端屏幕上，應該看到如下的情形。

note: type: Content of: <book><chapter><section><para>
en: Now you have another subdirectory, called <filename>gentoo-0.9.12</filename>.  Change to that directory and <emphasis>thoroughly</emphasis> read the provided documentation.  Usually there are files named <filename>README*</filename>, <filename>INSTALL*</filename>, <filename>*.lsm</filename> or <filename>*.html</filename>.  You must find instructions on how to compile and install the program (most probably they'll assume you want to install to the <filename>/usr/local/bin</filename> directory; you won't be doing that, but more on that later in <xref linkend="destdir"/>).
zh_CN: 現在又有了一個新的子目錄，名爲 <filename>gentoo-0.9.12</filename>。進入該目錄並 <emphasis>徹底</emphasis> 讀完其中的文檔。通常情況下這些文檔被命名爲 <filename>README*</filename>、<filename>INSTALL*</filename>、<filename>*.lsm</filename> 或 <filename>*.html</filename>。你必須找到關於如何正確編譯和安裝程序的指導(最可能的是他們會默認你希望把程序安裝到 <filename>/usr/local/bin</filename> 目錄；但事實上你不能那樣做，詳細的內容稍後將在 <xref linkend="destdir"/> 中說明)。

note: type: Content of: <book><chapter><section><para>
en: You should start packaging with a completely clean (pristine) source directory, or simply with freshly unpacked sources.
zh_CN: 開始打包時原始碼目錄應當是絕對乾淨(原始)的，或者直接使用剛剛解壓縮得到的原始碼。

note: type: Content of: <book><chapter><section><title>
en: Simple build systems
zh_CN: 簡易構建系統

note: type: Content of: <book><chapter><section><para><footnote><para>
en: Many modern programs come with a script named <filename>configure</filename>, which when executed creates a <filename>Makefile</filename> customized for your system.
zh_CN: 許多新時代的程式都配有一個叫做 <filename>configure</filename> 的指令碼。執行它的時候會生成一個為你的計算機專門定製的 <filename>Makefile</filename> 。

note: type: Content of: <book><chapter><section><para>
en: Simple programs usually come with a <filename>Makefile</filename> and can be compiled just by invoking <literal>make</literal>.<placeholder type="footnote" id="0"/> Some of them support <literal>make check</literal>, which runs included self-tests.  Installation to the destination directories is usually done with <literal>make install</literal>.
zh_CN: 帶有 <filename>Makefile</filename> 文件的簡單程序可以很容易地使用 <literal>make</literal> 來編譯。<placeholder type="footnote" id="0"/> 其中的一些還支持 <literal>make check</literal>，這可以完成一系列自檢。編譯好後可以使用 <literal>make install</literal> 來將程序安裝到目標目錄。

note: type: Content of: <book><chapter><section><para>
en: Now try to compile and run your program, to make sure it works properly and doesn't break something else while it's installing or running.
zh_CN: 現在嘗試編譯和運行你的程式，確保它工作正常，且在安裝和運行時不會導致其他問題。

note: type: Content of: <book><chapter><section><para>
en: Also, you can usually run <literal>make clean</literal> (or better <literal>make distclean</literal>) to clean up the build directory.  Sometimes there's even a <literal>make uninstall</literal> which can be used to remove all the installed files.
zh_CN: 你還可以運行 <literal>make clean</literal> (或更好的 <literal>make distclean</literal>)來清理編譯目錄。有時還會帶有 <literal>make uninstall</literal> 用以反安裝已經安裝了的檔案。

note: type: Content of: <book><chapter><section><title>
en: Popular portable build systems
zh_CN: 常见的可移植的構建系統

note: type: Content of: <book><chapter><section><para>
en: A lot of free software programs are written in the <ulink url="&c-program;">C</ulink> and <ulink url="&cxx;">C++</ulink> languages.  Many of these use Autotools or CMake to make them portable across different platforms.  These build tools need to be used to generate the <filename>Makefile</filename> and other required source files first.  Then, such programs are built using the usual <literal>make; make install</literal>.
zh_CN: 非常多的自由軟件是使用 <ulink url="&c-program;">C</ulink> 和 <ulink url="&cxx;">C++</ulink> 語言編寫的。其中的有很多使用 Autotools 或 CMake 來使其可以在不同平臺上移植。這些工具首先用於生成 <filename>Makefile</filename> 和其他必須的源文件，然後這些程序可以使用正常的 <literal>make; make install</literal> 來編譯和安裝。

note: type: Content of: <book><chapter><section><para><footnote><para>
en: Autotools is too big to deal with in this small tutorial. This section is meant to provide keywords and references only.  Please make sure to read the <ulink url="&autotools-tutorial;">Autotools Tutorial</ulink> and the local copy of <filename>&autotools-readme;</filename>, if you need to use it.
zh_CN: Autotools 這個龐然大物顯然已經超出本教程的討論範圍，畢竟本文主要提供關鍵字和提示。如果你需要使用 Autotools ，請認真研讀 <ulink url="&autotools-tutorial;">Autotools Tutorial</ulink> 以及 <filename>&autotools-readme;</filename> 的本地副本。

note: type: Content of: <book><chapter><section><para>
en: <ulink url="&gnu-build-system;">Autotools</ulink> is the GNU build system comprising <ulink url="&autoconf;">Autoconf</ulink>, <ulink url="&automake;">Automake</ulink>, <ulink url="&libtool;">Libtool</ulink>, and <ulink url="&gettext;">gettext</ulink>.  You can recognize such sources by the <filename>configure.ac</filename>, <filename>Makefile.am</filename>, and <filename>Makefile.in</filename> files.  <placeholder type="footnote" id="0"/>
zh_CN: <ulink url="&gnu-build-system;">Autotools</ulink> 是 GNU 編譯系統工具，包括 <ulink url="&autoconf;">Autoconf</ulink>、<ulink url="&automake;">Automake</ulink>、<ulink url="&libtool;">Libtool</ulink> 和 <ulink url="&gettext;">gettext</ulink>。你可以通過 <filename>configure.ac</filename>、<filename>Makefile.am</filename> 和 <filename>Makefile.in</filename> 等文件來識別這種類型的源代碼。<placeholder type="footnote" id="0"/>

note: type: Content of: <book><chapter><section><para>
en: The first step of the Autotools workflow is usually that upstream runs <literal>autoreconf -i -f</literal> in the source directory and distributes the generated files along with the source.
zh_CN: 使用 Autotools 的第一步是在上游作者在代碼中運行 <literal>autoreconf -i -f</literal> ，然後把生成的文件同源代碼一起分發。

note: type: Content of: <book><chapter><section><para>
en: Editing <filename>configure.ac</filename> and <filename>Makefile.am</filename> files requires some knowledge of <command>autoconf</command> and <command>automake</command>.  See <literal>info autoconf</literal> and <literal>info automake</literal>.
zh_CN: 編輯 <filename>configure.ac</filename> 和 <filename>Makefile.am</filename> 等檔案需要一些關於 <command>autoconf</command> 和 <command>automake</command> 的知識。參考 <literal>info autoconf</literal> 和 <literal>info automake</literal>。

note: type: Content of: <book><chapter><section><para>
en: The second step of the Autotools workflow is usually that the user obtains this distributed source and runs <literal>./configure &amp;&amp; make</literal> in the source directory to compile the program into an executable command <command><replaceable>binary</replaceable></command>.
zh_CN: 使用 Autotools 的第二步是用戶獲得分發的源代碼後在源碼目錄下運行 <literal>./configure &amp;&amp; make</literal> 來將其編譯成爲 <command><replaceable>binary</replaceable></command> (二進制可執行程序)。

note: type: Content of: <book><chapter><section><para>
en: You can change many things in the <filename>Makefile</filename>; for instance you can change the default location for file installation using the option <literal>./configure --prefix=/usr</literal>.
zh_CN: 你可以改變 <filename>Makefile</filename> 文件中的許多設置，比如修改默認的文件安裝位置(使用 <literal>./configure --prefix=/usr</literal>)。

note: type: Content of: <book><chapter><section><para><footnote><para>
en: You can automate this by using <systemitem role="package">dh-autoreconf</systemitem> package.  See <xref linkend="customrules"/>.
zh_CN: 你可以用 <systemitem role="package">dh-autoreconf</systemitem> 軟件包來將這個過程自動化。參見 <xref linkend="customrules"/>.

note: type: Content of: <book><chapter><section><para>
en: Although it is not required, updating the <filename>configure</filename> and other files with <literal>autoreconf -i -f</literal> may improve the compatibility of the source.  <placeholder type="footnote" id="0"/>
zh_CN: 儘管不是必須的：你還可以使用 <literal>autoreconf -i -f</literal> 來更新 <filename>configure</filename> 和其他相關文件，這樣做有可能提高源代碼的兼容性。 <placeholder type="footnote" id="0"/>

note: type: Content of: <book><chapter><section><para>
en: <ulink url="&cmake;">CMake</ulink> is an alternative build system.  You can recognize such sources by the <filename>CMakeLists.txt</filename> file.
zh_CN: <ulink url="&cmake;">CMake</ulink> 是另一個可選的構建系統，你可以通過 <filename>CMakeLists.txt</filename> 文件來識別使用它的源代碼。

note: type: Content of: <book><chapter><section><title>
en: Package name and version
zh_CN: 套件名稱和版本

note: type: Content of: <book><chapter><section><para>
en: If the upstream source comes as <filename>gentoo-0.9.12.tar.gz</filename>, you can take <literal>gentoo</literal> as the (source) <emphasis role="strong">package name</emphasis> and <literal>0.9.12</literal> as the <emphasis role="strong">upstream version</emphasis>.  These are used in the <filename>debian/changelog</filename> file described later in <xref linkend="changelog"/>, too.
zh_CN: 如果上游源代碼以像 <filename>gentoo-0.9.12.tar.gz</filename> 的形式分發，你可以用 <literal>gentoo</literal> 作爲(源代碼) <emphasis role="strong">軟件包名</emphasis> ，並用 <literal>0.9.12</literal> 作爲 <emphasis role="strong">上游版本</emphasis>。 它們會被 <filename>debian/changelog</filename> 這個文件用到；該文件一會會在 <xref linkend="changelog"/> 部分詳細描述。

note: type: Content of: <book><chapter><section><para>
en: Although this simple approach works most of the time, you may need to adjust <emphasis role="strong">package name</emphasis> and <emphasis role="strong">upstream version</emphasis> by renaming the upstream source to follow Debian Policy and existing convention.
zh_CN: 雖然此法在大部分情況下能顯靈，但你仍需要根據 Debian 政策（Debian Policy）以及約定俗成的做法來調整 <emphasis role="strong">軟體包名</emphasis> 和 <emphasis role="strong">上游版本</emphasis> 。

note: type: Content of: <book><chapter><section><para><footnote><para>
en: The default package name field length of <command>aptitude</command> is 30.  For more than 90% of packages, the package name is less than 24 characters.
zh_CN: 在 <command>aptitude</command> 工具中，軟件包名字段的默認最大長度爲 30。  而對於 90% 以上的軟件包來說，軟件包名都少於 24 個字符。

note: type: Content of: <book><chapter><section><para>
en: You must choose the <emphasis role="strong">package name</emphasis> to consist only of lower case letters (<literal>a-z</literal>), digits (<literal>0-9</literal>), plus (<literal>+</literal>) and minus (<literal>-</literal>) signs, and periods (<literal>.</literal>). It must be at least two characters long, must start with an alphanumeric character, and must not be the same as existing packages.  It is a good idea to keep its length within 30 characters.  <placeholder type="footnote" id="0"/>
zh_CN: 在 <emphasis role="strong">軟體包名</emphasis> 裡只能含有 小寫字母 (<literal>a-z</literal>), 數字 (<literal>0-9</literal>), 加號 (<literal>+</literal>) 和 減號 (<literal>-</literal>) ， 以及 點號 (<literal>.</literal>)。 軟體包名最短長度兩個字元；它必須以字母開頭；它不能與倉庫軟體包名發生衝突。還有，把軟體包名的長度控制在 30 字元以內是明智之舉。 <placeholder type="footnote" id="0"/>

note: type: Content of: <book><chapter><section><para><footnote><para>
en: If you follow the <ulink url="&devref-newpackage;">Debian Developer's Reference 5.1. "New packages"</ulink>, the ITP process will usually catch this kind of issue.
zh_CN: 如果你遵循 <ulink url="&devref-newpackage;">Debian Developer's Reference 5.1. "New packages"</ulink>， 那麼在 ITP 過程中很容易遇到這樣的問題。

note: type: Content of: <book><chapter><section><para>
en: If upstream uses some generic term such as <literal>test-suite</literal> for its name, it is a good idea to rename it to identify its contents explicitly and avoid namespace pollution.  <placeholder type="footnote" id="0"/>
zh_CN: 如果上游在它的名稱中使用了一些通用術語比如 <literal>test-suite</literal>， 那麼將其重命名，以顯式指明其內容並避免命名空間污染。 <placeholder type="footnote" id="0"/>

note: type: Content of: <book><chapter><section><para><footnote><para>
en: This stricter rule should help you avoid confusing file names.
zh_CN: 這一條更嚴格的規則能幫助你避免混淆文件名。

note: type: Content of: <book><chapter><section><para><footnote><para>
en: The default version field length of <command>aptitude</command> is 10.  The Debian revision with preceding hyphen usually consumes 2.  For more than 80% of packages, the upstream version is less than 8 characters and the Debian revision is less than 2 characters.  For more than 90% of packages, the upstream version is less than 10 characters and the Debian revision is less than 3 characters.
zh_CN: <command>aptitude</command> 命令的版本字段默認長度爲10。其中通常 Debian 修訂號和前置的連字符會消耗2個位置。對於 80% 以上的軟件包來說，上游版本小於8字符，Debian 修訂號小於2字符。對於 90% 以上的軟件包來說，上游版本小於10字符，Debian 修訂號小於3字符。

note: type: Content of: <book><chapter><section><para>
en: You should choose the <emphasis role="strong">upstream version</emphasis> to consist only of alphanumerics (<literal>0-9A-Za-z</literal>), plus signs (<literal>+</literal>), tildes (<literal>~</literal>), and periods (<literal>.</literal>). It must start with a digit (<literal>0-9</literal>).  <placeholder type="footnote" id="0"/> It is good idea to keep its length within 8 characters if possible.  <placeholder type="footnote" id="1"/>
zh_CN: 你應該讓 <emphasis role="strong">upstream version（上游版本號）</emphasis> 只包含字母和數字 (<literal>0-9A-Za-z</literal>), 以及加號 (<literal>+</literal>), 波浪號 (<literal>~</literal>), 還有 點號(<literal>.</literal>)。它必須以數字開頭 (<literal>0-9</literal>)。  <placeholder type="footnote" id="0"/> 如果可能的話，最好把它的長度控制在8字元以內。 <placeholder type="footnote" id="1"/>

note: type: Content of: <book><chapter><section><para>
en: If upstream does not use a normal versioning scheme such as <literal>2.30.32</literal> but uses some kind of date such as <literal>11Apr29</literal>, a random codename string, or a VCS hash value as part of the version, make sure to remove them from the <emphasis role="strong">upstream version</emphasis>.  Such information can be recorded in the <filename>debian/changelog</filename> file.  If you need to invent a version string, use the <literal>YYYYMMDD</literal> format such as <literal>20110429</literal> as upstream version.  This ensures that <command>dpkg</command> interprets later versions correctly as upgrades.  If you need to ensure smooth transition to the normal version scheme such as <literal>0.1</literal> in the future, use the <literal>0~YYMMDD</literal> format such as <literal>0~110429</literal> as the upstream version.
zh_CN: 如果上游不使用像 <literal>2.30.32</literal> 這樣的常規版本格式，而是用類似 <literal>11Apr29</literal> 這樣的日期作為版本，類似於隨機的代號字串，或者以VCS的雜湊值作為版本號的一部分，那麼請確認將其從 <emphasis role="strong">upstream version</emphasis> 中移除。 為此作出的改動資訊可以記錄在 <filename>debian/changelog</filename> 檔案中。 如果你需要發明一個版本字串，請使用 <literal>YYYYMMDD</literal> 這個格式作為上游版本，比如 <literal>20110429</literal> 。這會確保 <command>dpkg</command> 在升級軟體包時能夠正確解讀新版本。 如果需要確保未來能夠平滑過渡到類似 <literal>0.1</literal> 這樣的版本號的話，那就請使用 <literal>0~YYMMDD</literal> 格式作為上游版本，例如 <literal>0~110429</literal> 。

note: type: Content of: <book><chapter><section><para><footnote><para>
en: Version strings may be <emphasis role="strong">upstream version</emphasis> (<literal><replaceable>version</replaceable></literal>), <emphasis role="strong">Debian revision</emphasis> (<literal><replaceable>revision</replaceable></literal>), or <emphasis role="strong">version</emphasis> (<literal><replaceable>version</replaceable>-<replaceable>revision</replaceable></literal>).  See <xref linkend="newrevision"/> for how the <emphasis role="strong">Debian revision</emphasis> is incremented.
zh_CN: 版本字符串可以是 <emphasis role="strong">upstream version</emphasis> (<literal><replaceable>version</replaceable></literal>), <emphasis role="strong">Debian revision</emphasis> (<literal><replaceable>revision</replaceable></literal>), 或者 <emphasis role="strong">version</emphasis> (<literal><replaceable>version</replaceable>-<replaceable>revision</replaceable></literal>)。 關於 Debian 修訂號如何增長的信息，請參見  <xref linkend="newrevision"/><emphasis role="strong">Debian revision</emphasis> 。

note: type: Content of: <book><chapter><section><para>
en: Version strings <placeholder type="footnote" id="0"/> can be compared using <citerefentry> <refentrytitle>dpkg</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> as follows:
zh_CN: 版本字符串 <placeholder type="footnote" id="0"/> 可以用 <citerefentry> <refentrytitle>dpkg</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> 來進行比較：

note: type: Content of: <book><chapter><section><para>
en: The version comparison rule can be summarized as:
zh_CN: 版本比較規則可以總結爲以下幾點：

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: Strings are compared from the head to the tail.
zh_CN: 字符串會被從頭到尾進行比較。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: Letters are larger than digits.
zh_CN: 字母比數字大。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: Numbers are compared as integers.
zh_CN: 數字作爲整數進行比較。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: Letters are compared in ASCII code order.
zh_CN: 字母按照 ASCII 編碼順序進行比較。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: There are special rules for period (<literal>.</literal>), plus (<literal>+</literal>), and tilde (<literal>~</literal>) characters, as follows:
zh_CN: 對於點號 (<literal>.</literal>)，加號 (<literal>+</literal>)，以及波浪號 (<literal>~</literal>) 則要應用特殊規則，具體如下：

note: type: Content of: <book><chapter><section><para>
en: One tricky case occurs when upstream releases <filename>gentoo-0.9.12-ReleaseCandidate-99.tar.gz</filename> as the pre-release of <filename>gentoo-0.9.12.tar.gz</filename>.  You need to make sure that the upgrade works properly by renaming the upstream source to <filename>gentoo-0.9.12~rc99.tar.gz</filename>.
zh_CN: 有一種比較棘手的情況，當上游釋出 <filename>gentoo-0.9.12-ReleaseCandidate-99.tar.gz</filename> 作爲 <filename>gentoo-0.9.12.tar.gz</filename> 的預發佈版本時，就需要確保升級工作妥當進行：重命名該上游源代碼爲 <filename>gentoo-0.9.12~rc99.tar.gz</filename>.

note: type: Content of: <book><chapter><section><title>
en: Setting up <command>dh_make</command>
zh_CN: 設置 <command>dh_make</command>

note: type: Content of: <book><chapter><section><para><footnote><para>
en: The following text assumes you are using Bash as your login shell.  If you use some other login shell such as Z shell, use their corresponding configuration files instead of <filename>~/.bashrc</filename>.
zh_CN: 以下默認你以 Bash 作爲登陸 shell。如果你使用其他的 shell，例如 Z shell，那就使用它們的配置文件代替這裏提到的 <filename>~/.bashrc</filename>。

note: type: Content of: <book><chapter><section><para>
en: Set up the shell environment variables <literal>$DEBEMAIL</literal> and <literal>$DEBFULLNAME</literal> so that various Debian maintenance tools recognize your email address and name to use for packages. <placeholder type="footnote" id="0"/>
zh_CN: 首先我們設置兩個 環境變量，<literal>$DEBEMAIL</literal> 和 <literal>$DEBFULLNAME</literal>，這樣能使使大多數 Debian 維護工具能夠正確識別你用於維護軟件包的姓名和電子郵件地址。<placeholder type="footnote" id="0"/>

note: type: Content of: <book><chapter><section><title>
en: Initial non-native Debian package
zh_CN: 初始化外來 Debian 軟件包

note: type: Content of: <book><chapter><section><para>
en: Normal Debian packages are non-native Debian packages made from upstream programs.  If you wish to create a non-native Debian package of an upstream source <filename>gentoo-0.9.12.tar.gz</filename>, you can create an initial non-native Debian package for it by issuing the <command>dh_make</command> command as follows:
zh_CN: 一般的 Debian 軟件包是由上遊程序產生的 外來 Debian 軟件包。 若你想要用上游源代碼 <filename>gentoo-0.9.12.tar.gz</filename> 創建一個外來 Debian 軟件包，你可以爲它創建一個初始的外來 Debian 軟件包，通過如下方法調用 <command>dh_make</command> 命令：

note: type: Content of: <book><chapter><section><para><footnote><para>
en: If the upstream source provides the <filename>debian</filename> directory and its contents, run the <command>dh_make</command> command with the extra option <literal>--addmissing</literal>.  The new source <literal>3.0 (quilt)</literal> format is robust enough not to break even for these packages.  You may need to update the contents provided by the upstream version for your Debian package.
zh_CN: 如果上游原始碼已經提供了有內容的 <filename>debian</filename> 目錄，那麼帶上引數 <literal>--addmissing</literal> 來執行<command>dh_make</command> 命令。 新的原始碼包格式 <literal>3.0 (quilt)</literal> 的魯棒性(Robust)已經足夠優秀，以不至於輕易損壞。 另外，你可能需要修改上游提供的內容，以滿足你的 Debian 軟體包之需。

note: type: Content of: <book><chapter><section><para>
en: Of course, replace the filename with the name of your original source archive.  <placeholder type="footnote" id="0"/> See <citerefentry> <refentrytitle>dh_make</refentrytitle> <manvolnum>8</manvolnum> </citerefentry> for details.
zh_CN: 當然，請用你原始源碼歸檔的名字來替換 filename (文件名)。  <placeholder type="footnote" id="0"/> 詳情請參見 <citerefentry> <refentrytitle>dh_make</refentrytitle> <manvolnum>8</manvolnum> </citerefentry> 。

note: type: Content of: <book><chapter><section><para><footnote><para>
en: There are several choices here: <literal>s</literal> for Single binary package, <literal>i</literal> for arch-Independent package, <literal>m</literal> for Multiple binary packages, <literal>l</literal> for Library package, <literal>k</literal> for Kernel module package, <literal>n</literal> for kernel patch package, and <literal>b</literal> for <systemitem role="package">cdbs</systemitem> package.  This document focuses on the use of the <command>dh</command> command (from the package <systemitem role="package">debhelper</systemitem>) to create a single binary package, but also touches on how to use it for arch-independent or multiple binary packages.  The package <systemitem role="package">cdbs</systemitem> offers an alternative packaging script infrastructure to the <command>dh</command> command and is outside the scope of this document.
zh_CN: 此處有這幾種選擇： <literal>s</literal> 代表單一二進制包， <literal>i</literal> 代表獨立於體繫結構的軟件包， <literal>m</literal> 代表複合二進制包， <literal>l</literal> 代表庫文件包，<literal>k</literal> 代表內核模塊包， <literal>n</literal> 代表內核補丁包， <literal>b</literal> 代表 <systemitem role="package">cdbs</systemitem> 軟件包。本教程專注於使用 <command>dh</command> 命令 (來自 <systemitem role="package">debhelper</systemitem> 軟件包) 來創建單一二進制包，但 也會涉及到如何用它來創建 獨立於體繫結構 或 複合二進制軟件包。軟件包 <systemitem role="package">cdbs</systemitem> 提供了 另一套可以代替 <command>dh</command> 命令的基礎打包腳本，不過對它的描述已經超出了我們的討論範圍。

note: type: Content of: <book><chapter><section><para>
en: You should see some output asking you what sort of package you want to create.  Gentoo is a single binary package &#x2014; it creates only one binary package, i.e., one <filename>.deb</filename> file &#x2014; so we will select the first option (with the <literal>s</literal> key), check the information on the screen, and confirm by pressing <literal><replaceable>ENTER</replaceable></literal>.  <placeholder type="footnote" id="0"/>
zh_CN: 你會看到一些輸出，詢問你想要建立什麼型別的軟體包。這裡的 Gentoo 被規劃為一個單一二進位制包——它僅僅產生一個二進位制包， 亦即單個 <filename>.deb</filename> 檔案——於是我們就選擇第一項 (按 <literal>s</literal> 鍵)， 認真閱讀螢幕上的輸出資訊， 然後按 <literal><replaceable>ENTER</replaceable></literal> 鍵來確認。 <placeholder type="footnote" id="0"/>

note: type: Content of: <book><chapter><section><para>
en: This execution of <command>dh_make</command> creates a copy of the upstream tarball as <filename>gentoo_0.9.12.orig.tar.gz</filename> in the parent directory to accommodate the creation of the non-native Debian source package with the name <filename>debian.tar.gz</filename> later:
zh_CN: 執行 <command>dh_make</command> 後，上一級目錄中自動創建了一份上游 tarball 的副本，名爲 <filename>gentoo_0.9.12.orig.tar.gz</filename>，這個文件和稍後介紹的 <filename>debian.tar.gz</filename> 在一起滿足了 Debian 非本地源代碼包的要求。

note: type: Content of: <book><chapter><section><para>
en: Please note two key features of this filename <filename>gentoo_0.9.12.orig.tar.gz</filename>:
zh_CN: 請注意 <filename>gentoo_0.9.12.orig.tar.gz</filename> 這個文件名的兩個關鍵特點：

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: Package name and version are separated by the character <literal>_</literal> (underscore).
zh_CN: 軟件包名稱和版本是以字符 <literal>_</literal> （下劃線）分隔的。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: The string <filename>.orig</filename> is inserted before the <filename>.tar.gz</filename>.
zh_CN: <filename>.tar.gz</filename> 擴展名前插有 <filename>.orig</filename>。

note: type: Content of: <book><chapter><section><para>
en: You should also notice that many template files are created in the source under the <filename>debian</filename> directory.  These will be explained in <xref linkend="dreq"/> and <xref linkend="dother"/>.  You should also understand that packaging cannot be a fully automated process.  You will need to modify the upstream source for Debian (see <xref linkend="modify"/>).  After this, you need to use the proper methods for building Debian packages (<xref linkend="build"/>), testing them (<xref linkend="checkit"/>), and uploading them (<xref linkend="upload"/>).  All the steps will be explained.
zh_CN: 你應該可以注意到 <filename>debian</filename> 目錄下有了許多模板文件。這些文件將在 <xref linkend="dreq"/> 和 <xref linkend="dother"/> 中一一解釋。你還應該明白，打包沒辦法變成全自動的過程。你還需要按照 <xref linkend="modify"/> 中的方法來爲 Debian 修改軟件包。此後，你還要按照 <xref linkend="build"/> 中敘述的合適的方法來構建 Debian 軟件包，並按照 <xref linkend="checkit"/> 中的方法進行測試，最終依照 <xref linkend="upload"/> 的介紹將其上傳。本教程將對所有的這些步驟進行解釋。

note: type: Content of: <book><chapter><section><para>
en: If you accidentally erased some template files while working on them, you can recover them by running <command>dh_make</command> with the <literal>--addmissing</literal> option again in a Debian package source tree.
zh_CN: 如果你在修改過程中不小心刪除或弄壞了某些模板檔案，你可以使用 <command>dh_make</command> 加上 <literal>--addmissing</literal> 參數來將其還原。

note: type: Content of: <book><chapter><section><para>
en: Updating an existing package may get complicated since it may be using older techniques.  While learning the basics, please stick to creating a fresh package; further explanations are given in <xref linkend="update"/>.
zh_CN: 更新一個已存在的軟件包可能比較複雜，因爲它可能使用了舊技術。在學習基本功的階段，請只創建全新的軟件包；稍後的 <xref linkend="update"/>中會有更細緻的講解。

note: type: Content of: <book><chapter><section><para>
en: Please note that the source file does not need to contain any build system discussed in <xref linkend="simplemake"/> and <xref linkend="portable"/>.  It could be just a collection of graphical data, etc.  Installation of files may be carried out using only <systemitem role="package">debhelper</systemitem> configuration files such as <filename>debian/install</filename> (see <xref linkend="install"/>).
zh_CN: 請注意，原始碼中不必包含任何在 <xref linkend="simplemake"/> 或 <xref linkend="portable"/> 中談論到的編譯系統。 就算原始碼包僅僅是一組影象之類的也可以，這時候這些檔案的安裝可以用 <systemitem role="package">debhelper</systemitem> 的配置檔案來搞定，比如 <filename>debian/install</filename> (參見 <xref linkend="install"/>)。

note: type: Content of: <book><chapter><title>
en: Modifying the source
zh_CN: 修改原始碼

note: type: Content of: <book><chapter><para>
en: Please note that there isn't space here to go into <emphasis>all</emphasis> the details of fixing upstream sources, but here are some basic steps and problems people often run across.
zh_CN: 請注意這裏沒有足夠的篇幅來描述修改上游原始碼的 <emphasis>全部</emphasis> 細節，但是這裏介紹了基本的步驟和常見的問題。

note: type: Content of: <book><chapter><section><title>
en: Setting up <command>quilt</command>
zh_CN: 設置 <command>quilt</command>

note: type: Content of: <book><chapter><section><para>
en: The program <command>quilt</command> offers a basic method for recording modifications to the upstream source for Debian packaging.  It's useful to have a slightly customized default, so let's create an alias <command>dquilt</command> for Debian packaging by adding the following lines to <filename>~/.bashrc</filename>.  The second line provides the same shell completion feature of the <command>quilt</command> command to the <command>dquilt</command> command:
zh_CN: <command>quilt</command> 程序爲 Debian 打包工作提供了記錄上游源碼修改的基本方法。對默認配置加以少許修改往往非常有用，所以我們來創建一個別名 <command>dquilt</command>，以用於打包： 添加以下幾行內容到 <filename>~/.bashrc</filename> 文件中。其中第二行可以給 <command>dquilt</command> 命令提供與 <command>quilt</command> 命令相同的 shell 補全特性：

note: type: Content of: <book><chapter><section><para>
en: Then let's create <filename>~/.quiltrc-dpkg</filename> as follows:
zh_CN: 現在按下面的方法來創建 <filename>~/.quiltrc-dpkg</filename> 文件：

note: type: Content of: <book><chapter><section><para>
en: See <citerefentry> <refentrytitle>quilt</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> and <filename>&quilt-pdf;</filename> on how to use <command>quilt</command>.
zh_CN: 參見 <citerefentry> <refentrytitle>quilt</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> 以及 <filename>&quilt-pdf;</filename> 來獲取有關 <command>quilt</command> 命令用法的信息。

note: type: Content of: <book><chapter><section><title>
en: Fixing upstream bugs
zh_CN: 修復上游 Bug

note: type: Content of: <book><chapter><section><para>
en: Let's assume you find an error in the upstream <filename>Makefile</filename> as follows, where <literal>install: gentoo</literal> should have been <literal>install: gentoo-target</literal>.
zh_CN: 假設你在上游的 <filename>Makefile</filename> 檔案中找到了一個錯誤，其中的 <literal>install: gentoo</literal> 應該修正為 <literal>install: gentoo-target</literal> 。

note: type: Content of: <book><chapter><section><para><footnote><para>
en: The <filename>debian/patches</filename> directory should exist now if you ran <command>dh_make</command> as described before.  This example operation creates it just in case you are updating an existing package.
zh_CN: <filename>debian/patches</filename> 目錄應當是在你按照前面所述的步驟運行 <command>dh_make</command> 時生成的。而在這個例子中我們新創建它，因爲假設的是在更新一個已存在的軟件包。

note: type: Content of: <book><chapter><section><para>
en: Let's fix this and record it with the <command>dquilt</command> command as <filename>fix-gentoo-target.patch</filename>: <placeholder type="footnote" id="0"/>
zh_CN: 讓我們使用 <command>dquilt</command> 修復這個問題，並把補丁命名爲 <filename>fix-gentoo-target.patch</filename>。<placeholder type="footnote" id="0"/>

note: type: Content of: <book><chapter><section><para>
en: You change the <filename>Makefile</filename> file as follows:
zh_CN: 現在將 <filename>Makefile</filename> 修改爲如下的樣子：

note: type: Content of: <book><chapter><section><para>
en: Ask <command>dquilt</command> to generate the patch to create <filename>debian/patches/fix-gentoo-target.patch</filename> and add its description following <ulink url="&dep3;">DEP-3: Patch Tagging Guidelines</ulink>:
zh_CN: 使用 <command>dquilt</command> 將補丁生成到 <filename>debian/patches/fix-gentoo-targe.patch</filename> 並根據 <ulink url="&dep3;">DEP-3: Patch Tagging Guidelines</ulink> 添加描述：

note: type: Content of: <book><chapter><section><screen>
en: $ dquilt refresh
    $ dquilt header -e
    ... describe patch
zh_CN: $ dquilt refresh
    $ dquilt header -e
    ... 描述補丁

note: type: Content of: <book><chapter><section><title>
en: Installation of files to their destination
zh_CN: 把文件安裝到目的位置

note: type: Content of: <book><chapter><section><para>
en: Most third-party software installs itself in the <filename>/usr/local</filename> directory hierarchy.  On Debian this is reserved for private use by the system administrator, so packages must not use directories such as <filename>/usr/local/bin</filename> but should instead use system directories such as <filename>/usr/bin</filename>, obeying the <ulink url="&fhs;">Filesystem Hierarchy Standard</ulink> (FHS).
zh_CN: 大多數第三方程序將其本身安裝在 <filename>/usr/local</filename> 目錄下。在 Debian 中，這是保留給系統管理員的私有位置，因此 Debian 軟件包不可以使用比如<filename>/usr/local/bin</filename> 這樣的目錄，而應當使用系統目錄比如 <filename>/usr/bin</filename>， 以遵循文件系統層級結構標準： <ulink url="&fhs;">Filesystem Hierarchy Standard</ulink> (FHS)。

note: type: Content of: <book><chapter><section><para>
en: Normally, <citerefentry> <refentrytitle>make</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> is used to automate building the program, and executing <literal>make install</literal> installs programs directly to the desired destination (following the <literal>install</literal> target in the <filename>Makefile</filename>).  In order for Debian to provide pre-built installable packages, it modifies the build system to install programs into a file tree image created under a temporary directory instead of the actual destination.
zh_CN: 通常在自動編譯程序時使用 <citerefentry> <refentrytitle>make</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> 程序，接着執行 <literal>make install</literal> 就可以把程序直接按照 <filename>Makefile</filename> 文件中的 <literal>install</literal> target 安裝到指定的位置。爲了使 Debian 能夠提供編譯好的二進制軟件包，編譯系統將文件安裝到一個臨時目錄中創建的文件系統樹的鏡像中，而非直接安裝到實際的目標位置。

note: type: Content of: <book><chapter><section><para>
en: These two differences between normal program installation on one hand and the Debian packaging system on the other can be transparently addressed by the <systemitem role="package">debhelper</systemitem> package through the <command>dh_auto_configure</command> and <command>dh_auto_install</command> commands if the following conditions are met:
zh_CN: 普通程序安裝過程和 Debian 打包安裝過程二者的區別可以由 <systemitem role="package">debhelper</systemitem> 軟件包中的 <command>dh_auto_configure</command> 和 <command>dh_auto_install</command> 透明地處理。但必須滿足以下條件：

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para><footnote><para>
en: See <ulink url="&gnu-destdir;">GNU Coding Standards: 7.2.4 DESTDIR: Support for Staged Installs</ulink>.
zh_CN: 參見 <ulink url="&gnu-destdir;">GNU Coding Standards: 7.2.4 DESTDIR: Support for Staged Installs</ulink>。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: The <filename>Makefile</filename> must follow GNU conventions and support the <literal>$(DESTDIR)</literal> variable.  <placeholder type="footnote" id="0"/>
zh_CN: <filename>Makefile</filename> 文件應當遵循 GNU 的規定支持 <literal>$(DESTDIR)</literal> 變量<placeholder type="footnote" id="0"/>

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: The source must follow the Filesystem Hierarchy Standard (FHS).
zh_CN: 源代碼必須遵循文件系統層級標準(FHS)。

note: type: Content of: <book><chapter><section><para>
en: Programs that use GNU <command>autoconf</command> follow the GNU conventions automatically, so they can be trivial to package.  On the basis of this and other heuristics, it is estimated that the <systemitem role="package">debhelper</systemitem> package will work for about 90% of packages without making any intrusive changes to their build system.  So packaging is not as complicated as it may seem.
zh_CN: 使用 GNU <command>autoconf</command> 的程序自動遵守了GNU 的規定，這多少有利於打包過程的自動化。通過這項特點和其他啓發式處理，估計 <systemitem role="package">debhelper</systemitem> 軟件可以直接打包約 90% 的軟件包而不需對編譯系統做出大的改變。所以打包也不是看起來那樣複雜。

note: type: Content of: <book><chapter><section><para>
en: If you need to make changes in the <filename>Makefile</filename>, you should be careful to support the <literal>$(DESTDIR)</literal> variable.  Although it is unset by default, the <literal>$(DESTDIR)</literal> variable is prepended to each file path used for the program installation.  The packaging script will set <literal>$(DESTDIR)</literal> to the temporary directory.
zh_CN: 如果你需要修改 <filename>Makefile</filename> 文件，就要確保其支持 <literal>$(DESTDIR)</literal> 變量。雖然默認情況下 <literal>$(DESTDIR)</literal> 變量沒有設置並且在程序安裝時會前置到每個文件的路徑中。打包腳本會將 <literal>$(DESTDIR)</literal> 設置爲臨時目錄。

note: type: Content of: <book><chapter><section><para><footnote><para>
en: For a source package generating multiple binary packages, the <command>dh_auto_install</command> command uses <filename>debian/tmp</filename> as the temporary directory while the <command>dh_install</command> command with the help of <filename>debian/<replaceable>package-1</replaceable>.install</filename> and <filename>debian/<replaceable>package-2</replaceable>.install</filename> files will split the contents of <filename>debian/tmp</filename> into <filename>debian/<replaceable>package-1</replaceable></filename> and <filename>debian/<replaceable>package-2</replaceable></filename> temporary directories, to create <filename><replaceable>package-1</replaceable>_*.deb</filename> and <filename><replaceable>package-2</replaceable>_*.deb</filename> binary packages.
zh_CN: 對於單個源碼包生成多個二進制包，<command>dh_auto_install</command> 將臨時目錄設置爲<filename>debian/tmp</filename>，而 <command>dh_install</command> 命令則將文件按照 <filename>debian/<replaceable>package-1</replaceable>.install</filename> 和 <filename>debian/<replaceable>package-2</replaceable>.install</filename> 等文件的描述將 <filename>debian/tmp</filename> 中的文件分別裝入 <filename>debian/<replaceable>package-1</replaceable></filename> 和 <filename>debian/<replaceable>package-2</replaceable></filename> 等臨時目錄用以創建 <filename><replaceable>package-1</replaceable>_*.deb</filename> 和 <filename><replaceable>package-2</replaceable>_*.deb</filename> 等二進制軟件包。

note: type: Content of: <book><chapter><section><para>
en: For a source package generating a single binary package, the temporary directory used by the <command>dh_auto_install</command> command will be set to <filename>debian/<replaceable>package</replaceable></filename>.  <placeholder type="footnote" id="0"/> Everything that is contained in the temporary directory will be installed on users' systems when they install your package; the only difference is that <command>dpkg</command> will be installing the files to paths relative to the root directory rather than your working directory.
zh_CN: 對於從源碼包生成單個二進制包， <command>dh_auto_install</command> 將臨時目錄設置爲 <filename>debian/<replaceable>package</replaceable></filename>。<placeholder type="footnote" id="0"/> 臨時目錄中的全部文件都將在安裝軟件包時被安裝到用戶系統，唯一的區別是 <command>dpkg</command> 會把文件安裝到真實的根目錄樹中，而不是你的工作目錄。

note: type: Content of: <book><chapter><section><para>
en: Bear in mind that even though your program installs in <filename>debian/<replaceable>package</replaceable></filename>, it still needs to behave correctly when installed from the <filename>.deb</filename> package under the root directory.  So you must not allow the build system to hardcode strings like <literal>/home/me/deb/<replaceable>package</replaceable>-<replaceable>version</replaceable>/usr/share/<replaceable>package</replaceable></literal> into files in the package.
zh_CN: 請記住，即使你的程序正確安裝到了<filename>debian/<replaceable>package</replaceable></filename>，仍然要考慮將 <filename>.deb</filename> 軟件包文件安裝到根目錄下的情形。所以絕對不允許構建系統將諸如 <literal>/home/me/deb/<replaceable>package</replaceable>-<replaceable>version</replaceable>/usr/share/<replaceable>package</replaceable></literal> 這種詭異的內容硬編碼到軟件包文件中。

note: type: Content of: <book><chapter><section><para><footnote><para>
en: This is just an example to show what a <filename>Makefile</filename> should look like.  If the <filename>Makefile</filename> is created by the <command>./configure</command> command, the correct way to fix this kind of <filename>Makefile</filename> is to execute <command>./configure</command> from the <command>dh_auto_configure</command> command with default options including <literal>--prefix=/usr</literal>.
zh_CN: 這只是一個演示 <filename>Makefile</filename> 正常形態的例子。如果 <filename>Makefile</filename> 是通過 <command>./configure</command>  命令生成的，那麼修復該類 <filename>Makefile</filename> 的方法是通過 <command>dh_auto_configure</command> 來執行 <command>./configure</command>，並帶上包括 <literal>--prefix=/usr</literal> 的默認選項。

note: type: Content of: <book><chapter><section><para>
en: Here's the relevant part of <systemitem role="package">gentoo</systemitem>'s <filename>Makefile</filename><placeholder type="footnote" id="0"/>:
zh_CN: 以下是 <systemitem role="package">gentoo</systemitem> 軟件包的 <filename>Makefile</filename> 文件中的相關部分<placeholder type="footnote" id="0"/>：

note: type: Content of: <book><chapter><section><para>
en: We see that the files are set to install under <filename>/usr/local</filename>.  As explained above, that directory hierarchy is reserved for local use on Debian, so change those paths as follows:
zh_CN: 可以看到檔案被放到了 <filename>/usr/local</filename> 下。按照上邊的解釋，該目錄被 Debian 保留作本地用途，所以請把它們按如下方式修改：

note: type: Content of: <book><chapter><section><para>
en: The exact locations that should be used for binaries, icons, documentation, etc. are specified in the Filesystem Hierarchy Standard (FHS).  You should browse through it and read the sections relevant to your package.
zh_CN: 二進制文件、圖標和文檔等的更確切位置均已在文件層級標準(FHS)中作出了詳盡描述。本教程建議你快速瀏覽相關章節以獲取你打包需要用到的內容。

note: type: Content of: <book><chapter><section><para>
en: So, we should install executable commands in <filename>/usr/bin</filename> instead of <filename>/usr/local/bin</filename>, the manual page in <filename>/usr/share/man/man1</filename> instead of <filename>/usr/local/man/man1</filename>, and so on.  Notice how there's no manual page mentioned in <systemitem role="package">gentoo</systemitem>'s <filename>Makefile</filename>, but since Debian Policy requires that every program has one, we'll make one later and install it in <filename>/usr/share/man/man1</filename>.
zh_CN: 因此，我們應當把可執行二進制文件安裝到 <filename>/usr/bin</filename> 而非 <filename>/usr/local/bin</filename>，而 man 手冊頁則應放在 <filename>/usr/share/man/man1</filename> 而非 <filename>/usr/local/man/man1</filename>，依此類推。注意，<systemitem role="package">gentoo</systemitem> 的 <filename>Makefile</filename> 裏沒有提及手冊頁，而按照 Debian Policy 的要求，每個程序都應當有一個手冊頁，我們將在稍後製作一個並安裝到 <filename>/usr/share/man/man1</filename>。

note: type: Content of: <book><chapter><section><para>
en: Some programs don't use <filename>Makefile</filename> variables to define paths such as these.  This means you might have to edit some real C sources in order to fix them to use the right locations.  But where to search, and exactly what for? You can find this out by issuing:
zh_CN: 有些程式不使用 <filename>Makefile</filename> 變量定義路徑，這意味着你可能需要去編輯 C 程式原始碼來使他們使用正確的路徑。但是到哪裏去搜索，哪些纔是呢？你可以通過以下的方法找到它們：

note: type: Content of: <book><chapter><section><para>
en: <command>grep</command> will run recursively through the source tree and tell you the filename and the line number for all matches.
zh_CN: <command>grep</command> 會遞歸搜索整個原始碼樹並告訴你所有匹配項的檔案名和行號。

note: type: Content of: <book><chapter><section><para>
en: Edit those files and in those lines replace <literal>usr/local/lib</literal> with <literal>usr/lib</literal>.  This can be done automatically as follows:
zh_CN: 編輯那些文件，在那些行中用 <literal>usr/lib</literal> 替換 <literal>usr/local/lib</literal>。這個過程可以用如下方法自動化完成：

note: type: Content of: <book><chapter><section><para>
en: If you want to confirm each substitution instead, this can be done interactively as follows:
zh_CN: 如果你想要確認每一個替換操作，那麼下邊的方法可以讓你交互式地達成：

note: type: Content of: <book><chapter><section><para>
en: Next you should find the <literal>install</literal> target (searching for the line that starts with <literal>install:</literal> will usually work) and rename all references to directories other than ones defined at the top of the <filename>Makefile</filename>.
zh_CN: 緊接着你應該找到 <literal>install</literal> target (通常搜索以 <literal>install:</literal> 開頭的行即可)，並把除 <filename>Makefile</filename> 頂部定義變量之外的目錄引用妥當修改。

note: type: Content of: <book><chapter><section><para>
en: Originally, <systemitem role="package">gentoo</systemitem>'s <literal>install</literal> target said:
zh_CN: 原始的 <systemitem role="package">gentoo</systemitem> 的 <literal>install</literal> target 是這樣：

note: type: Content of: <book><chapter><section><para>
en: Let's fix this upstream bug and record it with the <command>dquilt</command> command as <filename>debian/patches/install.patch</filename>.
zh_CN: 讓我們來修復這個上游BUG，並把修改使用 <command>dquilt</command> 命令記錄到<filename>debian/patches/install.patch</filename>。

note: type: Content of: <book><chapter><section><para>
en: In your editor, change this for the Debian package as follows:
zh_CN: 使用你喜歡的編輯器按照以下內容爲 Debian 軟件包作修改：

note: type: Content of: <book><chapter><section><para>
en: You'll have noticed that there's now an <literal>install -d</literal> command before the other commands in the rule.  The original <filename>Makefile</filename> didn't have it because usually <literal>/usr/local/bin</literal> and other directories already exist on the system where you are running <literal>make install</literal>.  However, since we will be installing into a newly created private directory tree, we will have to create each and every one of those directories.
zh_CN: 你一定會注意到規則裏在其他命令前有了一個 <literal>install -d</literal> 命令。原始的 <filename>Makefile</filename> 文件中沒有它，因爲通常情況下當你執行 <literal>make install</literal> 命令時， <literal>/usr/local/bin</literal> 和用到的其他目錄早已存在於系統中。然而當我們要向新建的私有目錄樹中安裝時，我們必須創建其中的每一個目錄。

note: type: Content of: <book><chapter><section><para>
en: We can also add in other things at the end of the rule, like the installation of additional documentation that the upstream authors sometimes omit:
zh_CN: 我們還可以在末尾添加上其他的內容，比如上游作者有時會省略的附加文件：

note: type: Content of: <book><chapter><section><para>
en: Check carefully, and if everything is okay, ask <command>dquilt</command> to generate the patch to create <filename>debian/patches/install.patch</filename> and add its description:
zh_CN: 仔細檢查後如果沒有問題，使用 <command>dquilt</command> 創建 <filename>debian/patches/install.patch</filename> 補丁文件並添加對它的描述：

note: type: Content of: <book><chapter><section><para>
en: Now you have a series of patches.
zh_CN: 現在你有了一格系列的補丁。

note: type: Content of: <book><chapter><section><orderedlist><listitem><para>
en: Upstream bug fix: <filename>debian/patches/fix-gentoo-target.patch</filename>
zh_CN: 修復上游 Bug：<filename>debian/patches/fix-gentoo-target.patch</filename>

note: type: Content of: <book><chapter><section><orderedlist><listitem><para>
en: Debian specific packaging modification: <filename>debian/patches/install.patch</filename>
zh_CN: Debian 特有的打包修改：<filename>debian/patches/install.patch</filename>

note: type: Content of: <book><chapter><section><para>
en: Whenever you make changes that are not specific to the Debian package such as <filename>debian/patches/fix-gentoo-target.patch</filename>, be sure to send them to the upstream maintainer so they can be included in the next version of the program and be useful to everyone else.  Also remember to avoid making your fixes specific to Debian or Linux &#x2014; or even Unix! Make them portable.  This will make your fixes much easier to apply.
zh_CN: 當進行任何非 Debian 特有的修改時，比如 <filename>debian/patches/fix-gentoo-target.patch</filename>，一定要向上遊作者進行反饋，以便上游作者方便在下一版本中以使更多人受益。同時請記住不要做出特別針對 Debian 或 Linux (甚至是 Unix！)的修改，要使其可以移植，這會使你的修改更容易被接受。

note: type: Content of: <book><chapter><section><para>
en: Note that you don't have to send the <filename>debian/*</filename> files upstream.
zh_CN: 注意你不一定要把 <filename>debian/*</filename> 都提交到上游。

note: type: Content of: <book><chapter><section><title>
en: Differing libraries
zh_CN: 不一樣的函式庫名稱

note: type: Content of: <book><chapter><section><para>
en: There is one other common problem: libraries are often different from platform to platform.  For example, a <filename>Makefile</filename> can contain a reference to a library that doesn't exist on the Debian system.  In that case, we need to change it to a library that does exist in Debian, and serves the same purpose.
zh_CN: 還有另外一個常見的問題：不同平臺之間的庫名稱常常因平臺而異。例如一個 <filename>Makefile</filename> 中可能引了用一個 Debian 系統中不存在的庫。這種情況下我們需要將其修改為 Debian 中存在的、提供完全相同功能的庫。

note: type: Content of: <book><chapter><section><para>
en: Let's assume a line in your program's <filename>Makefile</filename> (or <filename>Makefile.in</filename>) as the following.
zh_CN: 如果你手中程序的 <filename>Makefile</filename>(或 <filename>Makefile.in</filename>)中有如下的行。

note: type: Content of: <book><chapter><section><para><footnote><para>
en: If there are API changes from the <literal>foo</literal> library to the <literal>foo2</literal> library, required changes to the source code need to be made to match the new API.
zh_CN: 如果從 <literal>foo</literal> 庫切換到 <literal>foo2</literal> 庫時要更改應用程序接口（API），這就要求我們修改源代碼來符合新的 API。

note: type: Content of: <book><chapter><section><para>
en: If your program doesn't compile since the <literal>foo</literal> library doesn't exist and its equivalent is provided by the <literal>foo2</literal> library on the Debian system, you can fix this build problem as <filename>debian/patches/foo2.patch</filename> by changing <literal>foo</literal> into <literal>foo2</literal>:<placeholder type="footnote" id="0"/>
zh_CN: 如果你的程序由於 <literal>foo</literal> 庫不存在，而 Debian 系統中的 <literal>foo2</literal> 庫提供了其等效，那麼你可以修復這個構建問題並將修改記錄到 <filename>debian/patches/foo2.patch</filename> 中，只需要將 <literal>foo</literal> 切換到 <literal>foo2</literal>:<placeholder type="footnote" id="0"/>

note: type: Content of: <book><chapter><section><screen>
en: $ dquilt new foo2.patch
    $ dquilt add Makefile
    $ sed -i -e 's/-lfoo/-lfoo2/g' Makefile
    $ dquilt refresh
    $ dquilt header -e
    ... describe patch
zh_CN: $ dquilt new foo2.patch
    $ dquilt add Makefile
    $ sed -i -e 's/-lfoo/-lfoo2/g' Makefile
    $ quilt refresh
    $ quilt header -e
    ... 描述補丁

note: type: Content of: <book><chapter><title>
en: Required files under the <filename>debian</filename> directory
zh_CN: <filename>debian</filename> 目錄中的必須內容

note: type: Content of: <book><chapter><para>
en: In this chapter, files in the <filename>debian</filename> directory are referred to without the leading <filename>debian/</filename> for simplicity whenever the meaning is obvious.
zh_CN: 在本章節中， 只要不產生歧義，所有提及的 <filename>debian</filename> 目錄下的文件均會省去 <filename>debian/</filename> 前綴以求簡潔方便。

note: type: Content of: <book><chapter><para>
en: There is a new subdirectory under the program's source directory, called <filename>debian</filename>.  There are a number of files in this directory that we should edit in order to customize the behavior of the package.  The most important of them are <filename>control</filename>, <filename>changelog</filename>, <filename>copyright</filename>, and <filename>rules</filename>, which are required for all packages.  <placeholder type="footnote" id="0"/>
zh_CN: 在程序源代碼目錄下有一個叫做 <filename>debian</filename> 的新的子目錄。這個目錄中存放着許多文件，我們將要修改這些文件來定製軟件包行爲。其中最重要的文件當屬 <filename>control</filename>, <filename>changelog</filename>, <filename>copyright</filename>, 以及 <filename>rules</filename>, 所有的軟件包都必須有這幾個文件。<placeholder type="footnote" id="0"/>

note: type: Content of: <book><chapter><section><para>
en: This file contains various values which <command>dpkg</command>, <command>dselect</command>, <command>apt-get</command>, <command>apt-cache</command>, <command>aptitude</command>, and other package management tools will use to manage the package.  It is defined by the <ulink url="&policy-control;">Debian Policy Manual, 5 "Control files and their fields"</ulink>.
zh_CN: 這個文件包含了很多供 <command>dpkg</command>、<command>dselect</command>、<command>apt-get</command>、<command>apt-cache</command>、<command>aptitude</command> 等包管理工具進行管理時所使用的許多變量。這些變量均在 <ulink url="&policy-control;">Debian Policy Manual, 5 "Control files and their fields"</ulink> 中被定義。

note: type: Content of: <book><chapter><section><para>
en: Here is the <filename>control</filename> file <command>dh_make</command> created for us:
zh_CN: 這裏的 <filename>control</filename> 文件是 <command>dh_make</command> 命令爲我們創建的：

note: type: Content of: <book><chapter><section><para>
en: (I've added the line numbers.)
zh_CN: (注：我爲它添加了行號。)

note: type: Content of: <book><chapter><section><para>
en: Lines 1&#x2013;7 are the control information for the source package.  Lines 9&#x2013;13 are the control information for the binary package.
zh_CN: 第 1&#x2013;7 行是原始碼包的控制資訊。第 9&#x2013;13 行是二進位制包的控制資訊。

note: type: Content of: <book><chapter><section><para>
en: Line 1 is the name of the source package.
zh_CN: 第 1 行是原始碼套件的名稱。

note: type: Content of: <book><chapter><section><para>
en: Line 2 is the section of the distribution the source package goes into.
zh_CN: 第 2 行是該源碼包要進入發行版中的分類。

note: type: Content of: <book><chapter><section><para><footnote><para>
en: See <ulink url="&policy-subsections;">Debian Policy Manual, 2.4 "Sections"</ulink> and <ulink url="&sections-unstable;">List of sections in <literal>sid</literal></ulink>.
zh_CN: 參見 <ulink url="&policy-subsections;">Debian Policy Manual, 2.4 "Sections"</ulink> 以及 <ulink url="&sections-unstable;">List of sections in <literal>sid</literal></ulink>.

note: type: Content of: <book><chapter><section><para>
en: As you may have noticed, the Debian archive is divided into multiple areas: <literal>main</literal> (the free software), <literal>non-free</literal> (the not really free software) and <literal>contrib</literal> (free software that depends on non-free software).  Each of these is divided into sections that classify packages into rough categories.  So we have <literal>admin</literal> for administrator-only programs, <literal>devel</literal> for programmer tools, <literal>doc</literal> for documentation, <literal>libs</literal> for libraries, <literal>mail</literal> for email readers and daemons, <literal>net</literal> for network apps and daemons, <literal>x11</literal> for X11 programs that don't fit anywhere else, and many more.  <placeholder type="footnote" id="0"/>
zh_CN: 你可能已經注意到，Debian 倉庫被分爲幾個類別：<literal>main</literal> (自由軟件)、<literal>non-free</literal> (非自由軟件)以及 <literal>contrib</literal> (依賴於非自由軟件的自由軟件)。在這些大的分類之下還有多個邏輯上的子分類，用以簡短描述軟件包的用途類別。<literal>admin</literal> 爲供系統管理員使用的程序，<literal>devel</literal> 爲開發工具，<literal>doc</literal> 爲文檔，<literal>libs</literal> 爲庫，<literal>mail</literal> 爲電子郵件閱讀器或郵件系統守護程序，<literal>net</literal> 爲網絡應用程序或網絡服務守護進程，<literal>x11</literal> 爲不屬於其他分類的爲 X11 程序，此外還有很多很多。<placeholder type="footnote" id="0"/>

note: type: Content of: <book><chapter><section><para>
en: Let's change it then to x11.  (A <literal>main/</literal> prefix is implied so we can omit it.)
zh_CN: 我們將本例設置爲 x11。( <literal>main/</literal> 前綴是默認值，可以省略。)

note: type: Content of: <book><chapter><section><para><footnote><para>
en: See <ulink url="&policy-priorities;">Debian Policy Manual, 2.5 "Priorities"</ulink>.
zh_CN: 參見 <ulink url="&policy-priorities;">Debian Policy Manual, 2.5 "Priorities"</ulink>。

note: type: Content of: <book><chapter><section><para>
en: Line 3 describes how important it is that the user installs this package.  <placeholder type="footnote" id="0"/>
zh_CN: 第 3 行描述了用戶安裝此軟件包的優先級。<placeholder type="footnote" id="0"/>

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: The <literal>optional</literal> priority will usually work for new packages that do not conflict with others claiming <literal>required</literal>, <literal>important</literal>, or <literal>standard</literal> priority.
zh_CN: <literal>optional</literal> 優先級適用於與優先級爲 <literal>required</literal>、<literal>important</literal> 或 <literal>standard</literal> 的軟件包不衝突的新軟件包。

note: type: Content of: <book><chapter><section><para>
en: Section and priority are used by front-ends like <command>aptitude</command> when they sort packages and select defaults.  Once you upload the package to Debian, the value of these two fields can be overridden by the archive maintainers, in which case you will be notified by email.
zh_CN: Section 和 Priority 常被如 <command>aptitude</command> 的前端所使用，以分類軟件包並選擇默認值。一旦你把軟件包上傳到 Debian，這兩項的值可以被倉庫維護人員修改，此時你將收到提示郵件。

note: type: Content of: <book><chapter><section><para>
en: As this is a normal priority package and doesn't conflict with anything else, we will change the priority to <literal>optional</literal>.
zh_CN: 由於這是一個常規優先級的軟體，並不與其他套件衝突，我們將優先級改爲 <literal>optional</literal>。

note: type: Content of: <book><chapter><section><para>
en: Line 4 is the name and email address of the maintainer.  Make sure that this field includes a valid <literal>To</literal> header for email, because after you upload it, the bug tracking system will use it to deliver bug emails to you.  Avoid using commas, ampersands, or parentheses.
zh_CN: 第 4 行是維護者的姓名和電子郵件地址。請確保此處的值可以直接用於電子郵件頭的 <literal>To</literal> 項。因爲一旦你將軟件包上傳至倉庫，Bug 跟蹤系統將使用它向你發送可能的 Bug 報告郵件。請避免使用逗號、“&amp;”符號或括號。

note: type: Content of: <book><chapter><section><para><footnote><para>
en: See <ulink url="&policy-relationships;#s-sourcebinarydeps">Debian Policy Manual, 7.7 "Relationships between source and binary packages - Build-Depends, Build-Depends-Indep, Build-Conflicts, Build-Conflicts-Indep"</ulink>.
zh_CN: 參見 <ulink url="&policy-relationships;#s-sourcebinarydeps">Debian Policy Manual, 7.7 "Relationships between source and binary packages - Build-Depends, Build-Depends-Indep, Build-Conflicts, Build-Conflicts-Indep"</ulink>。

note: type: Content of: <book><chapter><section><para>
en: Line 5 includes the list of packages required to build your package as the <literal>Build-Depends</literal> field.  You can also have the <literal>Build-Depends-Indep</literal> field as an additional line here.  <placeholder type="footnote" id="0"/> Some packages like <systemitem role="package">gcc</systemitem> and <systemitem role="package">make</systemitem> which are required by the <systemitem role="package">build-essential</systemitem> package are implied.  If you need to have other tools to build your package, you should add them to these fields.  Multiple entries are separated with commas; read on for the explanation of binary package dependencies to find out more about the syntax of these lines.
zh_CN: 第 5 行中的 <literal>Build-Depends</literal> 項列出了編譯此軟體包需要的軟體包。你還可以在這裡新增一行 <literal>Build-Depends-Indep</literal> 作為附加。<placeholder type="footnote" id="0"/> 有些被 <systemitem role="package">build-essential</systemitem> 依賴的軟體包，如 <systemitem role="package">gcc</systemitem> 和 <systemitem role="package">make</systemitem> 等，已經會被預設安裝而不需再寫到此處。如果你需要其他工具來編譯這個軟體包，請將它們加到這裡。多個軟體包應使用半形逗號分隔。繼續閱讀二進位制包依賴關係以增進對這些行的語法的理解。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: For all packages packaged with the <command>dh</command> command in the <filename>debian/rules</filename> file, you must have <literal>debhelper (&gt;=9)</literal> in the <literal>Build-Depends</literal> field to satisfy the Debian Policy requirement for the <literal>clean</literal> target.
zh_CN: 對於所有在 <filename>debian/rules</filename> 文件中使用 <command>dh</command> 命令打包的軟件包，必須在 <literal>Build-Depends</literal> 中包含 <literal>debhelper (&gt;=9)</literal> 以滿足 Debian Policy 中對 <literal>clean</literal> target 的要求。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: Source packages which have binary packages with <literal>Architecture: any</literal> are rebuilt by the autobuilder.  Since this autobuilder procedure installs only the packages listed in the <literal>Build-Depends</literal> field before running <literal>debian/rules build</literal> (see <xref linkend="autobuilder"/>), the <literal>Build-Depends</literal> field needs to list practically all the required packages, and <literal>Build-Depends-Indep</literal> is rarely used.
zh_CN: 對於生成有標記過 <literal>Architecture: any</literal> 的二進位制包的原始碼包，它們將被 autobuilder 重構建。因為 autobuilder 過程在僅安裝 <literal>Build-Depends</literal> 中列出的程式前便執行 <literal>debian/rules build</literal> 中的內容(參看 <xref linkend="autobuilder"/>)，<literal>Build-Depends</literal> 欄位需要列出所有必須的編譯依賴，而 <literal>Build-Depends-Indep</literal> 則很少使用。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: For source packages with binary packages all of which are <literal>Architecture: all</literal>, the <literal>Build-Depends-Indep</literal> field may list all the required packages unless they are already listed in the <literal>Build-Depends</literal> field to satisfy the Debian Policy requirement for the <literal>clean</literal> target.
zh_CN: 對於生成全標記 <literal>Architecture: all</literal> 二進制包的源碼包，<literal>Build-Depends-Indep</literal> 中應列出所有要求的軟件包，除非  <literal>Build-Depends</literal> 中已經列出，這樣以便滿足Debian Policy 中對 <literal>clean</literal> target 的要求。

note: type: Content of: <book><chapter><section><para><footnote><para>
en: This somewhat strange situation is a feature well documented in the <ulink url="&policy-build-depends-indep;">Debian Policy Manual, Footnotes 55</ulink>.  This is not due to the use of the <command>dh</command> command in the <filename>debian/rules</filename> file but due to how the <command>dpkg-buildpackage</command> works.  The same situation applies to the <ulink url="https://bugs.launchpad.net/launchpad-buildd/+bug/238141">auto build system for Ubuntu</ulink>.
zh_CN: 這種奇怪的情況是 <ulink url="&policy-build-depends-indep;">Debian Policy Manual, Footnotes 55</ulink> 中詳細描述的一種特性。這不是由於在 <filename>debian/rules</filename> 中使用 <command>dh</command> 命令所致的，真正的原因是 <command>dpkg-buildpackage</command> 的運行方式。相同的情形也適用於 <ulink url="https://bugs.launchpad.net/launchpad-buildd/+bug/238141">Ubuntu 的自動編譯系統</ulink>。

note: type: Content of: <book><chapter><section><para>
en: If you are not sure which one should be used, use the <literal>Build-Depends</literal> field to be on the safe side.  <placeholder type="footnote" id="0"/>
zh_CN: 如果你不知道應該使用哪一個，則使用 <literal>Build-Depends</literal> 以保證安全。<placeholder type="footnote" id="0"/>

note: type: Content of: <book><chapter><section><para>
en: To find out what packages your package needs to be built run the command:
zh_CN: 要找出編譯你的軟體所需的套件可以使用這個命令：

note: type: Content of: <book><chapter><section><para>
en: To manually find exact build dependencies for <command><replaceable>/usr/bin/foo</replaceable></command>, execute
zh_CN: 要手工地找到 <command><replaceable>/usr/bin/foo</replaceable></command> 的編譯依賴，可以執行

note: type: Content of: <book><chapter><section><para>
en: and for each library listed (e.g., <command>libfoo.so.6</command>), execute
zh_CN: 對於列出的每個庫（例如 <command>libfoo.so.6</command>），執行

note: type: Content of: <book><chapter><section><para>
en: Then just take the <literal>-dev</literal> version of every package as a <literal>Build-Depends</literal> entry.  If you use <command>ldd</command> for this purpose, it will report indirect lib dependencies as well, resulting in the problem of excessive build dependencies.
zh_CN: 接下來直接將相應的 <literal>-dev</literal> 版本的軟件包名稱放到 <literal>Build-Depends</literal> 項內。如果你使用 <command>ldd</command>，它也會報告出間接的庫依賴關係，這可能造成填寫依賴時畫蛇添足。

note: type: Content of: <book><chapter><section><para>
en: <systemitem role="package">gentoo</systemitem> also happens to require <systemitem role="package">xlibs-dev</systemitem>, <systemitem role="package">libgtk1.2-dev</systemitem> and <systemitem role="package">libglib1.2-dev</systemitem> to build, so we'll add them here next to <systemitem role="package">debhelper</systemitem>.
zh_CN: <systemitem role="package">gentoo</systemitem> 需要 <systemitem role="package">xlibs-dev</systemitem>、<systemitem role="package">libgtk1.2-dev</systemitem> 和 <systemitem role="package">libglib1.2-dev</systemitem> 才能編譯，所以我們將這些套件加在 <systemitem role="package">debhelper</systemitem> 之後。

note: type: Content of: <book><chapter><section><para>
en: Line 6 is the version of the <ulink url="&debian-policy;">Debian Policy Manual</ulink> standards this package follows, the one you read while making your package.
zh_CN: 第 6 行是此套件所依據的 <ulink url="&debian-policy;">Debian Policy Manual</ulink> 標準版本號。

note: type: Content of: <book><chapter><section><para>
en: On line 7 you can put the URL of the software's upstream homepage.
zh_CN: 在第 7 行你可以放置上游項目首頁的URL。

note: type: Content of: <book><chapter><section><para>
en: Line 9 is the name of the binary package.  This is usually the same as the name of the source package, but it doesn't necessarily have to be that way.
zh_CN: 第 9 行是二進位套件的名稱。通常情況下與原始碼套件相同，但不是必須的。

note: type: Content of: <book><chapter><section><para><footnote><para>
en: See <ulink url="&policy-architecture;">Debian Policy Manual, 5.6.8 "Architecture"</ulink> for exact details.
zh_CN: 確切信息請參見 <ulink url="&policy-architecture;">Debian Policy Manual, 5.6.8 "Architecture"</ulink>。

note: type: Content of: <book><chapter><section><para>
en: Line 10 describes the architectures the binary package can be compiled for.  This value is usually one of the following depending on the type of the binary package: <placeholder type="footnote" id="0"/>
zh_CN: 第 10 行描述了可以編譯本二進制包的體繫結構。根據二進制包的類型，這個值常常是下列中的一個： <placeholder type="footnote" id="0"/>

note: type: Content of: <book><chapter><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: The generated binary package is an architecture dependent one usually in a compiled language.
zh_CN: 一般而言，包含 編譯型語言編寫的程序 生成的二進制包依賴於具體的體繫結構。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: The generated binary package is an architecture independent one usually consisting of text, images, or scripts in an interpreted language.
zh_CN: 一般而言，包含 文本、圖像、或解釋型語言腳本 生成的二進制包獨立於體繫結構。

note: type: Content of: <book><chapter><section><para>
en: We leave line 10 as is since this is written in C.  <citerefentry><refentrytitle>dpkg-gencontrol</refentrytitle><manvolnum>1</manvolnum></citerefentry> will fill in the appropriate architecture value for any machine this source package gets compiled on.
zh_CN: 我們不管第 10 行，鑑於本程序是用 C 語言編寫的。 <citerefentry> <refentrytitle>dpkg-gencontrol</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> 命令將根據這個軟件包可以編譯的平臺 而爲此處填寫合適的信息。

note: type: Content of: <book><chapter><section><para>
en: If your package is architecture independent (for example, a shell or Perl script, or a document), change this to <literal>all</literal>, and read later in <xref linkend="rules"/> about using the <literal>binary-indep</literal> rule instead of <literal>binary-arch</literal> for building the package.
zh_CN: 如果你的套件是平臺獨立的(例如一個 shell 或 Perl 腳本，或一些文件)，將這項改變爲 <literal>all</literal>，然後繼續閱讀 <xref linkend="rules"/> 中關於使用 <literal>binary-indep</literal> 指令替代 <literal>binary-arch</literal> 來編譯套件的內容。

note: type: Content of: <book><chapter><section><para>
en: Line 11 shows one of the most powerful features of the Debian packaging system.  Packages can relate to each other in various ways.  Apart from <literal>Depends</literal>, other relationship fields are <literal>Recommends</literal>, <literal>Suggests</literal>, <literal>Pre-Depends</literal>, <literal>Breaks</literal>, <literal>Conflicts</literal>, <literal>Provides</literal>, and <literal>Replaces</literal>.
zh_CN: 第 11 行顯示了 Debian 套件系統中最強大的特性之一。每個套件都可以和其他套件有各種不同的關係。除 <literal>Depends</literal> 外，還有 <literal>Recommends</literal>、<literal>Suggests</literal>、<literal>Pre-Depends</literal>、<literal>Breaks</literal>、<literal>Conflicts</literal>、<literal>Provides</literal> 和 <literal>Replaces</literal>。

note: type: Content of: <book><chapter><section><para>
en: The package management tools usually behave the same way when dealing with these relations; if not, it will be explained.  (See <citerefentry> <refentrytitle>dpkg</refentrytitle> <manvolnum>8</manvolnum> </citerefentry>, <citerefentry> <refentrytitle>dselect</refentrytitle> <manvolnum>8</manvolnum> </citerefentry>, <citerefentry> <refentrytitle>apt</refentrytitle> <manvolnum>8</manvolnum> </citerefentry>, <citerefentry> <refentrytitle>aptitude</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>, etc.)
zh_CN: 軟件包管理工具通常對這些關係採取相同的操作；如果有例外，本教程將會詳細解釋。(參看 <citerefentry> <refentrytitle>dpkg</refentrytitle> <manvolnum>8</manvolnum> </citerefentry>、<citerefentry> <refentrytitle>dselect</refentrytitle> <manvolnum>8</manvolnum> </citerefentry>、<citerefentry> <refentrytitle>apt</refentrytitle> <manvolnum>8</manvolnum> </citerefentry>、<citerefentry> <refentrytitle>aptitude</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> 等。)

note: type: Content of: <book><chapter><section><para><footnote><para>
en: See <ulink url="&policy-relationships;">Debian Policy Manual, 7 "Declaring relationships between packages"</ulink>.
zh_CN: 參見 <ulink url="&policy-relationships;">Debian Policy Manual, 7 "Declaring relationships between packages"</ulink>。

note: type: Content of: <book><chapter><section><para>
en: Here is a simplified description of package relationships: <placeholder type="footnote" id="0"/>
zh_CN: 這裏有一篇關於軟件包關係的簡述： <placeholder type="footnote" id="0"/>

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: The package will not be installed unless the packages it depends on are installed.  Use this if your program absolutely will not run (or will cause severe breakage) unless a particular package is present.
zh_CN: 此套件僅當它依賴的套件均已安裝後纔可以安裝。此處寫明你的程式所必須的套件。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: Use this for packages that are not strictly necessary but are typically used with your program.  When a user installs your program, all front-ends will probably prompt them to install the recommended packages.  <command>aptitude</command> and <command>apt-get</command> install recommended packages along with your package by default (but the user can disable this behavior).  <command>dpkg</command> will ignore this field.
zh_CN: 這項中的軟件包不是嚴格意義上必須安裝纔可以保證程序運行。當用戶安裝軟件包時，所有前端工具都會詢問是否要安裝這些推薦的軟件包。<command>aptitude</command> 和 <command>apt-get</command> 會在安裝你的軟件包的時候自動安裝推薦的軟件包(用戶可以禁用這個默認行爲)。<command>dpkg</command> 則會忽略此項。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: Use this for packages which will work nicely with your program but are not at all necessary.  When a user installs your program, they will probably not be prompted to install suggested packages.  <command>aptitude</command> can be configured to install suggested packages along with your package but this is not its default.  <command>dpkg</command> and <command>apt-get</command> will ignore this field.
zh_CN: 此項中的軟件包可以和本程序更好地協同工作，但不是必須的。當用戶安裝程序時，所有的前端程序可能不會詢問是否安裝建議的軟件包。<command>aptitude</command> 可以被配置爲安裝軟件時自動安裝建議的軟件包，但這不是默認。<command>dpkg</command> 和 <command>apt-get</command> 將忽略此項。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: This is stronger than <literal>Depends</literal>.  The package will not be installed unless the packages it pre-depends on are installed and <emphasis>correctly configured</emphasis>.  Use this <emphasis>very</emphasis> sparingly and only after discussing it on the <ulink url="&debian-devel-ldo;">debian-devel@lists.debian.org</ulink> mailing list.  Read: don't use it at all.  :-)
zh_CN: 此項中的依賴強於 <literal>Depends</literal> 項。套件僅在預依賴的套件已經安裝後纔可以正常安裝並且 <emphasis>正確設定</emphasis> 後纔可以正常安裝。在使用此項時應 <emphasis>非常慎重</emphasis>，僅當在 <ulink url="&debian-devel-ldo;">debian-devel@lists.debian.org</ulink> 郵件列表討論後才能使用。記住：根本就不要用這項。 :-)

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: The package will not be installed until all the packages it conflicts with have been removed.  Use this if your program absolutely will not run or will cause severe problems if a particular package is present.
zh_CN: 僅當所有衝突的套件都已經刪除後此套件纔可以安裝。當程式在某些特定套件存在時根本無法運行或存在嚴重問題時使用此項。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: When installed the package will break all the listed packages.  Normally a <literal>Breaks</literal> entry specifies that it applies to versions earlier than a certain value.  The resolution is generally to use higher-level package management tools to upgrade the listed packages.
zh_CN: 此軟件包安裝後列出的軟件包將會受到損壞。通常 <literal>Breaks</literal> 要附帶一個“版本號小於多少”的說明。這樣，軟件包管理工具將會選擇升級被損壞的特定版本的軟件包作爲解決方案。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: For some types of packages where there are multiple alternatives, virtual names have been defined.  You can get the full list in the <ulink url="&virtual-package;">virtual-package-names-list.txt.gz</ulink> file.  Use this if your program provides a function of an existing virtual package.
zh_CN: 某些型別的軟體包會定義有多個備用的虛擬名稱。你可以在 <ulink url="&virtual-package;">virtual-package-names-list.txt.gz</ulink>檔案中找到完整的列表。如果你的程式提供了某個已存在的虛擬軟體包的功能則使用此項。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: Use this when your program replaces files from another package, or completely replaces another package (used in conjunction with <literal>Conflicts</literal>).  Files from the named packages will be overwritten with the files from your package.
zh_CN: 當你的程式要替換其他套件的某些檔案，或是完整地替換另一個套件(與 <literal>Conflicts</literal> 一起使用)。列出的套件中的某些檔案會被你的套件所覆蓋。

note: type: Content of: <book><chapter><section><para>
en: All these fields have uniform syntax.  They are a list of package names separated by commas.  These package names may also be lists of alternative package names, separated by vertical bar symbols <literal>|</literal> (pipe symbols).
zh_CN: 所有的這些項都使用相同的語法。它們是一個套件列表，套件名稱間使用半形逗號分隔。也可以寫出有多個可選的套件名稱，這些套件使用 <literal>|</literal> 符號分隔。

note: type: Content of: <book><chapter><section><para>
en: The fields may restrict their applicability to particular versions of each named package.  The restriction of each individual package is listed in parentheses after its name, and should contain a relation from the list below followed by a version number value.  The relations allowed are: <literal>&lt;&lt;</literal>, <literal>&lt;=</literal>, <literal>=</literal>, <literal>&gt;=</literal>, and <literal>&gt;&gt;</literal> for strictly lower, lower or equal, exactly equal, greater or equal, and strictly greater, respectively.  For example,
zh_CN: 這些項內還可以限定與某些軟件包的某個版本區間之間的關係。版本號限定在括號內，這緊隨軟件包名稱之後，並在以下邏輯符號後寫清具體版本：<literal>&lt;&lt;</literal>、<literal>&lt;=</literal>、<literal>=</literal>、<literal>&gt;=</literal> 和 <literal>&gt;&gt;</literal>，分別代表嚴格小於、小於或等於、嚴格等於、大於或等於以及嚴格大於。例如，

note: type: Content of: <book><chapter><section><para>
en: The last feature you need to know about is <literal>${shlibs:Depends}</literal>, <literal>${perl:Depends}</literal>, <literal>${misc:Depends}</literal>, etc.
zh_CN: 最後一個需要瞭解的特性是 <literal>${shlibs:Depends}</literal>, <literal>${perl:Depends}</literal>, <literal>${misc:Depends}</literal>, 之類。

note: type: Content of: <book><chapter><section><para>
en: <citerefentry> <refentrytitle>dh_shlibdeps</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> calculates shared library dependencies for binary packages.  It generates a list of <ulink url="&elf;">ELF</ulink> executables and shared libraries it has found for each binary package.  This list is used for substituting <literal>${shlibs:Depends}</literal>.
zh_CN: <citerefentry> <refentrytitle>dh_shlibdeps</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> 會爲二進制包計算共享庫依賴關係。它會爲每個二進制包生成一份 <ulink url="&elf;">ELF</ulink> 可執行文件和共享庫列表。 這個列表用於替換 <literal>${shlibs:Depends}</literal>。

note: type: Content of: <book><chapter><section><para>
en: <citerefentry> <refentrytitle>dh_perl</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> calculates Perl dependencies.  It generates a list of a dependencies on <literal>perl</literal> or <literal>perlapi</literal> for each binary package.  This list is used for substituting <literal>${perl:Depends}</literal>.
zh_CN: <citerefentry> <refentrytitle>dh_perl</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> 會計算 Perl 依賴。它會爲每個二進制包生成一個叫作 <literal>perl</literal> 或 <literal>perlapi</literal> 的依賴列表。這個列表用於替換 <literal>${perl:Depends}</literal>。

note: type: Content of: <book><chapter><section><para>
en: Some <systemitem role="package">debhelper</systemitem> commands may cause the generated package to depend on some additional packages.  All such commands generate a list of required packages for each binary package.  This list is used for substituting <literal>${misc:Depends}</literal>.
zh_CN: 一些 <systemitem role="package">debhelper</systemitem> 命令可能會使生成的軟件包需要依賴於某些其他的軟件包。所有這些命令將會爲每一個二進制包生成一個列表。這些列表將用於替換 <literal>${misc:Depends}</literal> 。

note: type: Content of: <book><chapter><section><para>
en: <citerefentry> <refentrytitle>dh_gencontrol</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> generates <filename>DEBIAN/control</filename> for each binary package while substituting <literal>${shlibs:Depends}</literal>, <literal>${perl:Depends}</literal>, <literal>${misc:Depends}</literal>, etc.
zh_CN: <citerefentry> <refentrytitle>dh_gencontrol</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> 會爲每個二進制包生成 <filename>DEBIAN/control</filename> 當替換 <literal>${shlibs:Depends}</literal>, <literal>${perl:Depends}</literal>, <literal>${misc:Depends}</literal>, 之類的時候。

note: type: Content of: <book><chapter><section><para>
en: Having said all that, we can leave the <literal>Depends</literal> field exactly as it is now, and insert another line after it saying <literal>Suggests: file</literal>, because <systemitem role="package">gentoo</systemitem> can use some features provided by the <systemitem role="package">file</systemitem> package.
zh_CN: 說過這些以後，我們可以讓 <literal>Depends</literal> 項保持現狀，並在其下插入一行 <literal>Suggests: file</literal>，因爲 <systemitem role="package">gentoo</systemitem> 可以使用 <systemitem role="package">file</systemitem> 軟件包提供的某些特性。

note: type: Content of: <book><chapter><section><para>
en: Line 9 is the Homepage URL.  Let's assume this to be at <ulink url="&gentoo;"/>.
zh_CN: 第 9 行是主頁的URL。我們假設它是 <ulink url="&gentoo;"/>。

note: type: Content of: <book><chapter><section><para>
en: Line 12 is the short description.  Terminals are conventionally 80 columns wide so this shouldn't be longer than about 60 characters.  I'll change it to <literal>fully GUI-configurable, two-pane X file manager</literal>.
zh_CN: 第 12 行是簡述。絕大多數人的屏幕是 80 列寬，所以描述不應超過 60 個字符。在這個例子裏我把它寫爲 <literal>fully GUI-configurable, two-pane X file manager</literal>。

note: type: Content of: <book><chapter><section><para><footnote><para>
en: These descriptions are in English.  Translations of these descriptions are provided by <ulink url="&ddtp;">The Debian Description Translation Project - DDTP</ulink>.
zh_CN: 這些描述都使用英語。相應的翻譯由 <ulink url="&ddtp;">The Debian Description Translation Project - DDTP</ulink> （Debian 描述翻譯項目）項目提供。

note: type: Content of: <book><chapter><section><para>
en: Line 13 is where the long description goes.  This should be a paragraph which gives more details about the package.  Column 1 of each line should be empty.  There must be no blank lines, but you can put a single <literal>.</literal> (dot) in a column to simulate that.  Also, there must be no more than one blank line after the long description. <placeholder type="footnote" id="0"/>
zh_CN: 第 13 行是長描述開始的地方。這應當是一段更詳細地描述軟件包的話。每行的第一個格應當留空。描述中不應存在空行，如果必須使用空行，則在行中僅放置一個 <literal>.</literal> (半角句點)來近似。同時，長描述後也不應有超過一行的空白。<placeholder type="footnote" id="0"/>

note: type: Content of: <book><chapter><section><para><footnote><para>
en: See <ulink url="&devref-bpp-vcs;">Debian Developer's Reference, 6.2.5. "Version Control System location"</ulink>.
zh_CN: 參見 <ulink url="&devref-bpp-vcs;">Debian Developer's Reference, 6.2.5. "Version Control System location"</ulink>。

note: type: Content of: <book><chapter><section><para>
en: We can insert <literal>Vcs-*</literal> fields to document the Version Control System (VCS) location between lines 6 and 7.  <placeholder type="footnote" id="0"/> Let's assume that the <systemitem role="package">gentoo</systemitem> package has its VCS located in the Debian Alioth Git Service at <literal>git://git.debian.org/git/collab-maint/gentoo.git</literal>.
zh_CN: 接下來我們在第 6 和第 7 行之間添加版本控制系統位置 <literal>Vcs-*</literal> 項。<placeholder type="footnote" id="0"/> 這裏我們假設 <systemitem role="package">gentoo</systemitem> 軟件包的VCS 處於 Debian Alioth Git 服務的 <literal>git://git.debian.org/git/collab-maint/gentoo.git</literal>

note: type: Content of: <book><chapter><section><para>
en: Finally, here is the updated <filename>control</filename> file:
zh_CN: 到此爲止，我們做好了 <filename>control</filename> 檔案：

note: type: Content of: <book><chapter><section><screen>
en:  1 Source: gentoo
     2 Section: x11
     3 Priority: optional
     4 Maintainer: Josip Rodin &lt;joy-mg@debian.org&gt;
     5 Build-Depends: debhelper (&gt;=10), xlibs-dev, libgtk1.2-dev, libglib1.2-dev
     6 Standards-Version: 4.0.0
     7 Vcs-Git: https://anonscm.debian.org/git/collab-maint/gentoo.git
     8 Vcs-browser: https://anonscm.debian.org/git/collab-maint/gentoo.git
     9 Homepage: &gentoo;
    10
    11 Package: gentoo
    12 Architecture: any
    13 Depends: ${shlibs:Depends}, ${misc:Depends}
    14 Suggests: file
    15 Description: fully GUI-configurable, two-pane X file manager
    16  gentoo is a two-pane file manager for the X Window System. gentoo lets the
    17  user do (almost) all of the configuration and customizing from within the
    18  program itself. If you still prefer to hand-edit configuration files,
    19  they're fairly easy to work with since they are written in an XML format.
    20  .
    21  gentoo features a fairly complex and powerful file identification system,
    22  coupled to an object-oriented style system, which together give you a lot
    23  of control over how files of different types are displayed and acted upon.
    24  Additionally, over a hundred pixmap images are available for use in file
    25  type descriptions.
    26  .
    29  gentoo was written from scratch in ANSI C, and it utilizes the GTK+ toolkit
    30  for its interface.
zh_CN:  1 Source: gentoo
     2 Section: x11
     3 Priority: optional
     4 Maintainer: Josip Rodin &lt;joy-mg@debian.org&gt;
     5 Build-Depends: debhelper (&gt;=10), xlibs-dev, libgtk1.2-dev, libglib1.2-dev
     6 Standards-Version: 3.9.4
     7 Vcs-Git: https://anonscm.debian.org/git/collab-maint/gentoo.git
     8 Vcs-browser: https://anonscm.debian.org/git/collab-maint/gentoo.git
     9 Homepage: &gentoo;
    10
    11 Package: gentoo
    12 Architecture: any
    13 Depends: ${shlibs:Depends}, ${misc:Depends}
    14 Suggests: file
    15 Description: fully GUI-configurable, two-pane X file manager
    16  gentoo is a two-pane file manager for the X Window System. gentoo lets the
    17  user do (almost) all of the configuration and customizing from within the
    18  program itself. If you still prefer to hand-edit configuration files,
    19  they're fairly easy to work with since they are written in an XML format.
    20  .
    21  gentoo features a fairly complex and powerful file identification system,
    22  coupled to an object-oriented style system, which together give you a lot
    23  of control over how files of different types are displayed and acted upon.
    24  Additionally, over a hundred pixmap images are available for use in file
    25  type descriptions.
    26  .
    29  gentoo was written from scratch in ANSI C, and it utilizes the GTK+ toolkit
    30  for its interface.

note: type: Content of: <book><chapter><section><para>
en: This file contains information about the copyright and license of the upstream sources.  <ulink url="&policy-copyright;">Debian Policy Manual, 12.5 "Copyright information"</ulink> dictates its content and <ulink url="&dep5;">DEP-5: Machine-parseable <filename>debian/copyright</filename></ulink> provides guidelines for its format.
zh_CN: 這個文件包含了上游軟件的版權以及許可證信息。<ulink url="&policy-copyright;">Debian Policy Manual, 12.5 "Copyright information"</ulink> 掌控着它的內容，另外 <ulink url="&dep5;">DEP-5: Machine-parseable <filename>debian/copyright</filename></ulink> 提供了關於其格式的方針。

note: type: Content of: <book><chapter><section><para>
en: <command>dh_make</command> can give you a template <filename>copyright</filename> file.  Let's use the <literal>--copyright gpl2</literal> option here to get a template file for the <systemitem role="package">gentoo</systemitem> package released under GPL-2.
zh_CN: <command>dh_make</command> 可以給出一個 <filename>copyright</filename> 檔案的模板。在這裏我們使用 <literal>--copyright gpl2</literal> 參數來獲得一個模板寫明 <systemitem role="package">gentoo</systemitem> 套件是發佈於 GPL-2 許可證下。

note: type: Content of: <book><chapter><section><para>
en: You must fill in missing information to complete this file, such as the place you got the package from, the actual copyright notice, and the license.  For certain common free software licenses (GNU GPL-1, GNU GPL-2, GNU GPL-3, LGPL-2, LGPL-2.1, LGPL-3, GNU FDL-1.2, GNU FDL-1.3, Apache-2.0, 3-Clause BSD, CC0-1.0, MPL-1.1, MPL-2.0 or the Artistic license), you can just refer to the appropriate file in the <filename>/usr/share/common-licenses/</filename> directory that exists on every Debian system.  Otherwise, you must include the complete license.
zh_CN: 你必須填寫上空缺的資訊，如你從何處獲得此軟體，實際的版權宣告和它們的許可證。對於常見的自由軟體許可證，如 GNU GPL-1、GNU GPL-2、GNU GPL-3、LGPL-2、LGPL-2.1、LGPL-3、GNU FDL-1.2、GNU FDL-1.3、Apache-2.0、3-Clause BSD、CC0-1.0、MPL-1.1、MPL-2.0 或 Artistic 許可證，你可以直接將其指向所有 Debian 系統都有的 <filename>/usr/share/common-licenses/</filename> 目錄下的檔案。否則，許可證則必須包含完整的許可證文字。

note: type: Content of: <book><chapter><section><para>
en: In short, here's what <systemitem role="package">gentoo</systemitem>'s <filename>copyright</filename> file should look like:
zh_CN: 簡言之，<systemitem role="package">gentoo</systemitem> 的 <filename>copyright</filename> 文件如下所示：

note: type: Content of: <book><chapter><section><para>
en: Please follow the HOWTO provided by the ftpmasters and sent to debian-devel-announce: <ulink url="&howto-copyright;"/>.
zh_CN: 另外還可以參看 ftpmasters 發送到 debian-devel-announce 的 HOWTO： announce: <ulink url="&howto-copyright;"/>.

note: type: Content of: <book><chapter><section><para>
en: This is a required file, which has a special format described in <ulink url="&policy-dpkgchangelog;">Debian Policy Manual, 4.4 "debian/changelog"</ulink>.  This format is used by <command>dpkg</command> and other programs to obtain the version number, revision, distribution, and urgency of your package.
zh_CN: 這是一個必須的文件，它的特殊格式在 <ulink url="&policy-dpkgchangelog;">Debian Policy Manual, 4.4 "debian/changelog"</ulink> 中有詳細的描述。這種格式被 <command>dpkg</command> 和其他程序用以解析版本號信息、適用的發行版和緊急程度。

note: type: Content of: <book><chapter><section><para>
en: For you, it is also important, since it is good to have documented all changes you have done.  It will help people downloading your package to see whether there are issues with the package that they should know about.  It will be saved as <filename>/usr/share/doc/gentoo/changelog.Debian.gz</filename> in the binary package.
zh_CN: 對於你而言，詳細描述你所做出的更改也是很好且很重要的。它將幫助下載你的套件的人瞭解這個套件中是否有他們需要知道的事情。它會被作爲 <filename>/usr/share/doc/gentoo/changelog.Debian.gz</filename> 保存在二進位套件中。

note: type: Content of: <book><chapter><section><para>
en: <command>dh_make</command> created a default one, and this is what it looks like:
zh_CN: <command>dh_make</command> 創建了一個默認的文件，這是它的容貌：

note: type: Content of: <book><chapter><section><para>
en: Line 1 is the package name, version, distribution, and urgency.  The name must match the source package name; distribution should be <literal>unstable</literal>, and urgency should be set to medium unless there is any particular reason for other values.
zh_CN: 第 1 行是軟體包名、版本號、發行版和緊急程度。軟體包名必須與實際的原始碼包名相同，發行版應該是 <literal>unstable</literal>。除非有特殊原因，緊急程度預設設定為 medium（中等）。

note: type: Content of: <book><chapter><section><para>
en: Lines 3-5 are a log entry, where you document changes made in this package revision (not the upstream changes &#x2014; there is a special file for that purpose, created by the upstream authors, which you will later install as <filename>/usr/share/doc/gentoo/changelog.gz</filename>).  Let's assume your ITP (Intent To Package) bug report number was <literal>12345</literal>.  New lines must be inserted just below the uppermost line that begins with <literal>*</literal> (asterisk).  You can do it with <citerefentry> <refentrytitle>dch</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>.  You can edit this manually with a text editor as long as you follow the formatting convention used by the <citerefentry> <refentrytitle>dch</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>.
zh_CN: 第 3-5 行是一個很長的條目，記錄了你在這個 Debian 修訂版本中做出的修改(非上游修改——上游修改由上游作者建立並由另外一個檔案維護，它們應被安裝為 <filename>/usr/share/doc/gentoo/changelog.gz</filename>)。假設你的 ITP (Intent To Package，計劃打包)的 Bug 號為 <literal>12345</literal>。新行必須插入在上一個以星號 <literal>*</literal> 開頭的行的正下方。你可以使用 <citerefentry> <refentrytitle>dch</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> 完成這個工作，也可以使用普通的文字編輯器手工完成，只要你遵循 <citerefentry> <refentrytitle>dch</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> 所使用的格式。

note: type: Content of: <book><chapter><section><para>
en: In order to prevent a package being accidentally uploaded before completing the package, it is a good idea to change the distribution value to an invalid distribution value of <literal>UNRELEASED</literal>.
zh_CN: 為了阻止軟體包在打包完成之前被意外上傳，將發行版值改成一個不可用的 <literal>UNRELEASED</literal> 將是一個很好的選擇。

note: type: Content of: <book><chapter><section><para>
en: You will end up with something like this:
zh_CN: 最後它會成爲以下的樣子：

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para><footnote><para>
en: If you use the <literal>dch -r</literal> command to make this last change, please make sure to save the <filename>changelog</filename> file explicitly by the editor.
zh_CN: 如果你用 <literal>dch -r</literal> 命令來使它成爲最後一筆更改， 請確保用編輯器顯式地保存 <filename>changelog</filename> 文件。

note: type: Content of: <book><chapter><section><para>
en: Once you are satisfied with all the changes and documented them in <filename>changelog</filename>, you should change the distribution value from <literal>UNRELEASED</literal> to the target distribution value <literal>unstable</literal> (or even <literal>experimental</literal>).  <placeholder type="footnote" id="0"/>
zh_CN: 如果你已經對自己所作出的改動感到滿意，而且它們都被記錄在了 <filename>changelog</filename> 中，那麼你就可以將發行版值由 <literal>UNRELEASED</literal> 修改至目標發行版值 <literal>unstable</literal> (甚至 <literal>experimental</literal>)。  <placeholder type="footnote" id="0"/>

note: type: Content of: <book><chapter><section><para>
en: You can read more about updating the <filename>changelog</filename> file later in <xref linkend="update"/>.
zh_CN: 你可以在關於更新的 <xref linkend="update"/> 中瞭解更多關於 <filename>changelog</filename> 的內容。

note: type: Content of: <book><chapter><section><para>
en: Now we need to take a look at the exact rules that <citerefentry> <refentrytitle>dpkg-buildpackage</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> will use to actually create the package.  This file is in fact another <filename>Makefile</filename>, but different from the one(s) in the upstream source.  Unlike other files in <filename>debian</filename>, this one is marked as executable.
zh_CN: 現在我們需要看看 <citerefentry> <refentrytitle>dpkg-buildpackage</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> 用於實際建立軟體包的 rules 檔案。這個檔案事實上是另一個 <filename>Makefile</filename>，但不同於上游原始碼中的那個。和 <filename>debian</filename> 目錄中的其他檔案不同，這個檔案被標記為可執行。

note: type: Content of: <book><chapter><section><section><title>
en: Targets of the <filename>rules</filename> file
zh_CN: <filename>rules</filename> 文件中的 Target

note: type: Content of: <book><chapter><section><section><para><footnote><para>
en: You can start learning how to write a <filename>Makefile</filename> from <ulink url="&debref-make;">Debian Reference, 12.2. "Make"</ulink>.  The full documentation is available as <ulink url="&gnu-make;"></ulink> or as the <systemitem role="package">make-doc</systemitem> package in the <literal>non-free</literal> archive area.
zh_CN: 你可以透過該資源來學習編寫 <filename>Makefile</filename> ：<ulink url="&debref-make;">Debian Reference, 12.2. "Make"</ulink>。 完整文件在 <ulink url="&gnu-make;"></ulink> 或者 <systemitem role="package">make-doc</systemitem> 軟體包 (該包位於 <literal>non-free</literal> 部分）。

note: type: Content of: <book><chapter><section><section><para><footnote><para>
en: <ulink url="&policy-debianrules;">Debian Policy Manual, 4.9 "Main building script: debian/rules"</ulink> explains the details.
zh_CN: <ulink url="&policy-debianrules;">Debian Policy Manual, 4.9 "Main building script: debian/rules"</ulink> 針對細節進行瞭解釋。

note: type: Content of: <book><chapter><section><section><para>
en: Every <filename>rules</filename> file, like any other <filename>Makefile</filename>, consists of several rules, each of which defines a target and how it is carried out.  <placeholder type="footnote" id="0"/> A new rule begins with its target declaration in the first column.  The following lines beginning with the TAB code (ASCII 9) specify the recipe for carrying out that target.  Empty lines and lines beginning with <literal>#</literal> (hash) are treated as comments and ignored.  <placeholder type="footnote" id="1"/>
zh_CN: 每一個 <filename>rules</filename> 文件， 就像其他的 <filename>Makefile</filename> 一樣，包含着若干 rules，其中每一個都定義了一個 target 以及其具體 操作。 <placeholder type="footnote" id="0"/> 一個新的 rule  以自己的 target 聲明(置於第一列)來起頭。 後續的行都以 TAB 字符 (ASCII 9) 來開頭，以指示 target 的具體行爲。 空行和以井號 <literal>#</literal> 開頭的行會被當作註釋而被忽略。  <placeholder type="footnote" id="1"/>

note: type: Content of: <book><chapter><section><section><para>
en: A rule that you want to execute is invoked by its target name as a command line argument.  For example, <literal>debian/rules <replaceable>build</replaceable></literal> and <literal>fakeroot make -f debian/rules <replaceable>binary</replaceable></literal> execute rules for <literal><replaceable>build</replaceable></literal> and <literal><replaceable>binary</replaceable></literal> targets, respectively.
zh_CN: 當你想要執行一個 rule 的時候，就將 target（目標）名稱作為命令列引數來呼叫。比如說， <literal>debian/rules <replaceable>build</replaceable></literal> 以及 <literal>fakeroot make -f debian/rules <replaceable>binary</replaceable></literal> 會分別執行 <literal><replaceable>build</replaceable></literal> 和 <literal><replaceable>binary</replaceable></literal> 兩個 target。

note: type: Content of: <book><chapter><section><section><para>
en: Here is a simplified explanation of the targets:
zh_CN: 以下是對各 target 的簡單解釋：

note: type: Content of: <book><chapter><section><section><itemizedlist><listitem><para>
en: <literal>clean</literal> target: to clean all compiled, generated, and useless files in the build-tree.  (Required)
zh_CN: <literal>clean</literal> target：清理所有編譯的、生成的或編譯樹中無用的文件。(必須)

note: type: Content of: <book><chapter><section><section><itemizedlist><listitem><para>
en: <literal>build</literal> target: to build the source into compiled programs and formatted documents in the build-tree.  (Required)
zh_CN: <literal>build</literal> target：在編譯樹中將代碼編譯爲程序並生成格式化的文檔。(必須)

note: type: Content of: <book><chapter><section><section><itemizedlist><listitem><para>
en: <literal>build-arch</literal> target: to build the source into arch-dependent compiled programs in the build-tree.  (Required)
zh_CN: <literal>build-arch</literal> target：在編譯樹中將代碼編譯爲依賴於體繫結構的程序。(必須)

note: type: Content of: <book><chapter><section><section><itemizedlist><listitem><para>
en: <literal>build-indep</literal> target: to build the source into arch-independent formatted documents in the build-tree.  (Required)
zh_CN: <literal>build-indep</literal> target：在編譯樹中將代碼編譯爲獨立於平臺的格式化文檔。(必須)

note: type: Content of: <book><chapter><section><section><itemizedlist><listitem><para>
en: <literal>install</literal> target: to install files into a file tree for each binary package under the <filename>debian</filename> directory.  If defined, <literal>binary*</literal> targets effectively depend on this target.  (Optional)
zh_CN: <literal>install</literal> target：把文件安裝到 <filename>debian</filename> 目錄內爲各個二進制包構建的文件樹。如果有定義，那麼 <literal>binary*</literal> target 則會依賴於此 target。(可選)

note: type: Content of: <book><chapter><section><section><itemizedlist><listitem><para><footnote><para>
en: This target is used by <literal>dpkg-buildpackage</literal> as in <xref linkend="completebuild"/>.
zh_CN: 此 target 被 <literal>dpkg-buildpackage</literal> 用於 <xref linkend="completebuild"/> 描述的過程中。

note: type: Content of: <book><chapter><section><section><itemizedlist><listitem><para>
en: <literal>binary</literal> target: to create all binary packages (effectively a combination of <literal>binary-arch</literal> and <literal>binary-indep</literal> targets).  (Required)<placeholder type="footnote" id="0"/>
zh_CN: <literal>binary</literal> target：創建所有二進制包(是 <literal>binary-arch</literal> 和 <literal>binary-indep</literal> 的合併)。(必須)<placeholder type="footnote" id="0"/>

note: type: Content of: <book><chapter><section><section><itemizedlist><listitem><para><footnote><para>
en: This target is used by <literal>dpkg-buildpackage -B</literal> as in <xref linkend="autobuilder"/>.
zh_CN: 此 target 被 <literal>dpkg-buildpackage -B</literal> 用於<xref linkend="autobuilder"/> 描述的過程中。

note: type: Content of: <book><chapter><section><section><itemizedlist><listitem><para>
en: <literal>binary-arch</literal> target: to create arch-dependent (<literal>Architecture: any</literal>) binary packages in the parent directory.  (Required)<placeholder type="footnote" id="0"/>
zh_CN: <literal>binary-arch</literal> target：在父目錄中創建平臺依賴(<literal>Architecture: any</literal>)的二進制包。(必須)<placeholder type="footnote" id="0"/>

note: type: Content of: <book><chapter><section><section><itemizedlist><listitem><para><footnote><para>
en: This target is used by <literal>dpkg-buildpackage -A</literal>.
zh_CN: 此 target 被 <literal>dpkg-buildpackage -A</literal> 使用。

note: type: Content of: <book><chapter><section><section><itemizedlist><listitem><para>
en: <literal>binary-indep</literal> target: to create arch-independent (<literal>Architecture: all</literal>) binary packages in the parent directory.  (Required)<placeholder type="footnote" id="0"/>
zh_CN: <literal>binary-indep</literal> target：在父目錄中創建平臺獨立(<literal>Architecture: all</literal>)的二進制包。(必須)<placeholder type="footnote" id="0"/>

note: type: Content of: <book><chapter><section><section><itemizedlist><listitem><para>
en: <literal>get-orig-source</literal> target: to obtain the most recent version of the original source package from an upstream archive.  (Optional)
zh_CN: <literal>get-orig-source</literal> target：從上游站點獲得最新的原始源代碼包。(可選)

note: type: Content of: <book><chapter><section><section><para>
en: You are probably overwhelmed by now, but things are much simpler upon examination of the <filename>rules</filename> file that <command>dh_make</command> gives us as a default.
zh_CN: 可能你現在感到有些迷惑，在接下來講解 <command>dh_make</command> 給出的默認的 <filename>rules</filename> 文件時事情會變得簡單。

note: type: Content of: <book><chapter><section><section><title>
en: Default <filename>rules</filename> file
zh_CN: 默認的 <filename>rules</filename> 檔案

note: type: Content of: <book><chapter><section><section><para>
en: Newer <command>dh_make</command> generates a very simple but powerful default <filename>rules</filename> file using the <command>dh</command> command:
zh_CN: 新版本的 <command>dh_make</command> 會生成一個使用 <command>dh</command> 命令的非常簡單但非常強大的默認的 <filename>rules</filename> 檔案：

note: type: Content of: <book><chapter><section><section><para>
en: (I've added the line numbers and trimmed some comments.  In the actual <filename>rules</filename> file, the leading spaces are a TAB code.)
zh_CN: (注：我添加了行號並刪去了一些註釋。實際的 <filename>rules</filename> 文件裏開頭的空格是 TAB 填充的。)

note: type: Content of: <book><chapter><section><section><para>
en: You are probably familiar with lines like line 1 from shell and Perl scripts.  It tells the operating system that this file is to be processed with <filename>/usr/bin/make</filename>.
zh_CN: 可能在 shell 或 Perl 腳本中你已經對第一行的形式很熟悉了，它告訴作業系統這個檔案應使用 <filename>/usr/bin/make</filename> 處理。

note: type: Content of: <book><chapter><section><section><para>
en: Line 4 can be uncommented to set the <literal>DH_VERBOSE</literal> variable to 1, so that the <command>dh</command> command outputs which <command>dh_*</command> commands it is executing.  You can also add a line <literal>export DH_OPTIONS=-v</literal> here, so that each <command>dh_*</command> command outputs which commands it is executing.  This helps you to understand exactly what is going on behind this simple <filename>rules</filename> file and to debug its problems.  This new <command>dh</command> is designed to form a core part of the <systemitem role="package">debhelper</systemitem> tools, and not to hide anything from you.
zh_CN: 可以取消第 4 行的註釋，以設置 <literal>DH_VERBOSE</literal> 變量爲 1， 於是 <command>dh</command> 命令就會輸出它將要使用的 <command>dh_*</command> 命令。 你也可以在此添加一行 <literal>export DH_OPTIONS=-v</literal> ， 於是 <command>dh_*</command> 命令 同樣也會輸出它正在調用的命令。 這能幫助你理解在這個簡單的 <filename>rules</filename> 文件背後發生了什麼，以及幫助你進行調試。新的 <command>dh</command> 被設計來作爲 <systemitem role="package">debhelper</systemitem> 工具的核心部分，並不向你隱藏任何東西。

note: type: Content of: <book><chapter><section><section><para><footnote><para>
en: This uses the new <systemitem role="package">debhelper</systemitem> v7+ features.  Its design concepts are explained in <ulink url="&debhelper-slides;">Not Your Grandpa's Debhelper</ulink> presented at DebConf9 by the <systemitem role="package">debhelper</systemitem> upstream.  Under <literal>lenny</literal>, <command>dh_make</command> created a much more complicated <filename>rules</filename> file with explicit rules and many <command>dh_*</command> scripts listed for each one, most of which are now unnecessary (and show the package's age). The new <command>dh</command> command is simpler and frees us from doing the routine work "manually". You still have full power to customize the process with <literal>override_dh_*</literal> targets. See <xref linkend="customrules"/>.  It is based only on the <systemitem role="package">debhelper</systemitem> package and does not obfuscate the package building process as the <systemitem role="package">cdbs</systemitem> package tends to do.
zh_CN: 此處使用了新版本 <systemitem role="package">debhelper</systemitem> v7+ 的特性。 它的設計理念在 <ulink url="&debhelper-slides;">Not Your Grandpa's Debhelper</ulink> 中進行了闡明，這在 DebConf9 中被 <systemitem role="package">debhelper</systemitem> 上游進行了演示。 在 <literal>lenny</literal> 下， <command>dh_make</command> 會建立一個更為複雜 的 <filename>rules</filename> 檔案，伴有許多顯式的 rule 和許多為每個 rule 所用的<command>dh_*</command> 指令碼，其中有大部分在現在已經是不必要的了(這也顯示了軟體包的年齡)。 新一代的 <command>dh</command> 命令更為簡潔，並能將我們從"手工的重複工作"中解放出來。當然，你仍然擁有完全的力量來定製整個過程，只要使用 <literal>override_dh_*</literal> target。參見 <xref linkend="customrules"/>。  它僅僅基建於 <systemitem role="package">debhelper</systemitem> 軟體包，而且不會像 <systemitem role="package">cdbs</systemitem> 軟體包所傾向的那樣混淆軟體包構建過程。

note: type: Content of: <book><chapter><section><section><para><footnote><para>
en: You can verify the actual sequences of <command>dh_*</command> programs invoked for a given <literal><replaceable>target</replaceable></literal> without really running them by invoking <literal>dh <replaceable>target</replaceable> --no-act</literal> or <literal>debian/rules -- '<replaceable>target</replaceable> --no-act'</literal>.
zh_CN: 你可以檢驗每一個已有的 <literal><replaceable>target</replaceable></literal> 所呼叫的實際 <command>dh_*</command> 程式序列，而並不需要真的透過 <literal>dh <replaceable>target</replaceable> --no-act</literal> 或 <literal>debian/rules -- '<replaceable>target</replaceable> --no-act'</literal> 來執行以檢視。

note: type: Content of: <book><chapter><section><section><para>
en: Lines 16 and 17 are where all the work is done with an implicit rule using the pattern rule.  The percent sign means "any targets", which then call a single program, <command>dh</command>, with the target name.  <placeholder type="footnote" id="0"/> The <command>dh</command> command is a wrapper script that runs appropriate sequences of <command>dh_*</command> programs depending on its argument.  <placeholder type="footnote" id="1"/>
zh_CN: 第 16 和 17 行使用了 pattern rule，以此隱式地完成所有工作。 其中的百分號意味著“任何 targets”， 它會以 target 名稱作引數呼叫單個程式  <command>dh</command>。  <placeholder type="footnote" id="0"/> <command>dh</command> 命令是一個包裝指令碼，它會根據引數執行妥當的 <command>dh_*</command> 程式序列。 <placeholder type="footnote" id="1"/>

note: type: Content of: <book><chapter><section><section><itemizedlist><listitem><para>
en: <literal>debian/rules clean</literal> runs <literal>dh clean</literal>, which in turn runs the following:
zh_CN: <literal>debian/rules clean</literal> 運行了 <literal>dh clean</literal>，接下來實際執行的命令爲：

note: type: Content of: <book><chapter><section><section><itemizedlist><listitem><para>
en: <literal>debian/rules build</literal> runs <literal>dh build</literal>, which in turn runs the following:
zh_CN: <literal>debian/rules build</literal> 運行了 <literal>dh build</literal>，其實際執行的命令為：

note: type: Content of: <book><chapter><section><section><itemizedlist><listitem><para><footnote><para>
en: The following example assumes your <filename>debian/compat</filename> has a value equal or more than 9 to avoid invoking any python support commands automatically.
zh_CN: 下邊的例子假定你的 <filename>debian/compat</filename> 有一個 值大於或等於 9 ，以此避免自動調用任何 python 支持命令。

note: type: Content of: <book><chapter><section><section><itemizedlist><listitem><para>
en: <literal>fakeroot debian/rules binary</literal> runs <literal>fakeroot dh binary</literal>, which in turn runs the following<placeholder type="footnote" id="0"/>:
zh_CN: <literal>fakeroot debian/rules binary</literal> 執行了 <literal>fakeroot dh binary</literal>，其實際執行的命令為<placeholder type="footnote" id="0"/>：

note: type: Content of: <book><chapter><section><section><itemizedlist><listitem><para>
en: <literal>fakeroot debian/rules binary-arch</literal> runs <literal>fakeroot dh binary-arch</literal>, which in turn runs the same sequence as <literal>fakeroot dh binary</literal> but with the <literal>-a</literal> option appended for each command.
zh_CN: <literal>fakeroot debian/rules binary-arch</literal> 執行了 <literal>fakeroot dh binary-arch</literal>，其效果等同於 <literal>fakeroot dh binary</literal> 並附加 <literal>-a</literal> 引數於每個命令後。

note: type: Content of: <book><chapter><section><section><itemizedlist><listitem><para>
en: <literal>fakeroot debian/rules binary-indep</literal> runs <literal>fakeroot dh binary-indep</literal>, which in turn runs almost the same sequence as <literal>fakeroot dh binary</literal> but excluding <command>dh_strip</command>, <command>dh_makeshlibs</command>, and <command>dh_shlibdeps</command> with the <literal>-i</literal> option appended for each remaining command.
zh_CN: <literal>fakeroot debian/rules binary-indep</literal> 執行了 <literal>fakeroot dh binary-indep</literal>，這會執行幾乎和 <literal>fakeroot dh binary</literal> 一樣的命令，但 <command>dh_strip</command>、<command>dh_makeshlibs</command> 和 <command>dh_shlibdeps</command> 除外，其他命令則均附加<literal>-i</literal> 選項。

note: type: Content of: <book><chapter><section><section><para><footnote><para>
en: For complete information on what all these <command>dh_*</command> scripts do exactly, and what their other options are, please read their respective manual pages and the <systemitem role="package">debhelper</systemitem> documentation.
zh_CN: 關於所有 <command>dh_*</command> 腳本具體行爲， 以及 它們有什麼選項 的完整信息，請閱讀它們各自的 man 手冊頁 以及 <systemitem role="package">debhelper</systemitem> 的文檔。

note: type: Content of: <book><chapter><section><section><para><footnote><para>
en: These commands support other build environments, such as <filename>setup.py</filename>, which can be listed by executing <literal>dh_auto_build --list</literal> in a package source directory.
zh_CN: 這些構建系統同樣支援其他的構建環境，比如 <filename>setup.py</filename> ，這可以透過在軟體包原始碼目錄中執行 <literal>dh_auto_build --list</literal> 來列出。

note: type: Content of: <book><chapter><section><section><para>
en: The functions of <command>dh_*</command> commands are largely self-evident from their names.  <placeholder type="footnote" id="0"/> There are a few notable ones that are worth giving (over)simplified explanations here assuming a typical build environment based on a <filename>Makefile</filename>: <placeholder type="footnote" id="1"/>
zh_CN: <command>dh_*</command> 命令的功能依其名稱不言而喻。 <placeholder type="footnote" id="0"/> 不過其中有一些值得在這裏進行簡要解釋， 假定有一個基於 <filename>Makefile</filename> 的典型構建環境： <placeholder type="footnote" id="1"/>

note: type: Content of: <book><chapter><section><section><itemizedlist><listitem><para><footnote><para>
en: It actually looks for the first available target in the <filename>Makefile</filename> out of <literal>distclean</literal>, <literal>realclean</literal>, or <literal>clean</literal>, and executes that.
zh_CN: 它實際上在 <filename>Makefile</filename> 中搜尋第一個可用的 target ，除了 <literal>distclean</literal>, <literal>realclean</literal>, 或 <literal>clean</literal>， 接下來再執行它。

note: type: Content of: <book><chapter><section><section><itemizedlist><listitem><para>
en: <command>dh_auto_clean</command> usually executes the following if a <filename>Makefile</filename> exists with the <literal>distclean</literal> target.  <placeholder type="footnote" id="0"/>
zh_CN: <command>dh_auto_install</command> 通常在 <filename>Makefile</filename> 存在且有 <literal>distclean</literal> target 時執行以下命令<placeholder type="footnote" id="0"/>

note: type: Content of: <book><chapter><section><section><itemizedlist><listitem><para>
en: <command>dh_auto_configure</command> usually executes the following if <filename>./configure</filename> exists (arguments abbreviated for readability).
zh_CN: <command>dh_auto_configure</command> 在 <filename>./configure</filename> 存在時通常執行以下命令(省略了部分參數以方便此處閱讀)。

note: type: Content of: <book><chapter><section><section><itemizedlist><listitem><para>
en: <command>dh_auto_build</command> usually executes the following to execute the first target of <filename>Makefile</filename> if it exists.
zh_CN: <command>dh_auto_build</command> 通常使用以下命令執行 <filename>Makefile</filename> 中的第一個 target。

note: type: Content of: <book><chapter><section><section><itemizedlist><listitem><para><footnote><para>
en: It actually looks for the first available target in the <filename>Makefile</filename> out of <literal>test</literal> or <literal>check</literal>, and executes that.
zh_CN: 實際上它在 <filename>Makefile</filename> 中搜索第一個可用的 target，除了 <literal>test</literal> 或 <literal>check</literal>，然後執行它。

note: type: Content of: <book><chapter><section><section><itemizedlist><listitem><para>
en: <command>dh_auto_test</command> usually executes the following if a <filename>Makefile</filename> exists with the <literal>test</literal> target.  <placeholder type="footnote" id="0"/>
zh_CN: <command>dh_auto_install</command> 通常在 <filename>Makefile</filename> 存在且有 <literal>test</literal> target 時執行以下命令。<placeholder type="footnote" id="0"/>

note: type: Content of: <book><chapter><section><section><itemizedlist><listitem><para>
en: <command>dh_auto_install</command> usually executes the following if a <filename>Makefile</filename> exists with the <literal>install</literal> target (line folded for readability).
zh_CN: <command>dh_auto_install</command> 通常在 <filename>Makefile</filename> 存在且有 <literal>install</literal> target 時執行以下命令(進行了換行以便閱讀)。

note: type: Content of: <book><chapter><section><section><para>
en: All targets which require the <command>fakeroot</command> command will contain <command>dh_testroot</command>, which exits with an error if you are not using this command to pretend to be root.
zh_CN: 所有需要 <command>fakeroot</command> 命令的都包含了 <command>dh_testroot</command>。如果你沒有使用 fakeroot，那將會報錯並退出。

note: type: Content of: <book><chapter><section><section><para>
en: The important part to know about the <filename>rules</filename> file created by <command>dh_make</command> is that it is just a suggestion.  It will work for most packages but for more complicated ones, don't be afraid to customize it to fit your needs.
zh_CN: 關於 <command>dh_make</command> 生成的 <filename>rules</filename> 文件，你應該知道的最重要的事是，它僅僅是一個建議。它對多數簡單的軟件包有效，但對於更複雜的則要大膽對其進行定製以滿足需要。

note: type: Content of: <book><chapter><section><section><para>
en: Although <literal>install</literal> is not a required target, it is supported.  <literal>fakeroot dh install</literal> behaves like <literal>fakeroot dh binary</literal> but stops after <command>dh_fixperms</command>.
zh_CN: 儘管 <literal>install</literal> target 不是必須的，但也被支持。<literal>fakeroot dh install</literal> 的操作就像 <literal>fakeroot dh binary</literal>一樣，但停止於 <command>dh_fixperms</command>。

note: type: Content of: <book><chapter><section><section><title>
en: Customization of <filename>rules</filename> file
zh_CN: 定製 <filename>rules</filename> 檔案

note: type: Content of: <book><chapter><section><section><para>
en: There are many ways to customize the <filename>rules</filename> file created with the new <command>dh</command> command.
zh_CN: 有很多方法來定製使用新的 <command>dh</command> 命令創建的 <filename>rules</filename> 檔案。

note: type: Content of: <book><chapter><section><section><para><footnote><para>
en: If a package installs the <filename>/usr/share/perl5/Debian/Debhelper/Sequence/<replaceable>custom_name</replaceable>.pm</filename> file, you should activate its customization function by <literal>dh $@ --with <replaceable>custom-name</replaceable></literal>.
zh_CN: 如果一個軟件包安裝了 <filename>/usr/share/perl5/Debian/Debhelper/Sequence/<replaceable>custom_name</replaceable>.pm</filename> 文件，你應當使用 <literal>dh $@ --with <replaceable>custom-name</replaceable></literal> 命令激活其功能。

note: type: Content of: <book><chapter><section><section><para>
en: The <literal>dh $@</literal> command can be customized as follows: <placeholder type="footnote" id="0"/>
zh_CN: <literal>dh $@</literal> 命令可以按以下方式定製：<placeholder type="footnote" id="0"/>

note: type: Content of: <book><chapter><section><section><itemizedlist><listitem><para><footnote><para>
en: Use of the <command>dh_python2</command> command is preferred over use of <command>dh_pysupport</command> or <command>dh_pycentral</command> commands.  Do not use the <command>dh_python</command> command.
zh_CN: 在 <command>dh_python2</command> 和 <command>dh_pysupport</command> 以及<command>dh_pycentral</command> 命令之間更推薦使用前者。不要使用 <command>dh_python</command> 命令。

note: type: Content of: <book><chapter><section><section><itemizedlist><listitem><para>
en: Add support for the <command>dh_python2</command> command.  (The best choice for Python.) <placeholder type="footnote" id="0"/>
zh_CN: 爲 <command>dh_python2</command> 命令添加支持。(對於 Python 的最佳選擇。)<placeholder type="footnote" id="0"/>

note: type: Content of: <book><chapter><section><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: Include the <systemitem role="package">python</systemitem> package in <literal>Build-Depends</literal>.
zh_CN: 在 <literal>Build-Depends</literal> 中添加 <systemitem role="package">python</systemitem> 軟件包。

note: type: Content of: <book><chapter><section><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: Use <literal>dh $@ --with python2</literal>.
zh_CN: 使用 <literal>dh $@ --with python2</literal>.

note: type: Content of: <book><chapter><section><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: This handles Python modules using the <systemitem role="package">python</systemitem> framework.
zh_CN: 這會使用 <systemitem role="package">python</systemitem> 框架處理 Python 模塊。

note: type: Content of: <book><chapter><section><section><itemizedlist><listitem><para>
en: Add support for the <command>dh_pysupport</command> command. (deprecated)
zh_CN: 添加 <command>dh_pysupport</command> 命令的支持。(已廢棄)

note: type: Content of: <book><chapter><section><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: Include the <systemitem role="package">python-support</systemitem> package in <literal>Build-Depends</literal>.
zh_CN: 在 <literal>Build-Depends</literal> 中添加 <systemitem role="package">python-support</systemitem> 軟件包。

note: type: Content of: <book><chapter><section><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: Use <literal>dh $@ --with pysupport</literal>.
zh_CN: 使用 <literal>dh $@ --with pysupport</literal>

note: type: Content of: <book><chapter><section><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: This handles Python modules using the <systemitem role="package">python-support</systemitem> framework.
zh_CN: 這會使用 <systemitem role="package">python-support</systemitem> 框架處理 Python 模塊。

note: type: Content of: <book><chapter><section><section><itemizedlist><listitem><para>
en: Add support for the <command>dh_pycentral</command> command. (deprecated)
zh_CN: 添加 <command>dh_pycentral</command> 命令支持。(已廢棄)

note: type: Content of: <book><chapter><section><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: Include the <systemitem role="package">python-central</systemitem> package in <literal>Build-Depends</literal>.
zh_CN: 在 <literal>Build-Depends</literal> 中添加 <systemitem role="package">python-central</systemitem> 軟件包。

note: type: Content of: <book><chapter><section><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: Use <literal>dh $@ --with python-central</literal> instead.
zh_CN: 使用 <literal>dh $@ --with python-central</literal>

note: type: Content of: <book><chapter><section><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: This also deactivates the <command>dh_pysupport</command> command.
zh_CN: 這樣會同時停用 <command>dh_pysupport</command> 命令。

note: type: Content of: <book><chapter><section><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: This handles Python modules using the <systemitem role="package">python-central</systemitem> framework.
zh_CN: 這會使用 <systemitem role="package">python-central</systemitem> 框架處理 Python 模塊。

note: type: Content of: <book><chapter><section><section><itemizedlist><listitem><para>
en: Add support for the <command>dh_installtex</command> command.
zh_CN: 添加 <command>dh_installtex</command> 命令支持。

note: type: Content of: <book><chapter><section><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: Include the <systemitem role="package">tex-common</systemitem> package in <literal>Build-Depends</literal>.
zh_CN: 在 <literal>Build-Depends</literal> 中添加 <systemitem role="package">tex-common</systemitem> 軟件包。

note: type: Content of: <book><chapter><section><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: Use <literal>dh $@ --with tex</literal> instead.
zh_CN: 使用 <literal>dh $@ --with tex</literal>

note: type: Content of: <book><chapter><section><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: This registers Type 1 fonts, hyphenation patterns, and formats with TeX.
zh_CN: 這樣會註冊 Type 1 字體、斷句樣式及其他 TeX 格式。

note: type: Content of: <book><chapter><section><section><itemizedlist><listitem><para>
en: Add support for the <command>dh_quilt_patch</command> and <command>dh_quilt_unpatch</command> commands.
zh_CN: 添加 <command>dh_quilt_patch</command> 和 <command>dh_quilt_unpatch</command> 命令支持。

note: type: Content of: <book><chapter><section><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: Include the <systemitem role="package">quilt</systemitem> package in <literal>Build-Depends</literal>.
zh_CN: 在 <literal>Build-Depends</literal> 中添加 <systemitem role="package">quilt</systemitem> 軟件包。

note: type: Content of: <book><chapter><section><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: Use <literal>dh $@ --with quilt</literal> instead.
zh_CN: 使用 <literal>dh $@ --with quilt </literal>

note: type: Content of: <book><chapter><section><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: This applies and un-applies patches to the upstream source from files in the <filename>debian/patches</filename> directory for a source package in the <literal>1.0</literal> format.
zh_CN: 這會在你使用 <literal>1.0</literal> 格式的源代碼包時自動應用或解除 <filename>debian/patches</filename> 目錄中的補丁。

note: type: Content of: <book><chapter><section><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: This is not needed if you use the new <literal>3.0 (quilt)</literal> source package format.
zh_CN: 如果你使用新的 <literal>3.0 (quilt)</literal> 源代碼包格式則不需要這些。

note: type: Content of: <book><chapter><section><section><itemizedlist><listitem><para>
en: Add support for the <command>dh_dkms</command> command.
zh_CN: 爲 <command>dh_dkms</command> 命令添加支持。

note: type: Content of: <book><chapter><section><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: Include the <systemitem role="package">dkms</systemitem> package in <literal>Build-Depends</literal>.
zh_CN: 在 <literal>Build-Depends</literal> 中添加 <systemitem role="package">dkms</systemitem> 軟件包。

note: type: Content of: <book><chapter><section><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: Use <literal>dh $@ --with dkms</literal> instead.
zh_CN: 使用 <literal>dh $@ --with dkms </literal>

note: type: Content of: <book><chapter><section><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: This correctly handles DKMS usage by kernel module packages.
zh_CN: 這能使內核模塊軟件包正確使用 DKMS。

note: type: Content of: <book><chapter><section><section><itemizedlist><listitem><para>
en: Add support for the <command>dh_autotools-dev_updateconfig</command> and <command>dh_autotools-dev_restoreconfig</command> commands.
zh_CN: 添加 <command>dh_autotools-dev_updateconfig</command> 和 <command>dh_autotools-dev_restoreconfig</command> 命令支持。

note: type: Content of: <book><chapter><section><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: Include the <systemitem role="package">autotools-dev</systemitem> package in <literal>Build-Depends</literal>.
zh_CN: 在 <literal>Build-Depends</literal> 中添加 <systemitem role="package">autotools-dev</systemitem> 軟件包。

note: type: Content of: <book><chapter><section><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: Use <literal>dh $@ --with autotools-dev</literal> instead.
zh_CN: 使用 <literal>dh $@ --with autotools-dev</literal>

note: type: Content of: <book><chapter><section><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: This updates and restores <filename>config.sub</filename> and <filename>config.guess</filename>.
zh_CN: 這會自動更新或還原 <filename>config.sub</filename> 和 <filename>config.guess</filename> 檔案。

note: type: Content of: <book><chapter><section><section><itemizedlist><listitem><para>
en: Add support for the <command>dh_autoreconf</command> and <command>dh_autoreconf_clean</command> commands.
zh_CN: 添加 <command>dh_autoreconf</command> 和 <command>dh_autoreconf_clean</command> 命令支持。

note: type: Content of: <book><chapter><section><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: Include the <systemitem role="package">dh-autoreconf</systemitem> package in <literal>Build-Depends</literal>.
zh_CN: 在 <literal>Build-Depends</literal> 中添加 <systemitem role="package">dh-autoreconf</systemitem> 軟件包。

note: type: Content of: <book><chapter><section><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: Use <literal>dh $@ --with autoreconf</literal> instead.
zh_CN: 使用 <literal>dh $@ --with autoreconf</literal>

note: type: Content of: <book><chapter><section><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: This updates the GNU Build System files and restores them after the build.
zh_CN: 這樣會在編譯時更新 GNU 編譯系統檔案並在編譯後對其進行恢復。

note: type: Content of: <book><chapter><section><section><itemizedlist><listitem><para>
en: Add support for the <command>dh_girepository</command> command.
zh_CN: 添加 <command>dh_girepository</command> 命令支持。

note: type: Content of: <book><chapter><section><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: Includes the <systemitem role="package">gobject-introspection</systemitem> package in <literal>Build-Depends</literal>.
zh_CN: 在 <literal>Build-Depends</literal> 中添加 <systemitem role="package">gobject-introspection</systemitem> 軟件包。

note: type: Content of: <book><chapter><section><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: Use <literal>dh $@ --with gir</literal> instead.
zh_CN: 使用 <literal>dh $@ --with quilt</literal>

note: type: Content of: <book><chapter><section><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: This computes dependencies for packages shipping GObject introspection data and generates the <literal>${gir:Depends}</literal> substitution variable for the package dependency.
zh_CN: 這會爲帶有 GObject 內省數據的軟件包計算依賴，並生成 <literal>${gir:Depends}</literal> 這一替換變量。

note: type: Content of: <book><chapter><section><section><itemizedlist><listitem><para>
en: Add support for the <command>bash</command> completion feature.
zh_CN: 添加 <command>bash</command> 補全特性支持。

note: type: Content of: <book><chapter><section><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: Includes the <systemitem role="package">bash-completion</systemitem> package in <literal>Build-Depends</literal>.
zh_CN: 在 <literal>Build-Depends</literal> 中添加 <systemitem role="package">bash-completion</systemitem> 軟件包。

note: type: Content of: <book><chapter><section><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: Use <literal>dh $@ --with bash-completion</literal> instead.
zh_CN: 使用 <literal>dh $@ --with bash-completion</literal>

note: type: Content of: <book><chapter><section><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: This installs <command>bash</command> completions using a configuration file at <filename>debian/<replaceable>package</replaceable>.bash-completion</filename>.
zh_CN: 這會使用 <filename>debian/<replaceable>package</replaceable>.bash-completion</filename> 中的配置文件來安裝 <command>bash</command> 補全。

note: type: Content of: <book><chapter><section><section><para>
en: Many <command>dh_*</command> commands invoked by the new <command>dh</command> command can be customized by the corresponding configuration files in the <filename>debian</filename> directory.  See <xref linkend="dother"/> and the manpage of each command for the customization of such features.
zh_CN: 很多由新的 <command>dh</command> 命令觸發的 <command>dh_*</command> 都可以通過修改 <filename>debian</filename> 目錄中的設定檔案來對其行爲進行定製。參考 <xref linkend="dother"/> 和每個命令的 man 手冊頁。

note: type: Content of: <book><chapter><section><section><para><footnote><para>
en: Under <literal>lenny</literal>, if you wanted to change the behavior of a <command>dh_*</command> script you found the relevant line in the <filename>rules</filename> file and adjusted it.
zh_CN: 在 <literal>lenny</literal> 下，如果你希望更改某個 <command>dh_*</command> 腳本的行爲，你需要在 <filename>rules</filename> 中找到相應的行然後進行調整。

note: type: Content of: <book><chapter><section><section><para>
en: You may need to run <command>dh_*</command> commands invoked via the new <command>dh</command> with added arguments, or to run additional commands with them, or to skip them.  For such cases, you create an <literal>override_dh_<replaceable>foo</replaceable></literal> target with its rule in the <filename>rules</filename> file defining an <literal>override_dh_<replaceable>foo</replaceable></literal> target for the <command>dh_<replaceable>foo</replaceable></command> command you want to change.  It basically says <emphasis>run me instead</emphasis>.  <placeholder type="footnote" id="0"/>
zh_CN: 某些由新的 <command>dh</command> 命令所觸發的 <command>dh_*</command> 命令可能需要額外的參數，或需要附加執行或者跳過執行。對於這類情況，你可以在 <filename>rules</filename> 文件中創建一個 <literal>override_dh_<replaceable>foo</replaceable></literal> target，並在其中定義一個 <literal>override_dh_<replaceable>foo</replaceable></literal>來使其完成你想要 <command>dh_<replaceable>foo</replaceable></command> 命令作出的改變。它的作用簡單說就是 <emphasis>run me instead (把運行的命令換成我)</emphasis>。<placeholder type="footnote" id="0"/>

note: type: Content of: <book><chapter><section><section><para>
en: Please note that the <command>dh_auto_*</command> commands tend to do more than what has been discussed in this (over)simplified explanation to take care of all the corner cases.  It is a bad idea to use <literal>override_dh_*</literal> targets to substitute simplified equivalent commands (except for the <literal>override_dh_auto_clean</literal> target) since it may bypass such smart <systemitem role="package">debhelper</systemitem> features.
zh_CN: 請注意 <command>dh_auto_*</command> 命令爲了照顧所有的邊緣情況，它實際所做的比上述(過度)簡化的步驟中介紹的內容更多。除了 <literal>override_dh_auto_clean</literal> 外把上面的簡化命令寫成 <literal>override_dh_*</literal> 中是不明智的，這樣會使得 <systemitem role="package">debhelper</systemitem> 的許多智能特性無法體現。

note: type: Content of: <book><chapter><section><section><para>
en: So, for instance, if you want to store system configuration data in the <filename>/etc/gentoo</filename> directory instead of the usual <filename>/etc</filename> directory for the recent <systemitem role="package">gentoo</systemitem> package using Autotools, you can override the default <literal>--sysconfig=/etc</literal> argument given by the <command>dh_auto_configure</command> command to the <command>./configure</command> command by the following:
zh_CN: 所以，比如，最近的<systemitem role="package">gentoo</systemitem> 軟件包使用了 Autotools，如果你希望把系統配置配置文件安裝到 <filename>/etc/gentoo</filename> 而非通常的 <filename>/etc</filename> 目錄，你可以凌駕 <command>dh_auto_configure</command> 默認的使用的 <literal>--sysconfig=/etc</literal> 參數，改爲向 <command>./configure</command> 命令傳遞以下參數：

note: type: Content of: <book><chapter><section><section><para>
en: The arguments given after <literal>--</literal> are appended to the default arguments of the auto-executed program to override them.  Using the <command>dh_auto_configure</command> command is better than directly invoking the <command>./configure</command> command here since it will only override the <literal>--sysconfig</literal> argument and retain any other, benign arguments to the <command>./configure</command> command.
zh_CN: 在 <literal>--</literal> 其後給出的引數會被追加到被自動執行的程式預設引數後，以此凌駕它們並修改其預設行為。 使用 <command>dh_auto_configure</command> 命令要比直接呼叫 <command>./configure</command> 命令好很多，因為 它只修改 <literal>--sysconfig</literal> 引數內容，同時保留其他任何對 <command>./configure</command> 命令良性的引數。

note: type: Content of: <book><chapter><section><section><para><footnote><para>
en: <command>dh_auto_build</command> without any arguments will execute the first target in the <filename>Makefile</filename>.
zh_CN: 沒有參數的 <command>dh_auto_build</command>命令將執行 <filename>Makefile</filename> 中的第一個 target。

note: type: Content of: <book><chapter><section><section><para>
en: If the <filename>Makefile</filename> in the source for <systemitem role="package">gentoo</systemitem> requires you to specify <literal>build</literal> as its target to build it <placeholder type="footnote" id="0"/>, you create an <literal>override_dh_auto_build</literal> target to enable this.
zh_CN: 如果 <systemitem role="package">gentoo</systemitem> 的 <filename>Makefile</filename> 需要指定 <literal>build</literal> 作爲其編譯用的 target<placeholder type="footnote" id="0"/>，你可以創建一個 <literal>override_dh_auto_build</literal> target 來啓用它。

note: type: Content of: <book><chapter><section><section><para>
en: This ensures <literal>$(MAKE)</literal> is run with all the default arguments given by the <command>dh_auto_build</command> command plus the <literal>build</literal> argument.
zh_CN: 這保證了 <literal>$(MAKE)</literal> 會使用 <command>dh_auto_build</command> 傳遞的所有默認參數並編譯處理 <literal>build</literal> 這個 target。

note: type: Content of: <book><chapter><section><section><para>
en: If the <filename>Makefile</filename> in the source for <systemitem role="package">gentoo</systemitem> requires you to specify the <literal>packageclean</literal> target to clean it for the Debian package instead of using <literal>distclean</literal> or <literal>clean</literal> targets, you can create an <literal>override_dh_auto_clean</literal> target to enable it.
zh_CN: 如果 <systemitem role="package">gentoo</systemitem> 的 <filename>Makefile</filename> 需要指定 <literal>packageclean</literal> target 來爲 Debian 軟件包作清理，而非 <literal>distclean</literal> 或 <literal>clean</literal> target，那你就可以創建一個 <literal>override_dh_auto_clean</literal> target 來啓用它。

note: type: Content of: <book><chapter><section><section><para>
en: If the <filename>Makefile</filename> in the source for <systemitem role="package">gentoo</systemitem> contains a <literal>test</literal> target which you do not want to run for the Debian package building process, you can use an empty <literal>override_dh_auto_test</literal> target to skip it.
zh_CN: 如果 <systemitem role="package">gentoo</systemitem> 的 <filename>Makefile</filename> 包含了一個 <literal>test</literal> target 但你不想在 Debian 軟件包構建過程中運行它，可以使用空的 <literal>override_dh_auto_test</literal> target 來跳過它。

note: type: Content of: <book><chapter><section><section><para><footnote><para>
en: The <filename>debian/changelog</filename> and <filename>debian/NEWS</filename> files are always automatically installed.  The upstream changelog is found by converting filenames to lower case and matching them against <filename>changelog</filename>, <filename>changes</filename>, <filename>changelog.txt</filename>, and <filename>changes.txt</filename>.
zh_CN: <filename>debian/changelog</filename> 和 <filename>debian/NEWS</filename> 總是會被自動安裝。程序會將文件名轉爲小寫並搜索以下文件名來檢測上游 changelog：<filename>changelog</filename>、<filename>changes</filename>、<filename>changelog.txt</filename>和<filename>changes.txt</filename>。

note: type: Content of: <book><chapter><section><section><para>
en: If <systemitem role="package">gentoo</systemitem> has an unusual upstream changelog file called <filename>FIXES</filename>, <command>dh_installchangelogs</command> will not install that file by default.  The <command>dh_installchangelogs</command> command requires <filename>FIXES</filename> as its argument to install it.  <placeholder type="footnote" id="0"/>
zh_CN: 如果 <systemitem role="package">gentoo</systemitem> 有某個不常見的上游 changelog 檔案名爲 <filename>FIXES</filename>，默認情況下 <command>dh_installchangelogs</command> 不會安裝它。<command>dh_installchangelogs</command> 命令需要將 <filename>FIXES</filename> 作爲它的參數來安裝它。<placeholder type="footnote" id="0"/>

note: type: Content of: <book><chapter><section><section><para>
en: When you use the new <command>dh</command> command, use of explicit targets such as the ones listed in <xref linkend="targets"/>, other than the <literal>get-orig-source</literal> target, may make it difficult to understand their exact effects.  Please limit explicit targets to <literal>override_dh_*</literal> targets and completely independent ones, if possible.
zh_CN: 如果你使用新的 <command>dh</command> 命令時，還使用 <xref linkend="targets"/> 中除 <literal>get-orig-source</literal> 的顯式 target ，會使得其效果難以預料。如果可能的話請儘量避免使用獨立的或預設的 target，如果必須修改默認設置則酌情使用 <literal>override_dh_*</literal>。

note: type: Content of: <book><chapter><title>
en: Other files under the <filename>debian</filename> directory
zh_CN: <filename>debian</filename> 目錄下的其他檔案

note: type: Content of: <book><chapter><para>
en: To control most of what <systemitem role="package">debhelper</systemitem> does while building the package, you put optional configuration files under the <filename>debian</filename> directory.  This chapter will provide an overview of what each of these does and its format.  Please read the <ulink url="&debian-policy;">Debian Policy Manual</ulink> and <ulink url="&developers-reference;">Debian Developer's Reference</ulink> for guidelines for packaging.
zh_CN: 要控制 <systemitem role="package">debhelper</systemitem> 在構建軟件包過程中的大部分行爲，可以在 <filename>debian</filename> 目錄中放置可選的配置文件。本章將會對這些文件和它們的格式進行概述。請閱讀 <ulink url="&debian-policy;">Debian Policy Manual</ulink> 和 <ulink url="&developers-reference;">Debian Developer's Reference</ulink> 來瞭解更多關於打包方針的內容。

note: type: Content of: <book><chapter><para>
en: Some template configuration files for <systemitem role="package">debhelper</systemitem> may not be created by the <command>dh_make</command> command.  In such cases, you need to create them with an editor.
zh_CN: 還有一些 <systemitem role="package">debhelper</systemitem> 的配置文件模板可能未被 <command>dh_make</command> 命令創建。在這種情況下如果你需要它們，則要使用文本編輯器手工創建。

note: type: Content of: <book><chapter><para>
en: If you wish or need to activate any of these, please do the following:
zh_CN: 如果你希望或需要激活它們中的任意一個或多個，請按照下面的方法做：

note: type: Content of: <book><chapter><itemizedlist><listitem><para>
en: rename the configuration files to use the actual binary package name in place of <literal><replaceable>package</replaceable></literal>;
zh_CN: 把配置文件的名稱改爲實際的二進制軟件包名，例如 <literal><replaceable>package</replaceable></literal>;

note: type: Content of: <book><chapter><itemizedlist><listitem><para>
en: modify template file contents to suit your needs;
zh_CN: 修改模板文件來滿足你的需要;

note: type: Content of: <book><chapter><itemizedlist><listitem><para>
en: remove template files which you do not need;
zh_CN: 刪除不需要的模板文件;

note: type: Content of: <book><chapter><itemizedlist><listitem><para>
en: modify the <filename>control</filename> file (see <xref linkend="control"/>), if necessary;
zh_CN: 如果需要，修改 <filename>control</filename> 文件(參看 <xref linkend="control"/>)。

note: type: Content of: <book><chapter><itemizedlist><listitem><para>
en: modify the <filename>rules</filename> file (see <xref linkend="rules"/>), if necessary.
zh_CN: 如果需要，修改 <filename>rules</filename> 檔案(參考 <xref linkend="rules"/>)。

note: type: Content of: <book><chapter><para>
en: Any <systemitem role="package">debhelper</systemitem> configuration files without a <filename><replaceable>package</replaceable></filename> prefix, such as <filename>install</filename>, apply to the first binary package.  When there are many binary packages, their configurations can be specified by prefixing their name to their configuration filenames such as <filename><replaceable>package-1</replaceable>.install</filename>, <filename><replaceable>package-2</replaceable>.install</filename>, etc.
zh_CN: 任何不帶有 <filename><replaceable>package</replaceable></filename> 前綴的<systemitem role="package">debhelper</systemitem> 配置文件， 比如應用到第一個二進制包的 <filename>install</filename>。 當此處有多個二進制包時，可以通過在文件名中前置 它們各自的名稱來指定它們各自的配置文件，比如<filename><replaceable>package-1</replaceable>.install</filename>, <filename><replaceable>package-2</replaceable>.install</filename>, 之類。

note: type: Content of: <book><chapter><section><para>
en: Any extra details or discrepancies between the original package and your Debian version should be documented here.
zh_CN: 所有關於你的 Debian 版本與原始版本間的額外訊息或差別都應在這裏記錄。

note: type: Content of: <book><chapter><section><para>
en: <command>dh_make</command> created a default one; this is what it looks like:
zh_CN: <command>dh_make</command> 創建了一個默認的文件，以下是它的樣子：

note: type: Content of: <book><chapter><section><para>
en: If you have nothing to be documented, remove this file.  See <citerefentry> <refentrytitle>dh_installdocs</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>.
zh_CN: 如果你沒有需要寫在這裏的東西，則刪除這個檔案。參考 <citerefentry> <refentrytitle>dh_installdocs</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>

note: type: Content of: <book><chapter><section><para>
en: The <filename>compat</filename> file defines the <systemitem role="package">debhelper</systemitem> compatibility level.  Currently, you should set it to the <systemitem role="package">debhelper</systemitem> v10 as follows:
zh_CN: <filename>compat</filename> 檔案定義了 <systemitem role="package">debhelper</systemitem> 的相容級別。目前你應當使用如下方法將其設定為 <systemitem role="package">debhelper</systemitem> V10：

note: type: Content of: <book><chapter><section><para>
en: You may use compat level v9 in certain circumstances for compatibility with older systems. However, using any level below v9 is not recommended and should be avoided for new packages.
zh_CN: 在特定場景下，你可以在需要相容舊版本系統時使用相容等級9。然而，我們不建議你使用任何低於 9 的相容等級，在新建軟體包時也應避免使用這些低的等級。

note: type: Content of: <book><chapter><section><para><footnote><para>
en: See <citerefentry> <refentrytitle>dpkg</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> and <ulink url="&policy-conffiles;">Debian Policy Manual, "D.2.5 Conffiles"</ulink>.
zh_CN: 參見 <citerefentry> <refentrytitle>dpkg</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> 以及 <ulink url="&policy-conffiles;">Debian Policy Manual, "D.2.5 Conffiles"</ulink>.

note: type: Content of: <book><chapter><section><para>
en: One of the most annoying things about software is when you spend a great deal of time and effort customizing a program, only to have an upgrade stomp all over your changes.  Debian solves this problem by marking such configuration files as conffiles.  <placeholder type="footnote" id="0"/> When you upgrade a package, you'll be asked whether you want to keep your old configuration files or not.
zh_CN: 關於軟件有件很惱人的事，就是當你付出了很多時間和精力來自定義一個程序，但是升級後所有的修改都被覆蓋掉了。Debian 通過將配置文件單獨標記來解決這個問題， <placeholder type="footnote" id="0"/> 當軟件包升級的時候，你將會被詢問是否要保留你的舊配置文件。

note: type: Content of: <book><chapter><section><para>
en: <citerefentry><refentrytitle>dh_installdeb</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> <emphasis>automatically</emphasis> flags any files under the <filename>/etc</filename> directory as conffiles, so if your program only has conffiles there you do not need to specify them in this file.  For most package types, the only place conffiles should ever be is under <filename>/etc</filename>, and so this file doesn't need to exist.
zh_CN: <citerefentry><refentrytitle>dh_installdeb</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> <emphasis>automatically</emphasis> 會把 <filename>/etc</filename> 目錄下的任何文件都標記爲 conffiles，所以如果你的程序在那只有 conffiles 的話就不需要再在這個文件中指定它們。 對於大多數軟件包類型，唯一合理的 conffiles 文件存放位置自始至終應當在 <filename>/etc</filename> 目錄下， 正因如此，該文件也沒有存在的必要。

note: type: Content of: <book><chapter><section><para>
en: If your program uses configuration files but also rewrites them on its own, it's best not to make them conffiles because <command>dpkg</command> will then prompt users to verify the changes all the time.
zh_CN: 如果你的程序使用配置文件，但程序會自動對配置文件進行改寫，則最好別將其標記爲 conffiles ，因爲 <command>dpkg</command> 總是會要求用戶校驗變更。

note: type: Content of: <book><chapter><section><para>
en: If the program you're packaging requires every user to modify the configuration files in the <filename>/etc</filename> directory, there are two popular ways to arrange for them to not be conffiles, keeping <command>dpkg</command> quiet:
zh_CN: 如果你正在打包的程序需要所有用戶都爲自己修改 <filename>/etc</filename> 目錄中的配置文件，那麼有兩種常見的方法讓 <command>dpkg</command> 不將其記錄爲 conffiles，以使其沉默。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: Create a symlink under the <filename>/etc</filename> directory pointing to a file under the <filename>/var</filename> directory generated by the maintainer scripts.
zh_CN: 在 <filename>/etc</filename> 目錄中創建指向 <filename>/var</filename> 中維護者腳本(maintainer scripts)生成的文件的符號鏈接。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: Create a file generated by the maintainer scripts under the <filename>/etc</filename> directory.
zh_CN: 用維護者腳本(maintainer scripts)在 <filename>/etc</filename> 目錄中生成一個文件。

note: type: Content of: <book><chapter><section><para>
en: For information on maintainer scripts, see <xref linkend="maintscripts"/>.
zh_CN: 更多關於維護者腳本(maintainer scripts)的信息，參看 <xref linkend="maintscripts"/>

note: type: Content of: <book><chapter><section><para>
en: If your package requires regularly scheduled tasks to operate properly, you can use these files to set that up.  You can set up regular tasks that either happen hourly, daily, weekly, or monthly, or alternatively happen at any other time that you wish.  The filenames are:
zh_CN: 如果你的軟件包需要有計劃運行的操作以保證正常工作，可以使用這個文件達成。你既可以設置常規的任務使其在每小時、每天、每星期、每月或其他情況或你希望的時間下運行。相應的文件名是：

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: <filename><replaceable>package</replaceable>.cron.hourly</filename> - Installed as <filename>/etc/cron.hourly/<replaceable>package</replaceable></filename>; run once an hour.
zh_CN: <filename><replaceable>package</replaceable>.cron.hourly</filename> - 安裝至 <filename>/etc/cron.hourly/<replaceable>package</replaceable></filename> ；每小時運行一次。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: <filename><replaceable>package</replaceable>.cron.daily</filename> - Installed as <filename>/etc/cron.daily/<replaceable>package</replaceable></filename>; run once a day.
zh_CN: <filename><replaceable>package</replaceable>.cron.daily</filename> - 安裝至 <filename>/etc/cron.daily/<replaceable>package</replaceable></filename> ；每天運行一次。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: <filename><replaceable>package</replaceable>.cron.weekly</filename> - Installed as <filename>/etc/cron.weekly/<replaceable>package</replaceable></filename>; run once a week.
zh_CN: <filename><replaceable>package</replaceable>.cron.weekly</filename> - 安裝至 <filename>/etc/cron.weekly/<replaceable>package</replaceable></filename> ；每週運行一次。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: <filename><replaceable>package</replaceable>.cron.monthly</filename> - Installed as <filename>/etc/cron.monthly/<replaceable>package</replaceable></filename>: run once a month.
zh_CN: <filename><replaceable>package</replaceable>.cron.monthly</filename> - 安裝至 <filename>/etc/cron.monthly/<replaceable>package</replaceable></filename> ：每月運行一次。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: <filename><replaceable>package</replaceable>.cron.d</filename> - Installed as <filename>/etc/cron.d/<replaceable>package</replaceable></filename>: for any other time.
zh_CN: <filename><replaceable>package</replaceable>.cron.d</filename> - 安裝至 <filename>/etc/cron.d/<replaceable>package</replaceable></filename>： 對於其他的任何時間。

note: type: Content of: <book><chapter><section><para>
en: Most of these files are shell scripts, with the exception of <filename><replaceable>package</replaceable>.cron.d</filename> which follows the format of <citerefentry> <refentrytitle>crontab</refentrytitle> <manvolnum>5</manvolnum> </citerefentry>.
zh_CN: 這些文件均爲 shell 腳本。唯一不同的是 <filename><replaceable>package</replaceable>.cron.d</filename>，它的格式需要參照 <citerefentry> <refentrytitle>crontab</refentrytitle> <manvolnum>5</manvolnum> </citerefentry>

note: type: Content of: <book><chapter><section><para>
en: No explicit <filename>cron.*</filename> file is needed to set up log rotation; for that, see <citerefentry><refentrytitle>dh_installlogrotate</refentrytitle> <manvolnum>1</manvolnum></citerefentry> and <citerefentry><refentrytitle>logrotate</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
zh_CN: 有必要顯式地用 <filename>cron.*</filename> 文件來設置日誌輪轉； 關於這個問題，請參見 <citerefentry><refentrytitle>dh_installlogrotate</refentrytitle> <manvolnum>1</manvolnum></citerefentry> 和 <citerefentry><refentrytitle>logrotate</refentrytitle><manvolnum>8</manvolnum></citerefentry>.

note: type: Content of: <book><chapter><section><para>
en: This file specifies any directories which we need but which are not created by the normal installation procedure (<literal>make install DESTDIR=...</literal> invoked by <literal>dh_auto_install</literal>).  This generally means there is a problem with the <filename>Makefile</filename>.
zh_CN: 這個文件指定了我們需要，但在正常安裝過程(<literal>dh_auto_install</literal> 觸發的 <literal>make install DESTDIR=...</literal>)裏沒有被安裝的目錄。通常這是由於 <filename>Makefile</filename> 中存在問題。

note: type: Content of: <book><chapter><section><para>
en: Files listed in an <filename>install</filename> file don't need their directories created first.  See <xref linkend="install"/>.
zh_CN: <filename>install</filename> 文件中列出的文件不需要爲其提前創建目錄，參看 <xref linkend="install"/>。

note: type: Content of: <book><chapter><section><para>
en: It is best to try to run the installation first and only use this if you run into trouble.  There is no preceding slash on the directory names listed in the <filename>dirs</filename> file.
zh_CN: 最好是先嘗試安裝，如果遇到了問題再使用這個文件。在 <filename>dirs</filename>中列出的目錄名中不應有前導的 / (斜槓)符號。

note: type: Content of: <book><chapter><section><para>
en: If your package has documentation other than manual and info pages, you should use the <systemitem role="package">doc-base</systemitem> file to register it, so the user can find it with e.g.  <citerefentry> <refentrytitle>dhelp</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>, <citerefentry> <refentrytitle>dwww</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>, or <citerefentry> <refentrytitle>doccentral</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>.
zh_CN: 如果你的軟件包在 man 手冊頁和 info 信息文檔外還有其他文檔，你應該使用 <systemitem role="package">doc-base</systemitem> 文件註冊它們，這樣用戶可以使用例如 <citerefentry> <refentrytitle>dhelp</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>、<citerefentry> <refentrytitle>dwww</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> 或 <citerefentry> <refentrytitle>doccentral</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> 的工具找到它們。

note: type: Content of: <book><chapter><section><para>
en: This usually includes HTML, PS and PDF files, shipped in <filename>/usr/share/doc/<replaceable>packagename</replaceable>/</filename>.
zh_CN: 這通常包括 HTML、PS 和 PDF 檔案，放置在 <filename>/usr/share/doc/<replaceable>packagename</replaceable>/</filename>。

note: type: Content of: <book><chapter><section><para>
en: This is what <systemitem role="package">gentoo</systemitem>'s doc-base file <filename>gentoo.doc-base</filename> looks like:
zh_CN: 以下是 <systemitem role="package">gentoo</systemitem> 的 doc-base 文件 <filename>gentoo.doc-base</filename> 的樣子：

note: type: Content of: <book><chapter><section><para>
en: For information on the file format, see <citerefentry> <refentrytitle>install-docs</refentrytitle> <manvolnum>8</manvolnum> </citerefentry> and the Debian <systemitem role="package">doc-base</systemitem> manual at the local copy <filename>&doc-base;</filename> provided by the <systemitem role="package">doc-base</systemitem> package.
zh_CN: 關於文件格式的更多信息，參看 <citerefentry> <refentrytitle>install-docs</refentrytitle> <manvolnum>8</manvolnum> </citerefentry> 以及 Debian <systemitem role="package">doc-base</systemitem> 手冊頁，在 <filename>&doc-base;</filename> 有一份本地拷貝，這是由 <systemitem role="package">doc-base</systemitem> 軟件包提供的。

note: type: Content of: <book><chapter><section><para>
en: For more details on installing additional documentation, look in <xref linkend="destdir"/>.
zh_CN: 關於安裝附加文件的更多訊息，査看 <xref linkend="destdir"/>。

note: type: Content of: <book><chapter><section><para>
en: This file specifies the file names of documentation files we can have <citerefentry> <refentrytitle>dh_installdocs</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> install into the temporary directory for us.
zh_CN: 這個檔案制定了我們使用 <citerefentry> <refentrytitle>dh_installdocs</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> 安裝到臨時目錄的檔案名。

note: type: Content of: <book><chapter><section><para>
en: By default, it will include all existing files in the top-level source directory that are called <filename>BUGS</filename>, <filename>README*</filename>, <filename>TODO</filename> etc.
zh_CN: 默認情況下它會加入程式碼目錄頂層的所有名爲 <filename>BUGS</filename>、<filename>README*</filename>、<filename>TODO</filename> 等的檔案。

note: type: Content of: <book><chapter><section><para>
en: For <systemitem role="package">gentoo</systemitem>, some other files are also included:
zh_CN: 對於 <systemitem role="package">gentoo</systemitem>，這裏還加入了一些其他文件：

note: type: Content of: <book><chapter><section><para>
en: If your package supplies Emacs files that can be bytecompiled at package installation time, you can use these files to set it up.
zh_CN: 如果你的套件提供可以在安裝時編譯爲字節碼的 Emacs 檔案，你可以使用這些檔案設置。

note: type: Content of: <book><chapter><section><para>
en: They are installed into the temporary directory by <citerefentry> <refentrytitle>dh_installemacsen</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>.
zh_CN: 它們會被 <citerefentry> <refentrytitle>dh_installemacsen</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> 安裝到臨時目錄。

note: type: Content of: <book><chapter><section><para>
en: If you don't need these, remove them.
zh_CN: 如果你不需要這些，就刪除它們。

note: type: Content of: <book><chapter><section><para>
en: The <citerefentry> <refentrytitle>dh_installexamples</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> command installs files and directories listed in this file as example files.
zh_CN: <citerefentry> <refentrytitle>dh_installexamples</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> 會將列出的檔案和目錄作爲範例檔案安裝。

note: type: Content of: <book><chapter><section><title>
en: <filename><replaceable>package</replaceable>.init</filename> and <filename><replaceable>package</replaceable>.default</filename>
zh_CN: <filename><replaceable>package</replaceable>.init</filename> 和 <filename><replaceable>package</replaceable>.default</filename>

note: type: Content of: <book><chapter><section><para>
en: If your package is a daemon that needs to be run at system start-up, you've obviously disregarded my initial recommendation, haven't you? :-)
zh_CN: 如果你的軟件包需要在系統啓動時運行一個守護進程，那麼你顯然沒有按照我最初的建議做事，不是嗎？ :-)

note: type: Content of: <book><chapter><section><para>
en: The <filename><replaceable>package</replaceable>.default</filename> file will be installed as <filename>/etc/default/<replaceable>package</replaceable></filename>.  This file sets defaults that are sourced by the init script.  This <filename><replaceable>package</replaceable>.default</filename> file is most often used to set some default flags or timeouts.  If your init script has certain configurable features, you can set them in the <filename><replaceable>package</replaceable>.default</filename> file, instead of in the init script itself.
zh_CN: <filename><replaceable>package</replaceable>.default</filename> 檔案 會被安裝至 <filename>/etc/default/<replaceable>package</replaceable></filename>。 這個檔案設定被 init 指令碼使用的預設設定。   <filename><replaceable>package</replaceable>.default</filename> 檔案最經常用於設定 一些預設標記或者超時。 如果你的 init 指令碼中有某種 可配置的特性，你可以在 <filename><replaceable>package</replaceable>.default</filename> 檔案中設定它們， 而不是 init 指令碼本身。

note: type: Content of: <book><chapter><section><para>
en: If your upstream program provides a file for the init script, you can either use it or not.  If you don't use their init script then create a new one in <filename><replaceable>package</replaceable>.init</filename>.  However if the upstream init script looks fine and installs in the right place you still need to set up the <filename>rc*</filename> symlinks.  To do this you will need to override <command>dh_installinit</command> in the <filename>rules</filename> file with the following lines:
zh_CN: 如果你的上遊程序中包含了給 init 用的腳本文件，那用不用它都可以。如果不使用，則創建相應的 <filename><replaceable>package</replaceable>.init</filename> 文件；然而如果上游的 init 腳本很好且被安裝到正確的位置，你仍然需要設置 <filename>rc*</filename> 符號鏈接。你需要按照以下的方法在 <filename>rules</filename> 文件中凌駕 <command>dh_installinit</command>：

note: type: Content of: <book><chapter><section><para>
en: If you don't need this, remove the files.
zh_CN: 如果你不需要這些，就刪除它們。

note: type: Content of: <book><chapter><section><para><footnote><para>
en: This replaces the deprecated <citerefentry> <refentrytitle>dh_movefiles</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> command which is configured by the <filename>files</filename> file.
zh_CN: 這取代了已經廢棄的 <citerefentry> <refentrytitle>dh_movefiles</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> 命令，它本是用 <filename>files</filename> 檔案所設定的。

note: type: Content of: <book><chapter><section><para>
en: If there are files that need to be installed into your package but your standard <literal>make install</literal> won't do it, put the filenames and destinations into this <filename>install</filename> file.  They are installed by <citerefentry> <refentrytitle>dh_install</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>.<placeholder type="footnote" id="0"/> You should first check that there is not a more specific tool to use.  For example, documents should be in the <filename>docs</filename> file and not in this one.
zh_CN: 如果你的軟體包需要那些標準的 <literal>make install</literal> 沒有安裝的檔案，你可以把檔名和目標路徑寫入 <filename>install</filename> 檔案，它們將被 <citerefentry> <refentrytitle>dh_install</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> 安裝。<placeholder type="footnote" id="0"/> 你需要首先檢查要安裝的檔案是否有更有針對性的特定工具會對其進行安裝。例如，文件應寫在 <filename>docs</filename> 檔案中安裝，而不是這一個。

note: type: Content of: <book><chapter><section><para>
en: This <filename>install</filename> file has one line per file installed, with the name of the file (relative to the top build directory) then a space then the installation directory (relative to the install directory).  One example of where this is used is if a binary <filename>src/<replaceable>bar</replaceable></filename> is left uninstalled; the <filename>install</filename> file might look like:
zh_CN: 這個 <filename>install</filename> 文件每行安裝一份文件，格式上先是相對於編譯目錄的文件路徑，然後是一個空格，接下來是相對於安裝目錄的目標目錄。例如，假設某個二進制文件 <filename>src/<replaceable>bar</replaceable></filename>沒有被默認安裝，則應讓 <filename>install</filename> 呈現成這樣：

note: type: Content of: <book><chapter><section><para>
en: This means when this package is installed, there will be an executable command <filename>/usr/bin/<replaceable>bar</replaceable></filename>.
zh_CN: 這意味着安裝這個軟件包時，將有一個二進制文件 <filename>/usr/bin/<replaceable>bar</replaceable></filename>.

note: type: Content of: <book><chapter><section><para>
en: Alternatively, this <filename>install</filename> can have the name of the file only without the installation directory when the relative directory path does not change.  This format is usually used for a large package that splits the output of its build into multiple binary packages using <filename><replaceable>package-1</replaceable>.install</filename>, <filename><replaceable>package-2</replaceable>.install</filename>, etc.
zh_CN: 當然，在相對路徑保持不變的情況下 <filename>install</filename> 文件也可以只包含相對的源路徑而不帶目標位置。這樣的格式通常用於使用 <filename><replaceable>package-1</replaceable>.install</filename>、<filename><replaceable>package-2</replaceable>.install</filename> 等將大軟件包分割爲多個二進制包的情況。

note: type: Content of: <book><chapter><section><para>
en: The <command>dh_install</command> command will fall back to looking in <filename>debian/tmp</filename> for files, if it doesn't find them in the current directory (or wherever you've told it to look using <literal>--sourcedir</literal>).
zh_CN: 如果 <command>dh_install</command> 命令沒有在當前目錄(或者你可能使用 <literal>--sourcedir</literal> 參數指定的位置)找到文件，它會回滾至使用 <filename>debian/tmp</filename> 目錄。

note: type: Content of: <book><chapter><section><para>
en: If your package has info pages, you should install them using <citerefentry> <refentrytitle>dh_installinfo</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> by listing them in a <filename><replaceable>package</replaceable>.info</filename> file.
zh_CN: 如果你的軟件包有 info 信息頁，應該使用 <citerefentry> <refentrytitle>dh_installinfo</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> 安裝，要安裝的文件列於 <filename><replaceable>package</replaceable>.info</filename> 文件中。

note: type: Content of: <book><chapter><section><para>
en: If you need to create additional symlinks in package build directories as package maintainer, you should install them using <citerefentry> <refentrytitle>dh_link</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> by listing their full paths of source and destination files in a <filename><replaceable>package</replaceable>.links</filename> file.
zh_CN: 如果你作爲包維護者需要在包中創建附加的符號鏈接，你應該使用 <citerefentry> <refentrytitle>dh_link</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> 來安裝，要安裝的文件完整路徑列於 <filename><replaceable>package</replaceable>.info</filename> 文件中。

note: type: Content of: <book><chapter><section><para>
en: If <systemitem role="package">lintian</systemitem> reports an erroneous diagnostic for a case where Debian policy allows exceptions to some rule, you can use <filename><replaceable>package</replaceable>.lintian-overrides</filename> or <filename>source/lintian-overrides</filename> to quieten it.  Please read the Lintian User's Manual (<filename>&lintian-doc;</filename>) and refrain from abusing this.
zh_CN: 如果 <systemitem role="package">lintian</systemitem> 根據 Debian Policy 的某些規則允許例外從而報告了錯誤診斷，你可以使用 <filename><replaceable>package</replaceable>.lintian-overrides</filename> 或 <filename>source/lintian-overrides</filename> 使其不再警告。請認真閱讀 Lintian 使用者手冊(<filename>&lintian-doc;</filename>) 並避免濫用。

note: type: Content of: <book><chapter><section><para>
en: <filename><replaceable>package</replaceable>.lintian-overrides</filename> is for the binary package named <systemitem role="package"><replaceable>package</replaceable></systemitem> and is installed into <filename>usr/share/lintian/overrides/<replaceable>package</replaceable></filename> by the <command>dh_lintian</command> command.
zh_CN: <filename><replaceable>package</replaceable>.lintian-overrides</filename> 是對於名爲 <systemitem role="package"><replaceable>package</replaceable></systemitem> 的二進制包的有效配置，會由 <command>dh_lintian</command> 命令安裝到<filename>usr/share/lintian/overrides/<replaceable>package</replaceable></filename>。

note: type: Content of: <book><chapter><section><para>
en: <filename>source/lintian-overrides</filename> is for the source package.  This is not installed.
zh_CN: <filename>source/lintian-overrides</filename> 是針對原始碼套件的，不會安裝。

note: type: Content of: <book><chapter><section><para>
en: Your program(s) should have a manual page.  If they don't, you should create them.  The <command>dh_make</command> command creates some template files for manual pages.  These need to be copied and edited for each command missing its manual page.  Please make sure to remove unused templates.
zh_CN: 你的程序應該有 man 手冊頁，如果它們沒有自帶則需要由你來創建。<command>dh_make</command> 命令創建了幾個 man 手冊頁的模板。爲每一個缺手冊的命令拷貝一份模板，並妥善地編寫，並且要刪除未使用的模板。

note: type: Content of: <book><chapter><section><section><para>
en: Manual pages are normally written in <citerefentry> <refentrytitle>nroff</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>.  The <filename>manpage.1.ex</filename> template is written in <command>nroff</command>, too.  See the <citerefentry> <refentrytitle>man</refentrytitle> <manvolnum>7</manvolnum> </citerefentry> manual page for a brief description of how to edit such a file.
zh_CN: man 手冊頁通常是使用 <citerefentry> <refentrytitle>nroff</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> 的格式編寫的。<filename>manpage.1.ex</filename> 模板也是使用 <command>nroff</command> 格式的。參考 <citerefentry> <refentrytitle>man</refentrytitle> <manvolnum>7</manvolnum> </citerefentry> 手冊頁來簡要瞭解如何編輯這個檔案。

note: type: Content of: <book><chapter><section><section><para>
en: The final manual page file name should give the name of the program it is documenting, so we will rename it from <literal>manpage</literal> to <literal>gentoo</literal>.  The file name also includes <literal>.1</literal> as the first suffix, which means it's a manual page for a user command.  Be sure to verify that this section is indeed the correct one.  Here's a short list of manual page sections:
zh_CN: 最終的 man 手冊頁文件的名稱，應當爲其對應的程序名稱。 所以我們將 <literal>manpage</literal> 重命名爲 <literal>gentoo</literal>。 同時，它的文件名當然要以 <literal>.1</literal> 作爲第一個後綴，這表示本手冊頁是爲一個用戶命令而攢寫的。 再者，請校驗本 man 手冊處在正確的節(section)。這個簡短的列表列舉了 man 手冊頁的章節：

note: type: Content of: <book><chapter><section><section><informaltable><tgroup><thead><row><entry>
en: Section
zh_CN: Section(部分)

note: type: Content of: <book><chapter><section><section><informaltable><tgroup><thead><row><entry>
en: Description
zh_CN: Description(描述)

note: type: Content of: <book><chapter><section><section><informaltable><tgroup><thead><row><entry>
en: Notes
zh_CN: Notes(提示)

note: type: Content of: <book><chapter><section><section><informaltable><tgroup><tbody><row><entry>
en: User commands
zh_CN: User commands(用戶命令)

note: type: Content of: <book><chapter><section><section><informaltable><tgroup><tbody><row><entry>
en: Executable commands or scripts
zh_CN: Executable commands or scripts(可執行命令或腳本)

note: type: Content of: <book><chapter><section><section><informaltable><tgroup><tbody><row><entry>
en: System calls
zh_CN: System calls(系統調用)

note: type: Content of: <book><chapter><section><section><informaltable><tgroup><tbody><row><entry>
en: Functions provided by the kernel
zh_CN: Functions provided by the kernel(由內核提供的功能)

note: type: Content of: <book><chapter><section><section><informaltable><tgroup><tbody><row><entry>
en: Library calls
zh_CN: Library calls(庫調用)

note: type: Content of: <book><chapter><section><section><informaltable><tgroup><tbody><row><entry>
en: Functions within system libraries
zh_CN: Functions within system libraries(系統庫中的功能)

note: type: Content of: <book><chapter><section><section><informaltable><tgroup><tbody><row><entry>
en: Special files
zh_CN: Special files(特殊文件)

note: type: Content of: <book><chapter><section><section><informaltable><tgroup><tbody><row><entry>
en: Usually found in <filename>/dev</filename>
zh_CN: 經常在 <filename>/dev</filename> 目錄中出沒

note: type: Content of: <book><chapter><section><section><informaltable><tgroup><tbody><row><entry>
en: File formats
zh_CN: File formats(文件格式)

note: type: Content of: <book><chapter><section><section><informaltable><tgroup><tbody><row><entry>
en: E.g. <filename>/etc/passwd</filename>'s format
zh_CN: 例如， <filename>/etc/passwd</filename> 的格式

note: type: Content of: <book><chapter><section><section><informaltable><tgroup><tbody><row><entry>
en: Games
zh_CN: Games(遊戲)

note: type: Content of: <book><chapter><section><section><informaltable><tgroup><tbody><row><entry>
en: Games or other frivolous programs
zh_CN: Games or other frivolous programs(遊戲或無聊的程序)

note: type: Content of: <book><chapter><section><section><informaltable><tgroup><tbody><row><entry>
en: Macro packages
zh_CN: Macro packages(宏包)

note: type: Content of: <book><chapter><section><section><informaltable><tgroup><tbody><row><entry>
en: Such as <command>man</command> macros
zh_CN: 比如 <command>man</command> 宏

note: type: Content of: <book><chapter><section><section><informaltable><tgroup><tbody><row><entry>
en: System administration
zh_CN: System administrarion(系統管理)

note: type: Content of: <book><chapter><section><section><informaltable><tgroup><tbody><row><entry>
en: Programs typically only run by root
zh_CN: Programs typically only run by root(典型的root專用程序)

note: type: Content of: <book><chapter><section><section><informaltable><tgroup><tbody><row><entry>
en: Kernel routines
zh_CN: Kernel routines(內核慣例)

note: type: Content of: <book><chapter><section><section><informaltable><tgroup><tbody><row><entry>
en: Non-standard calls and internals
zh_CN: Non-standard calls and internals(非標準調用及內部構建)

note: type: Content of: <book><chapter><section><section><para>
en: So <systemitem role="package">gentoo</systemitem>'s man page should be called <filename>gentoo.1</filename>.  If there was no <filename>gentoo.1</filename> man page in the original source, you should create it by renaming the <filename>manpage.1.ex</filename> template to <filename>gentoo.1</filename> and editing it using information from the example and from the upstream docs.
zh_CN: 所以 <systemitem role="package">gentoo</systemitem> 的 man 手冊頁應叫 <filename>gentoo.1</filename>。如果原始代碼中沒有 <filename>gentoo.1</filename> man 手冊頁，你需要重命名 <filename>manpage.1.ex</filename> 模板爲 <filename>gentoo.1</filename> 並按照示例和上游文檔編輯它。

note: type: Content of: <book><chapter><section><section><para><footnote><para>
en: Note that <command>help2man</command>'s placeholder man page will claim that more detailed documentation is available in the info system. If the command is missing an <command>info</command> page, you should manually edit the man page created by the <command>help2man</command> command.
zh_CN: 注意， <command>help2man</command> 的佔位符性質 man 手冊頁會聲稱 在 info 系統中有着更爲詳盡的細節。如果命令 缺少 <command>info</command> 頁，那你應該手工編輯由 <command>help2man</command> 命令創建的 man 手冊頁。

note: type: Content of: <book><chapter><section><section><para>
en: You can use the <command>help2man</command> command to generate a man page out of the <literal>--help</literal> and <literal>--version</literal> output of each program, too.  <placeholder type="footnote" id="0"/>
zh_CN: 你也可以使用 <command>help2man</command> 命令來藉助每個程序的 <literal>--help</literal> 和 <literal>--version</literal> 參數的輸出來生成 man 手冊頁。<placeholder type="footnote" id="0"/>

note: type: Content of: <book><chapter><section><section><para>
en: If on the other hand you prefer writing SGML instead of <command>nroff</command>, you can use the <filename>manpage.sgml.ex</filename> template.  If you do this, you have to:
zh_CN: 如果你希望使用 SGML 而非 <command>nroff</command> 格式編寫 man 手冊頁，可以使用 <filename>manpage.sgml.ex</filename> 模板。如果你要這樣，需要進行以下步驟：

note: type: Content of: <book><chapter><section><section><itemizedlist><listitem><para>
en: rename the file to something like <filename>gentoo.sgml</filename>.
zh_CN: 重命名檔案爲類似 <filename>gentoo.sgml</filename> 的名稱。

note: type: Content of: <book><chapter><section><section><itemizedlist><listitem><para>
en: install the <systemitem role="package">docbook-to-man</systemitem> package
zh_CN: 安裝 <systemitem role="package">docbook-to-man</systemitem> 套件。

note: type: Content of: <book><chapter><section><section><itemizedlist><listitem><para>
en: add <literal>docbook-to-man</literal> to the <literal>Build-Depends</literal> line in the <filename>control</filename> file
zh_CN: 在 <filename>control</filename> 文件中將 <literal>docbook-to-man</literal> 添加到 <literal>Build-Depends</literal> 行。

note: type: Content of: <book><chapter><section><section><itemizedlist><listitem><para>
en: add an <literal>override_dh_auto_build</literal> target to your <filename>rules</filename> file:
zh_CN: 在 <filename>rules</filename> 文件裏添加 <literal>override_dh_auto_build</literal> target：

note: type: Content of: <book><chapter><section><section><para>
en: If you prefer XML over SGML, you can use the <literal>manpage.xml.ex</literal> template.  If you do this, you have to:
zh_CN: 如果你希望使用XML 而非 SGML，可以使用 <literal>manpage.xml.ex</literal> 模板。如果你要這樣，需要進行以下步驟：

note: type: Content of: <book><chapter><section><section><itemizedlist><listitem><para>
en: rename the source file to something like <literal>gentoo.1.xml</literal>
zh_CN: 重命名源檔案爲類似 <literal>gentoo.1.xml</literal> 的名稱。

note: type: Content of: <book><chapter><section><section><itemizedlist><listitem><para>
en: install the <systemitem role="package">docbook-xsl</systemitem> package and an XSLT processor like <systemitem role="package">xsltproc</systemitem> (recommended)
zh_CN: 安裝 <systemitem role="package">docbook-xsl</systemitem> 套件和一個 XSLT 處理器，例如 <systemitem role="package">xsltproc</systemitem> (推薦)。

note: type: Content of: <book><chapter><section><section><itemizedlist><listitem><para>
en: add the <literal>docbook-xsl</literal>, <literal>docbook-xml</literal>, and <literal>xsltproc</literal> packages to the <literal>Build-Depends</literal> line in the <literal>control</literal> file
zh_CN: 在 <literal>control</literal> 文件中將 <literal>docbook-xsl</literal>, <literal>docbook-xml</literal>, 以及 <literal>xsltproc</literal> 軟件包添加到 <literal>Build-Depends</literal> 行。

note: type: Content of: <book><chapter><section><para>
en: If your package has manual pages, you should install them using <citerefentry> <refentrytitle>dh_installman</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> by listing them in a <filename><replaceable>package</replaceable>.manpages</filename> file.
zh_CN: 如果你的軟件包有 man 手冊頁，你應該將它們列在 <filename><replaceable>package</replaceable>.manpages</filename> 文件中以便 <citerefentry> <refentrytitle>dh_installman</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> 進行安裝。

note: type: Content of: <book><chapter><section><para>
en: To install <filename>docs/gentoo.1</filename> as a manpage for the <systemitem role="package">gentoo</systemitem> package, create a <filename>gentoo.manpages</filename> file as follows:
zh_CN: 要將 <filename>doc/gentoo.1</filename> 安裝爲 <systemitem role="package">gentoo</systemitem> 的 man 手冊頁，創建一個 <filename>gentoo.manpages</filename>，內容如下：

note: type: Content of: <book><chapter><section><para>
en: The <citerefentry> <refentrytitle>dh_installchangelogs</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> command installs this.
zh_CN: <citerefentry> <refentrytitle>dh_installchangelogs</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> 命令會安裝這個檔案。

note: type: Content of: <book><chapter><section><para><footnote><para>
en: Despite this use of the <command>bash</command> shorthand expression <filename>{pre,post}{inst,rm}</filename> to indicate these filenames, you should use pure POSIX syntax for these maintainer scripts for compatibility with <command>dash</command> as the system shell.
zh_CN: 儘管這裏使用 <command>bash</command> 表達式速記法 <filename>{pre,post}{inst,rm}</filename> 來指示這些文件名，但你應該使用 純 POSIX 語法來編寫 maintainer scripts，這是爲了兼容 <command>dash</command> 作爲系統 shell 的情況。

note: type: Content of: <book><chapter><section><para>
en: These <filename>postinst</filename>, <filename>preinst</filename>, <filename>postrm</filename>, and <filename>prerm</filename> files <placeholder type="footnote" id="0"/> are called <emphasis>maintainer scripts</emphasis>.  They are scripts which are put in the control area of the package and run by <command>dpkg</command> when your package is installed, upgraded, or removed.
zh_CN: <filename>postinst</filename>、<filename>preinst</filename>、<filename>postrm</filename> 和 <filename>prerm</filename> 文件 <placeholder type="footnote" id="0"/> 被稱爲 <emphasis>maintainer scripts</emphasis>。它們是放置於軟件包控制區域，並由 <command>dpkg</command> 在軟件包安裝、升級或卸載時執行的腳本。

note: type: Content of: <book><chapter><section><para>
en: As a novice maintainer, you should avoid any manual editing of maintainer scripts because they are problematic.  For more information refer to the <ulink url="&policy-mantainerscripts;">Debian Policy Manual, 6 "Package maintainer scripts and installation procedure"</ulink>, and take a look at the example files provided by <command>dh_make</command>.
zh_CN: 作爲一個新維護人員，你應當避免手工編輯 maintainer scripts ，因爲它們常存在各種問題。更多信息請閱讀 <ulink url="&policy-mantainerscripts;">Debian Policy Manual, 6 "Package maintainer scripts and installation procedure"</ulink> 並查看 <command>dh_make</command> 給出的示例文件。

note: type: Content of: <book><chapter><section><para>
en: If you did not listen to me and have created custom maintainer scripts for a package, you should make sure to test them not only for <emphasis role="strong">install</emphasis> and <emphasis role="strong">upgrade</emphasis> but also for <emphasis role="strong">remove</emphasis> and <emphasis role="strong">purge</emphasis>.
zh_CN: 如果你不聽我的勸告，自己爲一個軟件包創建並定製了 maintainer scripts，你必須保證不僅測試 <emphasis role="strong">install</emphasis> 和 <emphasis role="strong">upgrade</emphasis>，還應測試 <emphasis role="strong">remove</emphasis> 和 <emphasis role="strong">purge</emphasis>。

note: type: Content of: <book><chapter><section><para>
en: Upgrades to the new version should be silent and non-intrusive (existing users should not notice the upgrade except by discovering that old bugs have been fixed and perhaps that there are new features).
zh_CN: 升級到新版本應當是靜默且非侵入式的(已有用戶應當只在發現舊的 Bug 被修復或有新特性時注意到升級的變化)。

note: type: Content of: <book><chapter><section><para>
en: When the upgrade is necessarily intrusive (eg., config files scattered through various home directories with totally different structure), you may consider as the last resort switching the package to a safe fallback state (e.g., disabling a service) and providing the proper documentation required by policy (<filename>README.Debian</filename> and <filename>NEWS.Debian</filename>).  Don't bother the user with <command>debconf</command> notes invoked from these maintainer scripts for upgrades.
zh_CN: 當更新必須以非靜默模式進行時(例如分散在多個主目錄中的配置文件都要改爲完全不同的結構時)，作爲最後的手段，你應該考慮將軟件包設置到安全的回退狀態(例如禁用服務)並按照 Debian Policy 提供相應的文檔(<filename>README.Debian</filename> 和 <filename>NEWS.Debian</filename>)。不要在升級時使用 maintainer scripts 觸發 <command>debconf</command> 來打擾用戶。

note: type: Content of: <book><chapter><section><para>
en: The <systemitem role="package">ucf</systemitem> package provides a <emphasis>conffile-like</emphasis> handling infrastructure to preserve user changes for files that may not be labeled as <emphasis>conffiles</emphasis> such as those managed by the maintainer scripts.  This should minimize issues associated with them.
zh_CN: <systemitem role="package">ucf</systemitem> 軟件包提供了 <emphasis>類似 conffile</emphasis> 對可能不標記爲 <emphasis>conffiles</emphasis> 的文件的保留機制，比如由 maintainer scripts 來管理的配置文件。這可以把最大程度減少相關的問題。

note: type: Content of: <book><chapter><section><para>
en: These maintainer scripts are among the Debian enhancements that explain <emphasis role="strong">why people choose Debian</emphasis>.  You must be very careful not to turn them into a source of annoyance.
zh_CN: 這些 maintainer scripts 是 Debian 的增強特性，它們解釋了 <emphasis role="strong">人們爲什麼選擇 Debian</emphasis>。你必須非常小心，保證人們不因此產生煩惱。

note: type: Content of: <book><chapter><section><title>
en: <filename><replaceable>package</replaceable>.symbols</filename>
zh_CN: <filename><replaceable>package</replaceable>.examples</filename>

note: type: Content of: <book><chapter><section><para>
en: Packaging of a library is not easy for a novice maintainer and should be avoided.  Having said it, if your package has libraries, you should have <filename>debian/<replaceable>package</replaceable>.symbols</filename> files. See <xref linkend="librarysymbols"/>.
zh_CN: 對於新維護者而言，打包一個庫非常不易，因此不建議嘗試。 這樣說吧，如果你的軟體包有庫，那你應該處理好 <filename>debian/<replaceable>package</replaceable>.symbols</filename> 檔案。 參見 <xref linkend="librarysymbols"/>.

note: type: Content of: <book><chapter><section><para>
en: The <citerefentry> <refentrytitle>dh_installdocs</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> command installs this.
zh_CN: <citerefentry> <refentrytitle>dh_installdocs</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> 命令會安裝這個檔案。

note: type: Content of: <book><chapter><section><para>
en: The <filename>watch</filename> file format is documented in the <citerefentry> <refentrytitle>uscan</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> manpage.  The <filename>watch</filename> file configures the <command>uscan</command> program (in the <systemitem role="package">devscripts</systemitem> package) to watch the site where you originally got the source.  This is also used by the <ulink url="&debtrack;">Debian Package Tracker</ulink> service.
zh_CN: <filename>watch</filename> 檔案的格式被詳述於 <citerefentry> <refentrytitle>uscan</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> man 手冊頁中。<filename>watch</filename> 檔案配置了 <command>uscan</command> 程式(它在 <systemitem role="package">devscripts</systemitem> 中)以便監視你獲得原始原始碼的網站。它還被用於 <ulink url="&debtrack;">Debian 軟體包跟蹤系統（PTS）</ulink> 服務。

note: type: Content of: <book><chapter><section><para>
en: Here are its contents:
zh_CN: 它的內容如下：

note: type: Content of: <book><chapter><section><para>
en: Normally with a <filename>watch</filename> file, the URL at <literal>&sf-net;/gentoo</literal> is downloaded and searched for links of the form <literal>&lt;a href=...&gt;</literal>.  The basename (just the part after the final <literal>/</literal>) of each linked URL is compared against the Perl regular expression pattern (see <citerefentry> <refentrytitle>perlre</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>)  <literal>gentoo-(.+)\.tar\.gz</literal>.  Out of the files that match, the one with the greatest version number is downloaded and the <command>uupdate</command> program is run to create an updated source tree.
zh_CN: 通常，在按照這個 <filename>watch</filename> 文件執行時，URL <literal>&sf-net;/gentoo</literal> 會被下載，程序會在其中搜索 <literal>&lt;a href=...&gt;</literal>。最後一個斜槓 <literal>/</literal> 後的基本名稱會按照 Perl 正則表達式匹配(參看 <citerefentry> <refentrytitle>perlre</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>)  <literal>gentoo-(.+)\.tar\.gz</literal>。在所有匹配的文件裏，將會下載帶有最大版本號的，此後由 <command>uupdate</command> 程序創建更新的源代碼樹。

note: type: Content of: <book><chapter><section><para>
en: Although this is true for other sites, the SourceForge download service at <ulink url="&sf-net;"/> is an exception.  When the <filename>watch</filename> file has a URL matching the Perl regexp <literal>^http://sf\.net/</literal>, the <command>uscan</command> program replaces it with <literal>&qa-do;watch/sf.php/</literal> and then applies this rule.  The URL redirector service at <ulink url="&qa-do;"/> is designed to offer a stable redirect service to the desired file for any <filename>watch</filename> pattern of the form <literal>&sf-net;/<replaceable>project</replaceable>/<replaceable>tar-name</replaceable>-(.+)\.tar\.gz</literal>.  This solves issues related to periodically changing SourceForge URLs.
zh_CN: 儘管上述內容對於所有站點都適用，但 SourceForge 下載服務(<ulink url="&sf-net;">&sf-net;</ulink>)仍是一個例外。當 <filename>watch</filename> 中包含匹配 Perl 正則表示式 <literal>^http://sf\.net/</literal> 的 URL 時，<command>uscan</command> 程式會將其替換為 <literal>&qa-do;watch/sf.php/</literal> 然後應用此規則。<ulink url="&qa-do;">&qa-do;</ulink> 的 URL 重定向服務被設計用於提供一個穩定的重定向服務以滿足 <filename>watch</filename> 檔案中的 <literal>&sf-net;/<replaceable>project</replaceable>/<replaceable>tar-name</replaceable>-(.+)\.tar\.gz</literal> 形式，這樣解決了 SourceForge 經常性的 URL 變更導致的問題。

note: type: Content of: <book><chapter><section><para>
en: If the upstream offers the cryptographic signature of the tarball, it is recommended to verify its authenticity using the <literal>pgpsigurlmangle</literal> option as described in <citerefentry> <refentrytitle>uscan</refentrytitle><manvolnum>1</manvolnum> </citerefentry>.
zh_CN: 如果上游提供 tarball 的加密簽章，那麼推薦校驗其真實性，可以用 <literal>pgpsigurlmangle</literal> 選項來實現，這一點在 <citerefentry> <refentrytitle>uscan</refentrytitle><manvolnum>1</manvolnum> </citerefentry> 中有描述。

note: type: Content of: <book><chapter><section><para>
en: In the <filename>debian/source/format</filename> file, there should be a single line indicating the desired format for the source package (check <citerefentry> <refentrytitle>dpkg-source</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> for an exhaustive list).  After <literal>squeeze</literal>, it should say either:
zh_CN: 在 <filename>debian/source/format</filename> 中只包含一行，寫明瞭此原始碼套件的格式(査看 <citerefentry> <refentrytitle>dpkg-source</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> 獲得完整列表)。在 <literal>squeeze</literal> 後，它應該是以下二者之一：

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: <literal>3.0 (native)</literal> for native Debian packages or
zh_CN: <literal>3.0 (native)</literal> - Debian 本土軟件或者

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: <literal>3.0 (quilt)</literal> for everything else.
zh_CN: <literal>3.0 (quilt)</literal> - 其他所有軟體

note: type: Content of: <book><chapter><section><para><footnote><para>
en: See <ulink url="&debsrc3;">DebSrc3.0</ulink> for a summary on the switch to the new <literal>3.0 (quilt)</literal> and <literal>3.0 (native)</literal> source formats.
zh_CN: 參看 <ulink url="&debsrc3;">DebSrc3.0</ulink> 以瞭解轉換到新的 <literal>3.0 (quilt)</literal> 和 <literal>3.0 (native)</literal> 源代碼格式時的總結。

note: type: Content of: <book><chapter><section><para><footnote><para>
en: Actually, this new format also supports multiple upstream tarballs and more compression methods.  These are beyond the scope of this document.
zh_CN: 實際上新格式還支持多個上游 tarball 和更多的壓縮方法，但這已超出本文件講述的範圍。

note: type: Content of: <book><chapter><section><para>
en: The newer <literal>3.0 (quilt)</literal> source format records modifications in a <command>quilt</command> patch series within <filename>debian/patches</filename>.  Those changes are then automatically applied during extraction of the source package.  <placeholder type="footnote" id="0"/> The Debian modifications are simply stored in a <filename>debian.tar.gz</filename> archive containing all files under the <filename>debian</filename> directory.  This new format supports inclusion of binary files such as PNG icons by the package maintainer without requiring tricks.  <placeholder type="footnote" id="1"/>
zh_CN: 全新的 <literal>3.0 (quilt)</literal> 原始碼格式將所有修改使用 <command>quilt</command> 補丁系列記錄到 <filename>debian/patches</filename>。這些修改會在解壓原始碼套件時自動應用。<placeholder type="footnote" id="0"/> Debian 修改保存於 <filename>debian.tar.gz</filename> 壓縮檔，其中包含了整個 <filename>debian</filename> 目錄。這個新格式支持直接添加例如 PNG 圖示等的二進位檔案。<placeholder type="footnote" id="1"/>

note: type: Content of: <book><chapter><section><para>
en: When <command>dpkg-source</command> extracts a source package in <literal>3.0 (quilt)</literal> source format, it automatically applies all patches listed in <filename>debian/patches/series</filename>.  You can avoid applying patches at the end of the extraction with the <literal>--skip-patches</literal> option.
zh_CN: <command>dpkg-source</command> 解壓 <literal>3.0 (quilt)</literal> 格式的源碼包時會自動應用所有列於 <filename>debian/patches/series</filename> 的補丁。你可以使用 <literal>--skip-patches</literal> 選項避免在解壓後自動應用補丁。

note: type: Content of: <book><chapter><section><para>
en: When you want to manage Debian packaging activities under a VCS, you typically create one branch (e.g., <literal>upstream</literal>) tracking the upstream source and another branch (e.g., typically <literal>master</literal> for Git)  tracking the Debian package.  For the latter, you usually want to have unpatched upstream source with your <filename>debian/*</filename> files for the Debian packaging to ease merging of the new upstream source.
zh_CN: 如果你希望使用版本控制系統（VCS）管理 Debian 打包活動，你可以建立一個分支(例如叫做 <literal>upstream</literal>) 來跟蹤上游程式碼，和另一個分支(對於 Git 而言典型的是 <literal>master</literal> 分支)來跟蹤你的 Debian 軟體包。對於後者，通常會將未應用補丁的上游程式碼和你的 <filename>debian/*</filename> 檔案放在一起以便容易合併上游的新程式碼。

note: type: Content of: <book><chapter><section><para>
en: After you build a package, the source is normally left patched.  You need to unpatch it manually by running <literal>dquilt pop -a</literal> before committing to the <literal>master</literal> branch.  You can automate this by adding the optional <filename>debian/source/local-options</filename> file containing <literal>unapply-patches</literal>.  This file is not included in the generated source package and changes the local build behavior only.  This file may contain <literal>abort-on-upstream-changes</literal>, too (see <citerefentry> <refentrytitle>dpkg-source</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>).
zh_CN: 在編譯軟件包之後，源代碼通常會被保持在應用補丁後的狀態。你需要手工執行 <literal>quilt pop -a</literal> 來解除這些補丁，然後再提交到 <literal>master</literal> 分支。你可以向 <filename>debian/source/local-options</filename> 文件裏添加一行 <literal>unapply-patches</literal> 來自動實現此目的。這個文件不會被加入到生成的源代碼包，它隻影響本地的編譯構建行爲。這個文件裏還可以包含 <literal>abort-on-upstream-changes</literal> (參看 <citerefentry> <refentrytitle>dpkg-source</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>)。

note: type: Content of: <book><chapter><section><para>
en: The autogenerated files in the source tree can be quite annoying for packaging since they generate meaningless large patch files.  There are custom modules such as <command>dh_autoreconf</command> to ease this problem as described in <xref linkend="customrules"/>.
zh_CN: 在源碼樹下自動生成的文件有時會超級討厭，因爲它們會生成毫無意義巨大無比的補丁文件。 爲了減輕這種問題，可以用一些定製模塊比如 <command>dh_autoreconf</command> ，參見 <xref linkend="customrules"/>。

note: type: Content of: <book><chapter><section><para>
en: You can provide a Perl regular expression to the <literal>--extend-diff-ignore</literal> option argument of <citerefentry> <refentrytitle>dpkg-source</refentrytitle><manvolnum>1</manvolnum> </citerefentry> to ignore changes made to the autogenerated files while creating the source package.
zh_CN: 你可以給 <literal>--extend-diff-ignore</literal> 選項提供一個 Perl 正則表達式作爲 <citerefentry> <refentrytitle>dpkg-source</refentrytitle><manvolnum>1</manvolnum> </citerefentry> 的參數，以此忽略 在創建源碼包時自動生成的文件所發生的變更。

note: type: Content of: <book><chapter><section><para>
en: As a general solution to address this problem of the autogenerated files, you can store such a <command>dpkg-source</command> option argument in the <filename>source/options</filename> file of the source package.  The following will skip creating patch files for <filename>config.sub</filename>, <filename>config.guess</filename>, and <filename>Makefile</filename>.
zh_CN: 作爲這個自動生成文件的問題的通用解決辦法 你可以存放像 <command>dpkg-source</command> 這樣的選項參數到源碼包的 <filename>source/options</filename> 文件中。如下將會跳過給 <filename>config.sub</filename>, <filename>config.guess</filename>, 以及 <filename>Makefile</filename> 創建補丁文件。

note: type: Content of: <book><chapter><section><para>
en: The old <literal>1.0</literal> source format created a single large <filename>diff.gz</filename> file containing package maintenance files in <filename>debian</filename> and patch files for the source.  Such a package is a bit cumbersome to inspect and understand for each source tree modification later.  This is not so nice.
zh_CN: 舊的 <literal>1.0</literal> 源代碼包格式使用單一的大 <filename>diff.gz</filename> 文件爲源碼保存 <filename>debian</filename> 中的維護文件和補丁。這樣的軟件包比較難於在事後檢查和分析。這不是很好。

note: type: Content of: <book><chapter><section><para><footnote><para>
en: Several methods of patch set maintenance have been proposed and are in use for Debian packages.  The <command>quilt</command> system is the preferred maintenance system in use.  Others include <command>dpatch</command>, <command>dbs</command>, and <command>cdbs</command>.  Many of these keep such patches as <filename>debian/patches/*</filename> files.
zh_CN: 這裏已經提出了若干種補丁集維護方法，並且正爲 Debian 軟件包所採用。 <command>quilt</command> 系統是最推薦的維護系統。而其他的有包括 <command>dpatch</command>, <command>dbs</command>, 以及 <command>cdbs</command>。 其中有許多將 補丁保存爲 <filename>debian/patches/*</filename> 文件。

note: type: Content of: <book><chapter><section><para>
en: The newer <literal>3.0 (quilt)</literal> source format stores patches in <filename>debian/patches/*</filename> files using the <command>quilt</command> command.  These patches and other package data which are all contained under the <filename>debian</filename> directory are packaged as the <filename>debian.tar.gz</filename> file.  Since the <command>dpkg-source</command> command can handle <command>quilt</command> formatted patch data in the <literal>3.0 (quilt)</literal> source without the <systemitem role="package">quilt</systemitem> package, it does not need a <literal>Build-Depends</literal> on <systemitem role="package">quilt</systemitem>.  <placeholder type="footnote" id="0"/>
zh_CN: 新的 <literal>3.0 (quilt)</literal> 源碼格式將補丁存儲在 <filename>debian/patches/*</filename> 中，用 <command>quilt</command> 命令。 這些補丁和其他 <filename>debian</filename> 目錄下的打包數據都會被打包成 <filename>debian.tar.gz</filename> 文件。由於 <command>dpkg-source</command> 命令可以處理 <command>quilt</command> 格式的補丁數據 (在格式爲 <literal>3.0 (quilt)</literal> 的源碼中)，而不需要 <systemitem role="package">quilt</systemitem> 軟件包；不需要在 <literal>Build-Depends</literal> 中添加 <systemitem role="package">quilt</systemitem>。  <placeholder type="footnote" id="0"/>

note: type: Content of: <book><chapter><section><para><footnote><para>
en: If you are asking a sponsor to upload your package, this kind of clear separation and documentation of your changes is very important to expedite the package review by your sponsor.
zh_CN: 如果你需要一個 sponsor 上傳你的軟件包，這種情況下，清晰的軟件包分離和記錄更改的文檔對於軟件包審查過程的順利程度非常重要。

note: type: Content of: <book><chapter><section><para>
en: The <command>quilt</command> command is explained in <citerefentry> <refentrytitle>quilt</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>.  It records modifications to the source as a stack of <literal>-p1</literal> patch files in the <filename>debian/patches</filename> directory and the source tree is untouched outside of the <filename>debian</filename> directory.  The order of these patches is recorded in the <filename>debian/patches/series</filename> file.  You can apply (=push), un-apply (=pop), and refresh patches easily.  <placeholder type="footnote" id="0"/>
zh_CN: <command>quilt</command> 命令在 <citerefentry> <refentrytitle>quilt</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> 中有詳細描述。它將對源代碼的修改維護於 <filename>debian/patches</filename> 中一系列 <literal>-p1</literal> 級別的補丁文件中，<filename>debian</filename> 目錄外的文件沒有任何修改。這些補丁的順序記錄於 <filename>debian/patches/series</filename> 文件中。你可以輕鬆地 apply (=push)、un-apply (=pop) 和 refresh 補丁。<placeholder type="footnote" id="0"/>

note: type: Content of: <book><chapter><section><para>
en: For <xref linkend="modify"/>, we created three patches in <filename>debian/patches</filename>.
zh_CN: 在 <xref linkend="modify"/> 中，我們在 <filename>debian/patches</filename> 創建了三個補丁。

note: type: Content of: <book><chapter><section><para>
en: Since Debian patches are located in <filename>debian/patches</filename>, please make sure to set up the <command>dquilt</command> command properly as described in <xref linkend="quiltrc"/>.
zh_CN: 因爲 Debian 補丁位於 <filename>debian/patches</filename>，請確定按照 <xref linkend="quiltrc"/> 中的方法正確配置 <command>dquilt</command>。

note: type: Content of: <book><chapter><section><para>
en: When anyone (including yourself) provides a patch <filename><replaceable>foo</replaceable>.patch</filename> to the source later, modifying a <literal>3.0 (quilt)</literal> source package is quite simple:
zh_CN: 如果在之後有人(包括你自己)提供了一個補丁 <filename><replaceable>foo</replaceable>.patch</filename>，對於 <literal>3.0 (quilt)</literal> 源代碼包格式可以很容易修改：

note: type: Content of: <book><chapter><section><para>
en: The patches stored in the newer <literal>3.0 (quilt)</literal> source format must be <emphasis>fuzz</emphasis> free.  You can ensure this with <literal>dquilt pop -a; while dquilt push; do dquilt refresh; done</literal>.
zh_CN: 用新的 <literal>3.0 (quilt)</literal> 源代碼包格式存儲的補丁必須有 <emphasis>清晰的邊界</emphasis>。你應該通過 <literal>dquilt pop -a; while quilt push; do quilt refresh; done</literal> 來驗證這點。

note: type: Content of: <book><chapter><title>
en: Building the package
zh_CN: 構建套件

note: type: Content of: <book><chapter><para>
en: We should now be ready to build the package.
zh_CN: 現在我們已經爲構建套件做好了準備。

note: type: Content of: <book><chapter><section><title>
en: Complete (re)build
zh_CN: 完整的(重)構建

note: type: Content of: <book><chapter><section><para>
en: In order to perform a complete (re)build of a package properly, you need to make sure you have installed
zh_CN: 爲保證完整的軟件包(重)構建能順利進行，你必須保證系統中已經安裝

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: the <systemitem role="package">build-essential</systemitem> package,
zh_CN: <systemitem role="package">build-essential</systemitem> 套件；

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: packages listed in the <literal>Build-Depends</literal> field (see <xref linkend="control"/>), and
zh_CN: 列於 <literal>Build-Depends</literal> 欄位的套件(參考 <xref linkend="control"/>)；

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: packages listed in the <literal>Build-Depends-indep</literal> field (see <xref linkend="control"/>).
zh_CN: 列於 <literal>Build-Depends-indep</literal> 欄位的套件(參考 <xref linkend="control"/>)。

note: type: Content of: <book><chapter><section><para>
en: Then you issue the following command in the source directory:
zh_CN: 然後在原始碼目錄中執行以下命令：

note: type: Content of: <book><chapter><section><para>
en: This will do everything to make full binary and source packages for you.  It will:
zh_CN: 這樣會自動完成所有從原始碼套件構建二進位套件的工作，包括：

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: clean the source tree (<literal>debian/rules clean</literal>)
zh_CN: 清理原始碼樹(<literal>debian/rules clean</literal>)

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: build the source package (<literal>dpkg-source -b</literal>)
zh_CN: 構建原始碼套件(<literal>dpkg-source -b</literal>)

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: build the program (<literal>debian/rules build</literal>)
zh_CN: 構建程式(<literal>debian/rules build</literal>)

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: build binary packages (<literal>fakeroot debian/rules binary</literal>)
zh_CN: 構建二進位套件(<literal>fakeroot debian/rules binary</literal>)

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: make the <filename>.dsc</filename> file
zh_CN: 製作 <filename>.dsc</filename> 文件

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: make the <filename>.changes</filename> file, using <command>dpkg-genchanges</command>
zh_CN: 用 <command>dpkg-genchanges</command> 命令製作 <filename>.changes</filename> 文件。

note: type: Content of: <book><chapter><section><para><footnote><para>
en: This GPG key must be signed by a Debian developer to get connected to the web of trust and must be registered to <ulink url="&keyring;">the Debian keyring</ulink>.  This enables your uploaded packages to be accepted to the Debian archives.  See <ulink url="&keycreate;">Creating a new GPG key</ulink> and <ulink url="&keysigning; ">Debian Wiki on Keysigning</ulink>.
zh_CN: 爲了連接至信任網絡，本 GPG 密鑰必須被一名 Debian 開發者簽署， 而且必須註冊到 <ulink url="&keyring;">the Debian keyring</ulink> （Debian密鑰環）中。  這樣你上傳的軟件包就能被接受到 Debian 歸檔中了。 參見 <ulink url="&keycreate;">Creating a new GPG key</ulink> 以及 <ulink url="&keysigning; ">Debian Wiki on Keysigning</ulink>。

note: type: Content of: <book><chapter><section><para>
en: If the build result is satisfactory, sign the <filename>.dsc</filename> and <filename>.changes</filename> files with your private GPG key using the <command>debsign</command> command.  You need to enter your secret pass phrase, twice.  <placeholder type="footnote" id="0"/>
zh_CN: 如果構建結果令人滿意，那就用 <command>debsign</command> 命令以你的私有 GPG 金鑰簽署 <filename>.dsc</filename> 檔案和 <filename>.changes</filename> 檔案。你需要輸入密碼兩次。 <placeholder type="footnote" id="0"/>

note: type: Content of: <book><chapter><section><para>
en: For a non-native Debian package, e.g., <systemitem role="package">gentoo</systemitem>, you will see the following files in the parent directory (<filename>~/gentoo</filename>) after building packages:
zh_CN: 對於非本土 Debian 軟件包，比如 <systemitem role="package">gentoo</systemitem>， 構建軟件包之後，你將會在上一級目錄(<filename>~/gentoo</filename>) 中看到下列文件：

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: This is the original upstream source code tarball, merely renamed to the above so that it adheres to the Debian standard.  Note that this was created initially by the command <literal>dh_make -f ../gentoo-0.9.12.tar.gz</literal>.
zh_CN: 這是原始的原始碼 tarball，最初由 <literal>dh_make -f ../gentoo-0.9.12.tar.gz</literal> 命令建立，它的內容與上游 tarball 相同，僅被重新命名以符合 Debian 的標準。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: This is a summary of the contents of the source code.  The file is generated from your <filename>control</filename> file, and is used when unpacking the source with <citerefentry> <refentrytitle>dpkg-source</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>.
zh_CN: 這是一個從 <filename>control</filename> 文件生成的源代碼概要，可被 <citerefentry> <refentrytitle>dpkg-source</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> 程序解包。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: This compressed tarball contains your <filename>debian</filename> directory contents.  Each and every addition you made to the original source code is stored as a <command>quilt</command> patch in <filename>debian/patches</filename>.
zh_CN: 這個壓縮的 Tar 歸檔包含你的 <filename>debian</filename> 目錄內容。其他所有對於源代碼的修改都由 <command>quilt</command> 補丁存儲於 <filename>debian/patches</filename> 中。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para><footnote><para>
en: You can avoid applying <command>quilt</command> patches in the <literal>3.0 (quilt)</literal> source format at the end of the extraction with the <literal>--skip-patches</literal> option.  Alternatively, you can run <literal>dquilt pop -a</literal> after normal operation.
zh_CN: 你可以使用 <literal>--skip-patches</literal> 選項來在正常的提取操作後避免應用 <literal>3.0 (quilt)</literal> 源代碼包格式中的 <command>quilt</command> 補丁。你也可以在正常解壓後使用 <literal>quilt pop -a</literal> 還原這些補丁對源碼的修改。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: If someone else wants to re-create your package from scratch, they can easily do so using the above three files.  The extraction procedure is trivial: just copy the three files somewhere else and run <literal>dpkg-source -x gentoo_0.9.12-1.dsc</literal>.  <placeholder type="footnote" id="0"/>
zh_CN: 如果其他人想要重新構建你的套件，他們可以使用以上三個檔案很容易地完成。只需複製三個檔案，再運行 <literal>dpkg-source -x gentoo_0.9.12-1.dsc</literal>。 <placeholder type="footnote" id="0"/>

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: This is your completed binary package.  You can use <command>dpkg</command> to install and remove this just like any other package.
zh_CN: 這是你的二進位套件，可以使用 <command>dpkg</command> 程式安裝或反安裝它，就像其他套件一樣。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: This file describes all the changes made in the current package revision; it is used by the Debian FTP archive maintenance programs to install the binary and source packages.  It is partly generated from the <filename>changelog</filename> file and the <filename>.dsc</filename> file.
zh_CN: 這個文件描述了當前修訂版本軟件包中的全部變更，它被 Debian FTP 倉庫維護程序用於安裝二進制和源代碼包。它是部分從 <filename>changelog</filename> 和 <filename>.dsc</filename> 文件生成的。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: As you keep working on the package, its behavior will change and new features will be added.  People downloading your package can look at this file and quickly see what has changed.  Debian archive maintenance programs will also post the contents of this file to the <ulink url="&debian-devel-changes-ldo;">debian-devel-changes@lists.debian.org</ulink> mailing list.
zh_CN: 隨着你不斷完善這個軟件包，程序的行爲會發生變化，也會有更多新特性添加進來。下載你軟件包的人可以查看這個文件來快速找到有哪些變化，Debian 倉庫維護程序還會把它的內容發表至 <ulink url="&debian-devel-changes-ldo;">debian-devel-changes@lists.debian.org</ulink> 郵件列表。

note: type: Content of: <book><chapter><section><para>
en: The <filename>gentoo_0.9.12-1.dsc</filename> and <filename>gentoo_0.9.12-1_i386.changes</filename> files must be signed using the <command>debsign</command> command with your private GPG key in the <filename>~/.gnupg/</filename> directory, before uploading them to the Debian FTP archive. The GPG signature provides the proof that these files are really yours, using your public GPG key.
zh_CN: 在上傳到 Debian FTP 倉庫中前，<filename>gentoo_0.9.12-1.dsc</filename> 檔案和 <filename>gentoo_0.9.12-1_i386.changes</filename> 檔案必須用 <command>debsign</command> 命令簽署，其中使用你自己存放在 <filename>~/.gnupg/</filename> 目錄中的 GPG 私鑰。 用你的公鑰，可以令 GPG 簽名證明這些檔案真的是你的。

note: type: Content of: <book><chapter><section><para>
en: The <command>debsign</command> command can be made to sign with your specified secret GPG key ID (good for sponsoring packages) with the following in the <filename>~/.devscripts</filename> file:
zh_CN: <command>debsign</command> 命令可以用來以指定 ID 的 GPG 金鑰進行簽署 （這方便了贊助(sponsor)軟體包）， 只要照著下邊在 <filename>~/.devscripts</filename> 中的內容：

note: type: Content of: <book><chapter><section><para>
en: The long strings of numbers in the <filename>.dsc</filename> and <filename>.changes</filename> files are SHA1/SHA256 checksums for the files mentioned.  Anyone downloading your files can test them with <citerefentry> <refentrytitle>sha1sum</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> or <citerefentry> <refentrytitle>sha256sum</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> and if the numbers don't match, they'll know the file is corrupt or has been tampered with.
zh_CN: <filename>.dsc</filename> 和 <filename>.changes</filename> 文件中很長的數字串是其中提及文件的 SHA1/SHA256 校驗和。下載你軟件包的人可以使用 <citerefentry> <refentrytitle>sha1sum</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> 或 <citerefentry> <refentrytitle>sha256sum</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> 來進行覈對。如果校驗和不符，則說明文件已被損壞或偷換。

note: type: Content of: <book><chapter><section><title>
en: Autobuilder
zh_CN: 自動編譯系統

note: type: Content of: <book><chapter><section><para><footnote><para>
en: The actual autobuilder system involves much more complicated schemes than the one documented here.  Such details are beyond the scope of this document.
zh_CN: 實際中的自動構建系統包含了極爲複雜(比這裏說明的還要複雜)的體制。不過這類細節已經超出本文檔範圍。

note: type: Content of: <book><chapter><section><para>
en: Debian supports many <ulink url="&ports;">ports</ulink> with the <ulink url="&buildd;">autobuilder network</ulink> running <command>buildd</command> daemons on computers of many different architectures.  Although you do not need to do this yourself, you should be aware of what will happen to your packages.  Let's look into roughly how they rebuild your packages for multiple architectures.  <placeholder type="footnote" id="0"/>
zh_CN: Debian 支持非常多的 <ulink url="&ports;">移植(port)</ulink>，同時它有着 <ulink url="&buildd;">自動構建網絡</ulink>，這個網絡在不同體繫結構的計算機上運行着 <command>buildd</command> 守護進程。 雖然你不需要自己做這件事情，你也應該知道在你的軟件包身上發生了什麼。讓我們來簡要地看看他們是如何爲你給多個體繫結構構建軟件包的。 <placeholder type="footnote" id="0"/>

note: type: Content of: <book><chapter><section><para>
en: For <literal>Architecture: any</literal> packages, the autobuilder system performs a rebuild.  It ensures the installation of
zh_CN: 對於 <literal>Architecture: any</literal> 的軟件包，自動編譯系統重構建它們。它確保系統中已經安裝

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: the <systemitem role="package">build-essential</systemitem> package, and
zh_CN: <systemitem role="package">build-essential</systemitem> 套件；

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: packages listed in the <literal>Build-Depends</literal> field (see <xref linkend="control"/>).
zh_CN: 列於 <literal>Build-Depends</literal> 欄位的套件(參考 <xref linkend="control"/>)。

note: type: Content of: <book><chapter><section><para>
en: Then it issues the following command in the source directory:
zh_CN: 然後在原始碼目錄中執行以下命令：

note: type: Content of: <book><chapter><section><para>
en: This will do everything to make architecture dependent binary packages on another architecture.  It will:
zh_CN: 這樣會自動完成從原始碼套件構建平臺依賴二進位套件的工作，包括：

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: build architecture dependent binary packages (<literal>fakeroot debian/rules binary-arch</literal>)
zh_CN: 構建平臺依賴二進位套件(<literal>fakeroot debian/rules binary-arch</literal>)

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: sign the source <filename>.dsc</filename> file, using <command>gpg</command>
zh_CN: 使用 <command>gpg</command> 簽署 <filename>.dsc</filename> 檔案

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: create and sign the upload <filename>.changes</filename> file, using <command>dpkg-genchanges</command> and <command>gpg</command>
zh_CN: 使用 <command>dpkg-genchanges</command> 和 <command>gpg</command> 創建並簽署上傳用的 <filename>.changes</filename> 檔案

note: type: Content of: <book><chapter><section><para>
en: This is why you see your package for other architectures.
zh_CN: 這就是你看到你的套件在其他平臺上可用的原因。

note: type: Content of: <book><chapter><section><para><footnote><para>
en: Unlike under the <systemitem role="package">pbuilder</systemitem> package, the <command>chroot</command> environment under the <systemitem role="package">sbuild</systemitem> package used by the autobuilder system does not enforce the use of a minimal system and may have many leftover packages installed.
zh_CN: 和在 <systemitem role="package">pbuilder</systemitem> 中不同，自動編譯系統使用的 <systemitem role="package">sbuild</systemitem> 軟件包所維護的 <command>chroot</command> 不強制要求最小化的編譯系統，並可能保持很多軟件包始終安裝在其中。

note: type: Content of: <book><chapter><section><para>
en: Although packages listed in the <literal>Build-Depends-Indep</literal> field are required to be installed for our normal packaging work (see <xref linkend="completebuild"/>), they are not required to be installed for the autobuilder system since it builds only architecture dependent binary packages.  <placeholder type="footnote" id="0"/> This distinction between normal packaging and autobuilding procedures is what dictates whether you should record such required packages in the <literal>Build-Depends</literal> or <literal>Build-Depends-Indep</literal> fields of the <filename>debian/control</filename> file (see <xref linkend="control"/>).
zh_CN: 儘管通常的打包工作中 <literal>Build-Depends-indep</literal> 字段中列出的軟件包都需要安裝(參看 <xref linkend="completebuild"/>)，但是在編譯平臺依賴二進制包時它們無需在自動編譯系統上安裝。<placeholder type="footnote" id="0"/>通常打包和自動編譯系統的這種不同爲你指出如何考慮必須的軟件包應如何放在 <filename>debian/control</filename> 文件的 <literal>Build-Depends</literal> 或 <literal>Build-Depends-indep</literal> 域中(參看 <xref linkend="control"/>)。

note: type: Content of: <book><chapter><section><title>
en: <command>debuild</command> command
zh_CN: <command>debuild</command> 命令

note: type: Content of: <book><chapter><section><para>
en: You can automate the build activity around executing the <command>dpkg-buildpackage</command> command package further with the <command>debuild</command> command.  See <citerefentry> <refentrytitle>debuild</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>.
zh_CN: 你可以使用 <command>debuild</command> 命令來進一步自動化 <command>dpkg-buildpackage</command> 的構建過程。參看 <citerefentry> <refentrytitle>debuild</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>

note: type: Content of: <book><chapter><section><para>
en: The <command>debuild</command> command executes the <command>lintian</command> command to make a static check after building the Debian package.  The <command>lintian</command> command can be customized with the following in the <filename>~/.devscripts</filename> file:
zh_CN: <command>debuild</command> 命令會執行 <command>lintian</command> 命令，以在 Debian 軟體包構建結束之後進行靜態檢查。 <command>lintian</command> 命令可以用下邊出現在 <filename>~/.devscripts</filename> 檔案中的項來定製：

note: type: Content of: <book><chapter><section><para>
en: Cleaning the source and rebuilding the package from your user account is as simple as:
zh_CN: 在普通用戶帳號中可以使用以下這樣簡單的命令清理源代碼並重構建軟件包：

note: type: Content of: <book><chapter><section><para>
en: You can clean the source tree as simply as:
zh_CN: 還可以這樣簡單地清理源代碼樹：

note: type: Content of: <book><chapter><section><title>
en: <systemitem role="package">pbuilder</systemitem> package
zh_CN: <systemitem role="package">pbuilder</systemitem> 套件

note: type: Content of: <book><chapter><section><para><footnote><para>
en: Since the <systemitem role="package">pbuilder</systemitem> package is still evolving, you should check the actual configuration situation by consulting the latest official documentation.
zh_CN: 由於 <systemitem role="package">pbuilder</systemitem> 軟件包仍然在進化，你應當查閱最新的官方文檔來檢查實際的配置狀況。

note: type: Content of: <book><chapter><section><para><footnote><para>
en: See <ulink url="&buildd-do;"/> for more on Debian package auto-building.
zh_CN: 參見 <ulink url="&buildd-do;"/> 以獲取更多關於 Debian 軟件包 auto-building 的信息。

note: type: Content of: <book><chapter><section><para>
en: For a clean room (<command>chroot</command>) build environment to verify the build dependencies, the <systemitem role="package">pbuilder</systemitem> package is very useful.  <placeholder type="footnote" id="0"/> This ensures a clean build from the source under the <literal>sid</literal> auto-builder for different architectures and avoids a severity serious FTBFS (Fails To Build From Source) bug which is always in the RC (release critical) category.  <placeholder type="footnote" id="1"/>
zh_CN: 對於使用淨室(<command>chroot</command>)編譯環境來驗證編譯依賴而言，<systemitem role="package">pbuilder</systemitem> 軟件包是非常有用的。<placeholder type="footnote" id="0"/>它確保了軟件包在不同構架上的 <literal>sid</literal> 發行版環境中的自動編譯器中能乾淨地編譯，避免了總是被歸類於 RC (Release Critical，影響發佈)的嚴重 FTBFS (Fails To Build From Source，從源代碼編譯失敗) Bug。<placeholder type="footnote" id="1"/>

note: type: Content of: <book><chapter><section><para>
en: Let's customize the <systemitem role="package">pbuilder</systemitem> package as follows:
zh_CN: 我們通過以下操作來定製 <systemitem role="package">pbuilder</systemitem> 軟件包。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: setting the <filename>/var/cache/pbuilder/result</filename> directory writable by your user account.
zh_CN: 設置 <filename>/var/cache/pbuilder/result</filename> 對當前用戶可寫。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: creating a directory, e.g.  <filename><replaceable>/var/cache/pbuilder/hooks</replaceable></filename>, writable by the user, to place hook scripts in.
zh_CN: 創建一個對用戶可寫的目錄保存鉤子腳本，例如 <filename><replaceable>/var/cache/pbuilder/hooks</replaceable></filename>

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: configuring <filename>~/.pbuilderrc</filename> or <filename>/etc/pbuilderrc</filename> to include the following.
zh_CN: 在 <filename>~/.pbuilderrc</filename> 或 <filename>/etc/pbuilderrc</filename> 中添加以下內容：

note: type: Content of: <book><chapter><section><para>
en: First let's initialize the local <systemitem role="package">pbuilder</systemitem> <command>chroot</command> system as follows:
zh_CN: 首先使用以下命令初始化本地 <systemitem role="package">pbuilder</systemitem> <command>chroot</command> 系統：

note: type: Content of: <book><chapter><section><para>
en: If you already have a completed source package, issue the following commands in the directory where the <filename><replaceable>foo</replaceable>.orig.tar.gz</filename>, <filename><replaceable>foo</replaceable>.debian.tar.gz</filename>, and <filename><replaceable>foo</replaceable>.dsc</filename> files exist to update the local <systemitem role="package">pbuilder</systemitem> <command>chroot</command> system and to build binary packages in it:
zh_CN: 如果你已經創建了源代碼包，在包含 <filename><replaceable>foo</replaceable>.orig.tar.gz</filename>、<filename><replaceable>foo</replaceable>.debian.tar.gz</filename> 和 <filename><replaceable>foo</replaceable>.dsc</filename> 文件的目錄中執行下面的命令來更新 <systemitem role="package">pbuilder</systemitem> <command>chroot</command> 系統以便在其中執行構建：

note: type: Content of: <book><chapter><section><para>
en: The newly built packages without the GPG signatures will be located in <filename>/var/cache/pbuilder/result/</filename> with non-root ownership.
zh_CN: 新構建的無 GPG 簽名的軟件包會被以非 root 屬主放置於 <filename>/var/cache/pbuilder/result/</filename>。

note: type: Content of: <book><chapter><section><para>
en: The GPG signatures on the <filename>.dsc</filename> file and the <filename>.changes</filename> file can be generated as:
zh_CN: <filename>.dsc</filename> 文件和 <filename>.changes</filename> 文件中的 GPG 簽名可以用如下方法生成：

note: type: Content of: <book><chapter><section><para>
en: If you have an updated source tree but have not generated the matching source package, issue the following commands in the source directory where the <filename>debian</filename> directory exists, instead:
zh_CN: 如果你已經更新了源代碼樹但沒有生成對應的源代碼包，在存放 <filename>debian</filename> 目錄的源碼目錄裏執行：

note: type: Content of: <book><chapter><section><para>
en: You can log into its <command>chroot</command> environment with the <literal>pbuilder --login --save-after-login</literal> command and configure it as you wish.  This environment can be saved by leaving its shell prompt with <literal>^D</literal> (Control-D).
zh_CN: 你可以使用 <literal>pbuilder --login --save-after-login</literal> 命令登錄到這個 <command>chroot</command> 環境中並按照需要對其進行設定。通過 <literal>^D</literal> (Control-D)離開這個 shell 時環境會被保存。

note: type: Content of: <book><chapter><section><para><footnote><para>
en: This assumes <literal>HOOKDIR=/var/cache/pbuilder/hooks</literal>.  You can find many examples of hook scripts in the <filename>/usr/share/doc/pbuilder/examples</filename> directory.
zh_CN: 此處默認 <literal>HOOKDIR=/var/cache/pbuilder/hooks</literal>。你可以在 <filename>/usr/share/doc/pbuilder/examples</filename> 目錄中找到很多鉤子腳本的例子。

note: type: Content of: <book><chapter><section><para>
en: The latest version of the <command>lintian</command> command can be executed in the <literal>chroot</literal> environment using the hook script <filename><replaceable>/var/cache/pbuilder/hooks</replaceable>/B90lintian</filename> configured as follows: <placeholder type="footnote" id="0"/>
zh_CN: 最新版的 <command>lintian</command> 命令可以通過設置鉤子腳本 <filename><replaceable>/var/cache/pbuilder/hooks</replaceable>/B90lintian</filename> 在 <literal>chroot</literal> 環境中運行。腳本內容如下：<placeholder type="footnote" id="0"/>

note: type: Content of: <book><chapter><section><para>
en: You need to have access to the latest <literal>sid</literal> environment to build packages properly for <literal>sid</literal>.  In practice, <literal>sid</literal> may be experiencing issues which makes it undesirable for you to migrate your whole system.  The <systemitem role="package">pbuilder</systemitem> package can help you to cope with this kind of situation.
zh_CN: 爲 <literal>sid</literal> 編譯軟件包需要使用 <literal>sid</literal> 環境。在現實中 <literal>sid</literal> 存在很多問題以至於你不願意將整個系統都遷移到其上。<systemitem role="package">pbuilder</systemitem> 軟件包可以在這種情況下很好地解決問題。

note: type: Content of: <book><chapter><section><para><footnote><para>
en: There are some restrictions for such updates of your <literal>stable</literal> package.
zh_CN: 升級你的 <literal>stable</literal> 套件有規定限制。

note: type: Content of: <book><chapter><section><para>
en: You may need to update your <literal>stable</literal> packages after their release for <literal>stable-proposed-updates</literal>, <literal>stable/updates</literal>, etc.  <placeholder type="footnote" id="0"/> For such occasions, the fact that you may be running a <literal>sid</literal> system is not a good enough excuse for failing to update them promptly.  The <systemitem role="package">pbuilder</systemitem> package can help you to access environments of almost any Debian derivative distribution of the same architecture.
zh_CN: 你可能需要在 <literal>stable</literal> 軟體包釋出後為 <literal>stable-proposed-updates</literal>、<literal>stable/updates</literal> 等倉庫升級你維護的軟體包。<placeholder type="footnote" id="0"/>對於這類情況，“我正在執行 <literal>sid</literal> 系統”並不是你不為它們進行升級的充分理由。<systemitem role="package">pbuilder</systemitem> 軟體包可以幫助你使用到相同 CPU 體系結構下幾乎所有 Debian 和 Debian 衍生版系統環境。

note: type: Content of: <book><chapter><section><para>
en: See <ulink url="&pbuilder;"/>, <citerefentry> <refentrytitle>pdebuild</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>, <citerefentry> <refentrytitle>pbuilderrc</refentrytitle> <manvolnum>5</manvolnum> </citerefentry>, and <citerefentry> <refentrytitle>pbuilder</refentrytitle> <manvolnum>8</manvolnum> </citerefentry>.
zh_CN: 參見 <ulink url="&pbuilder;"/>, <citerefentry> <refentrytitle>pdebuild</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>, <citerefentry> <refentrytitle>pbuilderrc</refentrytitle> <manvolnum>5</manvolnum> </citerefentry>, 和 <citerefentry> <refentrytitle>pbuilder</refentrytitle> <manvolnum>8</manvolnum> </citerefentry>.

note: type: Content of: <book><chapter><section><title>
en: <command>git-buildpackage</command> command and similar
zh_CN: <command>git-buildpackage</command> 及其相似命令

note: type: Content of: <book><chapter><section><para><footnote><para>
en: See <ulink url="&debref-vcs;">Version control systems</ulink> for more.
zh_CN: 參見 <ulink url="&debref-vcs;">Version control systems</ulink> 以獲取更多信息。

note: type: Content of: <book><chapter><section><para>
en: If your upstream uses a source code management system (VCS)  <placeholder type="footnote" id="0"/> to maintain their code, you should consider using it as well.  This makes merging and cherry-picking upstream patches much easier.  There are several specialized wrapper script packages for Debian package building for each VCS.
zh_CN: 如果你的上游對源代碼使用版本控制系統(VCS)<placeholder type="footnote" id="0"/>，你也應該考慮使用它們。這會使得合併和提取上游補丁更加簡單。有多個爲不同 VCS 設計的包裝腳本包來協助 Debian 軟件包構建。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: <systemitem role="package">git-buildpackage</systemitem>: a suite to help with Debian packages in Git repositories.
zh_CN: <systemitem role="package">git-buildpackage</systemitem>：幫助維護 Git 倉庫中 Debian 軟件包的套件。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: <systemitem role="package">svn-buildpackage</systemitem>: helper programs to maintain Debian packages with Subversion.
zh_CN: <systemitem role="package">svn-buildpackage</systemitem>：幫助維護 Subversion 倉庫中套件的程式。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: <systemitem role="package">cvs-buildpackage</systemitem>: a set of Debian package scripts for CVS source trees.
zh_CN: <systemitem role="package">cvs-buildpackage</systemitem>：爲 CVS 源代碼樹設計的 Debian 軟件包腳本集。

note: type: Content of: <book><chapter><section><para><footnote><para>
en: <ulink url="&debian-alioth-wiki;">Debian wiki Alioth</ulink> documents how to use the <ulink url="&debian-alioth;">alioth.debian.org</ulink> service.
zh_CN: <ulink url="&debian-alioth-wiki;">Debian wiki Alioth</ulink> 這裏說明瞭 如何使用 <ulink url="&debian-alioth;">alioth.debian.org</ulink> 服務。

note: type: Content of: <book><chapter><section><para>
en: Use of <systemitem role="package">git-buildpackage</systemitem> is becoming quite popular for Debian Developers to manage Debian packages with the Git server on <ulink url="&debian-alioth;">alioth.debian.org</ulink>. <placeholder type="footnote" id="0"/> This package offers many commands to <emphasis>automate</emphasis> packaging activities:
zh_CN: <systemitem role="package">git-buildpackage</systemitem> 的使用 在 Debian 開發者之中非常流行， 它可以使用 <ulink url="&debian-alioth;">alioth.debian.org</ulink> 上的 Git 服務器來管理 Debian 軟件包。 <placeholder type="footnote" id="0"/> 這個軟件包提供了許多命令來 <emphasis>自動化</emphasis> 打包操作：

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: <citerefentry> <refentrytitle>gbp-import-dsc</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>: import a previous Debian package to a Git repository.
zh_CN: <citerefentry> <refentrytitle>gbp-import-dsc</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>: 將一個早先的 Debian 軟體包匯入到 Git 倉庫中。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: <citerefentry> <refentrytitle>gbp-import-orig</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>: import a new upstream tar to a Git repository.
zh_CN: <citerefentry> <refentrytitle>gbp-import-orig</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>: 將上游 tar 檔案匯入到 Git 倉庫中。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: <citerefentry> <refentrytitle>gbp-dch</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>: generate the Debian changelog from Git commit messages.
zh_CN: <citerefentry> <refentrytitle>gbp-dch</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>: 用 Git commit 資訊來生成 Debian changelog。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: <citerefentry> <refentrytitle>git-buildpackage</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>: build Debian packages from a Git repository.
zh_CN: <citerefentry> <refentrytitle>git-buildpackage</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>: 從 Git 倉庫中構建 Debian 軟件包。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: <citerefentry> <refentrytitle>git-pbuilder</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>: build Debian packages from a Git repository using <command>pbuilder</command>/<command>cowbuilder</command>.
zh_CN: <citerefentry> <refentrytitle>git-pbuilder</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>:  用 <command>pbuilder</command>/<command>cowbuilder</command> 從 Git 倉庫來構建 Debian 軟件包。

note: type: Content of: <book><chapter><section><para>
en: These commands use 3 branches to track packaging activity:
zh_CN: 這些命令使用 3 個分支來跟蹤打包操作：

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: <literal>main</literal> for Debian package source tree.
zh_CN: <literal>main</literal> 用於 Debian 軟件源碼樹。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: <literal>upstream</literal> for upstream source tree.
zh_CN: <literal>upstream</literal> 用於上游源碼樹。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para><footnote><para>
en: The <literal>--pristine-tar</literal> option invokes the <command>pristine-tar</command> command, which can regenerate an exact copy of a pristine upstream tarball using only a small binary delta file and the contents of the tarball that are typically kept in an <literal>upstream</literal> branch in the VCS.
zh_CN: <literal>--pristine-tar</literal> 選項會呼叫 <command>pristine-tar</command> 命令，它能利用一個很小的二進位制差量檔案以及在版本控制系統中某個分支內儲存的上游檔案內容（分支名通常為 <literal>upstream</literal>）重新生成與上游 tarball 完全相同的一份副本。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: <literal>pristine-tar</literal> for upstream tarball generated by the <literal>--pristine-tar</literal> option.<placeholder type="footnote" id="0"/>
zh_CN: 由 <literal>--pristine-tar</literal> 爲上游 tarball 生成的<literal>pristine-tar</literal> 。<placeholder type="footnote" id="0"/>

note: type: Content of: <book><chapter><section><para><footnote><para>
en: Here are some web resources available for advanced audiences.
zh_CN: 這裏有一些給高級讀者參考的網頁資源。

note: type: Content of: <book><chapter><section><para><footnote><itemizedlist><listitem><para>
en: Building Debian Packages with git-buildpackage (<filename>&git-buildpackage-doc;</filename>)
zh_CN: 用 git-buildpackage (<filename>&git-buildpackage-doc;</filename>) 構建 Debian 軟件包

note: type: Content of: <book><chapter><section><para>
en: You can configure <systemitem role="package">git-buildpackage</systemitem> with <filename>~/.gbp.conf</filename>. See <citerefentry> <refentrytitle>gbp.conf</refentrytitle> <manvolnum>5</manvolnum> </citerefentry>.  <placeholder type="footnote" id="0"/>
zh_CN: 你可以設置 <systemitem role="package">git-buildpackage</systemitem>，通過修改 <filename>~/.gbp.conf</filename> 文件。參見 <citerefentry> <refentrytitle>gbp.conf</refentrytitle> <manvolnum>5</manvolnum> </citerefentry>.  <placeholder type="footnote" id="0"/>

note: type: Content of: <book><chapter><section><title>
en: Quick rebuild
zh_CN: 快速重構建

note: type: Content of: <book><chapter><section><para><footnote><para>
en: Environment variables that are normally configured to proper values are not set by this method.  Never create real packages to be uploaded using this <emphasis role="strong">quick</emphasis> method.
zh_CN: 常規情形下被配置好的環境變數在此時不會被自動設定。永遠不要將使用這個 <emphasis role="strong">快速</emphasis> 方法構建的軟體包上傳到任何地方。

note: type: Content of: <book><chapter><section><para>
en: With a large package, you may not want to rebuild from scratch every time while you're tuning details in <filename>debian/rules</filename>.  For testing purposes, you can make a <filename>.deb</filename> file without rebuilding the upstream sources like this<placeholder type="footnote" id="0"/>:
zh_CN: 對於很大的軟件包，在調試 <filename>debian/rules</filename> 的過程中你可能不想每次都對整個軟件包進行重構建。僅用於測試目的，你可以不重新構建源代碼包而使用以下的方法創建 <filename>.deb</filename> 文件<placeholder type="footnote" id="0"/>：

note: type: Content of: <book><chapter><section><para>
en: Or simply do the following to see if it builds or not:
zh_CN: 或者可以通過以下方法驗證它是否能通過編譯：

note: type: Content of: <book><chapter><section><para>
en: Once you are finished with your tuning, remember to rebuild following the proper procedure.  You may not be able to upload correctly if you try to upload <filename>.deb</filename> files built this way.
zh_CN: 一旦完成了調試，記住要按照前面所將的正常過程重構建你的套件。你可能無法正常上傳用此種方法構建的 <filename>.deb</filename> 檔案。

note: type: Content of: <book><chapter><section><title>
en: Command hierarchy
zh_CN: 命令層級

note: type: Content of: <book><chapter><section><para>
en: Here is a quick summary of how many commands to build packages fit together in the command hierarchy. There are many ways to do the same thing.
zh_CN: 這裏有一個簡練的總結，關於在命令層次結構中有多少用於構建軟件包的命令能夠組合到一起。做這件事情的方法非常多。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: <filename>debian/rules</filename> = maintainer script for the package building
zh_CN: <filename>debian/rules</filename> = 軟件包構建過程的專用 maintainer script

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: <command>dpkg-buildpackage</command> = core of the package building tool
zh_CN: <command>dpkg-buildpackage</command> = 軟件包構建之核心工具

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: <command>debuild</command> = <command>dpkg-buildpackage</command> + <command>lintian</command> (build under the sanitized environment variables)
zh_CN: <command>debuild</command> = <command>dpkg-buildpackage</command> + <command>lintian</command> (在乾淨的環境變量下構建)

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: <command>pbuilder</command> = core of the Debian chroot environment tool
zh_CN: <command>pbuilder</command> = Debian chroot 環境核心工具

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: <command>pdebuild</command> = <command>pbuilder</command> + <command>dpkg-buildpackage</command> (build in the chroot)
zh_CN: <command>pdebuild</command> = <command>pbuilder</command> + <command>dpkg-buildpackage</command> (在chroot環境中構建)

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: <command>cowbuilder</command> = speed up the <command>pbuilder</command> execution
zh_CN: <command>cowbuilder</command> = 加速 <command>pbuilder</command> 執行

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: <command>git-pbuilder</command> = the easy-to-use commandline syntax for <command>pdebuild</command> (used by <command>gbp buildpackage</command>)
zh_CN: <command>git-pbuilder</command> = 命令行語法友好<command>pdebuild</command> (被 <command>gbp buildpackage</command> 使用)

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: <command>gbp</command> = manage the Debian source under the git repo
zh_CN: <command>gbp</command> = 在 Git 倉庫中管理 Debian 源碼

note: type: Content of: <book><chapter><section><para>
en: Although use of higher level commands such as <command>gbp buildpackage</command> and <command>pbuilder</command> ensures the perfect package building environment, it is essential to understand how lower level commands such as <filename>debian/rules</filename> and <command>dpkg-buildpackage</command> are executed under them.
zh_CN: 即便像 <command>gbp buildpackage</command> 和 <command>pbuilder</command> 這樣的高級命令的應用可以確保完美的軟件包 構建環境，瞭解像 <filename>debian/rules</filename> 和 <command>dpkg-buildpackage</command> 這樣的低級命令行工具如何被它們執行也是至關重要的。

note: type: Content of: <book><chapter><title>
en: Checking the package for errors
zh_CN: 檢査套件中的錯誤

note: type: Content of: <book><chapter><para>
en: There are some techniques you should know for checking a package for errors before uploading it to the public archives.
zh_CN: 在上傳軟件包到公共倉庫前，你還需要知道一些檢查軟件包錯誤的技巧。

note: type: Content of: <book><chapter><para>
en: It's also a good idea to carry out testing on a machine other than your own.  You must watch closely for any warnings or errors for all the tests described here.
zh_CN: 不僅在自己的機器上測試總是一個好主意。你必須謹慎地對待以下敘述的測試中顯示的任何一個警告或錯誤信息。

note: type: Content of: <book><chapter><section><title>
en: Suspicious changes
zh_CN: 詭異可疑的改動

note: type: Content of: <book><chapter><section><para>
en: If you find a new autogenerated patch file such as <filename>debian-changes-*</filename> in the <filename>debian/patches</filename> directory after building your non-native Debian package in <literal>3.0 (quilt)</literal> format, chances are you changed some files by accident or the build script modified the upstream source.  If it is your mistake, fix it.  If it is caused by the build script, fix the root cause with <command>dh-autoreconf</command> as in <xref linkend="customrules"/> or work around it with <filename>source/options</filename> as in <xref linkend="sourceopt"/>.
zh_CN: 如果你在構建以 <literal>3.0 (quilt)</literal> 格式的非本土 Debian 軟件包後，發現一個新的自動生成的補丁，比如 <filename>debian-changes-*</filename> 在 <filename>debian/patches</filename> 目錄中有可能是你不小心更改了一些文件，或者構建腳本修改了上游源代碼。如果這是你犯下的小錯誤，那就修復它。如果這是構建腳本乾的好事，那就用 <command>dh-autoreconf</command> 來解決其根本問題，可參照 <xref linkend="customrules"/> 或者可以變通一下， 處理 <filename>source/options</filename> 文件，參照 <xref linkend="sourceopt"/>.

note: type: Content of: <book><chapter><section><title>
en: Verifying a package's installation
zh_CN: 校驗軟件包安裝過程

note: type: Content of: <book><chapter><section><para>
en: You must test your package for whether it installs without problems.  The <citerefentry> <refentrytitle>debi</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> command helps you to test installing all the generated binary packages.
zh_CN: 你必須測試你的軟體包看是否存在安裝問題。<citerefentry> <refentrytitle>debi</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> 命令可以幫助你測試所有生成的二進位制軟體包。

note: type: Content of: <book><chapter><section><para>
en: To prevent installation problems on different systems, you must make sure that there are no filenames conflicting with other existing packages, using the <filename>Contents-<replaceable>i386</replaceable></filename> file downloaded from the Debian archive.  The <command>apt-file</command> command may be handy for this task.  If there are collisions, please take action to avoid this real problem, whether by renaming the file, moving a common file to a separate package that multiple packages can depend on, using the alternatives mechanism (see <citerefentry><refentrytitle>update-alternatives</refentrytitle> <manvolnum>1</manvolnum></citerefentry>) in coordination with the maintainers of other affected packages, or declaring a <literal>Conflicts</literal> relationship in the <filename>debian/control</filename> file.
zh_CN: 你必須使用從 Debian 倉庫下載的 <filename>Contents-<replaceable>i386</replaceable></filename> 檔案校驗是否在與不同包存在檔案衝突，以阻止在不同的系統上發生安裝故障。<command>apt-file</command> 命令正適合完成這個任務。如果存在衝突，請透過重新命名、將公共檔案分離到另一個受其他包依賴的包中、與受影響的軟體包的維護者合作使用 alternatives 機制來避免實際問題(參看 <citerefentry> <refentrytitle>update-alternatives</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>)或在 <filename>debian/control</filename> 檔案中設定 <literal>Conflicts</literal> 條目以宣告衝突關係等方式避免問題的發生。

note: type: Content of: <book><chapter><section><title>
en: Verifying a package's maintainer scripts
zh_CN: 檢驗軟件包的 maintainer scripts

note: type: Content of: <book><chapter><section><para>
en: All maintainer scripts (that is, <filename>preinst</filename>, <filename>prerm</filename>, <filename>postinst</filename>, and <filename>postrm</filename> files) are hard to write correctly unless they are auto-generated by the <systemitem role="package">debhelper</systemitem> programs.  So do not use them if you are a novice maintainer (see <xref linkend="maintscripts"/>).
zh_CN: 所有 maintainer scripts，包括 <filename>preinst</filename>、<filename>prerm</filename>、<filename>postinst</filename> 和 <filename>postrm</filename> 文件，都非常難以編寫，除非是由 <systemitem role="package">debhelper</systemitem> 程序自動生成的。如果你是新維護人員則不要使用它們(參看 <xref linkend="maintscripts"/>)。

note: type: Content of: <book><chapter><section><para>
en: If the package makes use of these non-trivial maintainer scripts, be sure to test not only for install but also for remove, purge, and upgrade processes.  Many maintainer script bugs show up when packages are removed or purged.  Use the <command>dpkg</command> command as follows to test them:
zh_CN: 如果軟件包使用了這些需要嚴格測試的 maintainer scripts，請確保不僅測試 install，還要測試 remove、purge 和 upgrade。很多 maintainer scripts 的 Bug 都顯現於卸載或徹底刪除軟件包時。使用 <command>dpkg</command> 命令按以下方法來測試它們：

note: type: Content of: <book><chapter><section><para>
en: This should be done with sequences such as the following:
zh_CN: 整個測試過程應按照以下操作序列完成：

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: install the previous version (if needed).
zh_CN: 如果可能，安裝前一個版本的套件；

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: upgrade it from the previous version.
zh_CN: 從前一個版本升級套件；

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: downgrade it back to the previous version (optional).
zh_CN: 降級套件到前一個版本(可選)；

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: purge it.
zh_CN: 徹底刪除該套件；

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: install the new package.
zh_CN: 全新安裝該套件；

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: remove it.
zh_CN: 反安裝該套件；

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: install it again.
zh_CN: 再次安裝該套件。

note: type: Content of: <book><chapter><section><para>
en: If this is your first package, you should create dummy packages with different versions to test your package in advance to prevent future problems.
zh_CN: 如果這是你的第一個套件，你應該使用其他版本號創建一個測試用的套件來完成升級測試，這樣可以避免將來的問題。

note: type: Content of: <book><chapter><section><para>
en: Bear in mind that if your package has previously been released in Debian, people will often be upgrading to your package from the version that was in the last Debian release.  Remember to test upgrades from that version too.
zh_CN: 請牢記如果你的套件已經在以往版本的 Debian 中發佈，人們通常會從最近發佈的 Debian 發佈裏的版本升級，所以也要測試從那個版本升級到當前的版本。

note: type: Content of: <book><chapter><section><para>
en: Although downgrading is not officially supported, supporting it is a friendly gesture.
zh_CN: 儘管降級沒有被正式支持，支持它也總是友好的。

note: type: Content of: <book><chapter><section><title>
en: Using <systemitem role="package">lintian</systemitem>
zh_CN: 使用 <systemitem role="package">lintian</systemitem>

note: type: Content of: <book><chapter><section><para><footnote><para>
en: You do not need to provide the <command>lintian</command> option <literal>-i -I --show-overrides</literal> if you customized <filename>/etc/devscripts.conf</filename> or <filename>~/.devscripts</filename> as described in <xref linkend="debuild"/>.
zh_CN: 如果你按照 <xref linkend="debuild"/> 中的敘述定義了 <filename>/etc/devscripts.conf</filename> 或 <filename>~/.devscripts</filename> 檔案，就不需要再添加 <command>lintian</command> 選項 <literal>-i -I --show-overrides</literal>。

note: type: Content of: <book><chapter><section><para>
en: Run <citerefentry> <refentrytitle>lintian</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> on your <filename>.changes</filename> file.  The <command>lintian</command> command runs many test scripts to check for many common packaging errors.  <placeholder type="footnote" id="0"/>
zh_CN: 使用 <citerefentry> <refentrytitle>lintian</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> 檢査你的 <filename>.changes</filename> 檔案。<command>lintian</command> 命令會運行很多測試腳本來檢査常見的打包錯誤。<placeholder type="footnote" id="0"/>

note: type: Content of: <book><chapter><section><para>
en: Of course, replace the filename with the name of the <filename>.changes</filename> file generated for your package.  The output of the <command>lintian</command> command uses the following flags:
zh_CN: 當然，要替換你自己軟件包所生成的 <filename>.changes</filename> 文件的文件名。<command>lintian</command> 命令的輸出常帶有以下幾種標記：

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: <literal>E:</literal> for error; a sure policy violation or packaging error.
zh_CN: <literal>E:</literal> 代表錯誤：確定違反了 Debian Policy 或是一個肯定的打包錯誤。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: <literal>W:</literal> for warning; a possible policy violation or packaging error.
zh_CN: <literal>W:</literal> 代表警告：可能違反了 Debian Policy 或是一個可能的打包錯誤。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: <literal>I:</literal> for info; information on certain aspects of packaging.
zh_CN: <literal>I:</literal> 代表信息：對於特定打包類別的信息。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: <literal>N:</literal> for note; a detailed message to help your debugging.
zh_CN: <literal>N:</literal> 代表註釋：幫助你調試的詳細訊息。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: <literal>O:</literal> for overridden; a message overridden by the <filename>lintian-overrides</filename> files but displayed by the <literal>--show-overrides</literal> option.
zh_CN: <literal>O:</literal> 代表已覆蓋：一個被 <filename>lintian-overrides</filename> 檔案覆蓋的訊息，但由於使用 <literal>--show-overrides</literal> 選項而顯示。

note: type: Content of: <book><chapter><section><para>
en: When you see warnings, tune the package to avoid them or verify that the warnings are spurious.  If spurious, set up <filename>lintian-overrides</filename> files as described in <xref linkend="lintian"/>.
zh_CN: 對於警告，你應該改進軟件包或者檢查警告是否的確無意義。如果確定沒有意義，則按照 <xref linkend="lintian"/> 中的敘述使用 <filename>lintian-overrides</filename> 文件將其覆蓋。

note: type: Content of: <book><chapter><section><para>
en: Note that you can build the package with <command>dpkg-buildpackage</command> and run <command>lintian</command> on it in one command, if you use <citerefentry> <refentrytitle>debuild</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> or <citerefentry> <refentrytitle>pdebuild</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>.
zh_CN: 注意，你可以用 <command>dpkg-buildpackage</command> 來構建軟件包，並執行 <command>lintian</command>，只要你使用了 <citerefentry> <refentrytitle>debuild</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> 或 <citerefentry> <refentrytitle>pdebuild</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>.

note: type: Content of: <book><chapter><section><title>
en: The <command>debc</command> command
zh_CN: <command>debc</command> 命令

note: type: Content of: <book><chapter><section><para>
en: You can list files in the binary Debian package with the <citerefentry> <refentrytitle>debc</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> command.
zh_CN: 你可以使用 <citerefentry> <refentrytitle>debc</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> 命令列出一個二進制 Debian 軟件包中的文件。

note: type: Content of: <book><chapter><section><title>
en: The <command>debdiff</command> command
zh_CN: <command>debdiff</command> 命令

note: type: Content of: <book><chapter><section><para>
en: You can compare file contents in two source Debian packages with the <citerefentry> <refentrytitle>debdiff</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> command.
zh_CN: 你可以使用 <citerefentry> <refentrytitle>debdiff</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> 命令比較兩個 Debian 原始碼套件的內容。

note: type: Content of: <book><chapter><section><para>
en: You can also compare file lists in two sets of binary Debian packages with the <citerefentry> <refentrytitle>debdiff</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> command.
zh_CN: 你還可以使用 <citerefentry> <refentrytitle>debdiff</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> 命令比較兩個 Debian 二進位套件的檔案列表。

note: type: Content of: <book><chapter><section><para>
en: These are useful to identify what has been changed in the source packages and to check for inadvertent changes made when updating binary packages, such as unintentionally misplacing or removing files.
zh_CN: 這個命令對於檢查源代碼包中哪些文件被修改了非常有用，還可以發現二進制包中是否有文件在更新過程中發生的變動，比如被意外替換或刪除。

note: type: Content of: <book><chapter><section><title>
en: The <command>interdiff</command> command
zh_CN: <command>interdiff</command> 命令

note: type: Content of: <book><chapter><section><para>
en: You can compare two <filename>diff.gz</filename> files with the <citerefentry> <refentrytitle>interdiff</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> command.  This is useful for verifying that no inadvertent changes were made to the source by the maintainer when updating packages in the old <literal>1.0</literal> source format.
zh_CN: 你可以使用 <citerefentry> <refentrytitle>interdiff</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> 命令比較兩個 <filename>diff.gz</filename> 檔案。這對於更新使用舊的 <literal>1.0</literal> 原始碼格式的套件時，檢査是否有意外的變更非常有用。

note: type: Content of: <book><chapter><section><para>
en: The new <literal>3.0</literal> source format stores changes in multiple patch files as described in <xref linkend="patches"/>.  You can trace changes of each <filename>debian/patches/*</filename> file using <command>interdiff</command>, too.
zh_CN: 新的 <literal>3.0</literal> 源碼格式會將更改保存在多個補丁文件中， 如 <xref linkend="patches"/> 所述。 你也可以使用 <command>interdiff</command> 跟蹤 每一個 <filename>debian/patches/*</filename> 文件中的改動。

note: type: Content of: <book><chapter><section><title>
en: The <command>mc</command> command
zh_CN: <command>mc</command> 命令

note: type: Content of: <book><chapter><section><para>
en: Many of these file inspection operations can be made into an intuitive process by using a file manager like <citerefentry> <refentrytitle>mc</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> which will let you browse not only the contents of <filename>*.deb</filename> package files but also <filename>*.udeb</filename>, <filename>*.debian.tar.gz</filename>, <filename>*.diff.gz</filename>, and <filename>*.orig.tar.gz</filename> files.
zh_CN: 很多檔案檢査操作可以通過使用類似 <citerefentry> <refentrytitle>mc</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> 的檔案管理器來完成，它可以幫助你直接査看 <filename>*.deb</filename> 檔案的內容，除此之外還可以用於 <filename>*.udeb</filename>、<filename>*.debian.tar.gz</filename>、<filename>*.diff.gz</filename> 和 <filename>*.orig.tar.gz</filename> 檔案。

note: type: Content of: <book><chapter><section><para>
en: Be on the lookout for extra unneeded files or zero length files, both in the binary and source package.  Often cruft doesn't get cleaned up properly; adjust your <filename>rules</filename> file to compensate for this.
zh_CN: 還要檢查在二進制包和源代碼包中是否有不需要的文件或者空文件。這些文件經常沒有被正確清理，如果存在這種情況，要調整 <filename>rules</filename> 文件進行處理。

note: type: Content of: <book><chapter><title>
en: Updating the package
zh_CN: 更新套件

note: type: Content of: <book><chapter><para>
en: After you release a package, you will soon need to update it.
zh_CN: 一旦你發佈了一個軟件包，在之後的某個時間裏就需要對它進行更新。

note: type: Content of: <book><chapter><section><title>
en: New Debian revision
zh_CN: 新的 Debian 版本

note: type: Content of: <book><chapter><section><para>
en: Let's say that a bug report was filed against your package as <literal>#654321</literal>, and it describes a problem that you can solve.  Here's what you need to do to create a new Debian revision of the package:
zh_CN: 假設你收到一個針對你的軟件包報告的 Bug ，其編號爲 <literal>#654321</literal>，它描述了一個你可以解決的問題。要創建軟件包的一個新 Debian 修訂版本，你需要：

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: If this is to be recorded as a new patch, do the following:
zh_CN: 如果要將它記錄於新的補丁中，這樣做：

note: type: Content of: <book><chapter><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: <literal>dquilt new <replaceable>bugname.patch</replaceable></literal> to set the patch name;
zh_CN: <literal>dquilt new <replaceable>bugname.patch</replaceable></literal> 設置補丁名稱；

note: type: Content of: <book><chapter><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: <literal>dquilt add <replaceable>buggy-file</replaceable></literal> to declare the file to be modified;
zh_CN: <literal>dquilt add <replaceable>buggy-file</replaceable></literal> 聲明文件將被更改；

note: type: Content of: <book><chapter><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: Correct the problem in the package source for the upstream bug;
zh_CN: 修正套件程式碼中的上游 Bug；

note: type: Content of: <book><chapter><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: <literal>dquilt refresh</literal> to record it to <filename><replaceable>bugname.patch</replaceable></filename>;
zh_CN: <literal>dquilt refresh</literal> 將修改記錄到 <filename><replaceable>bugname.patch</replaceable></filename>；

note: type: Content of: <book><chapter><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: <literal>dquilt header -e</literal> to add its description;
zh_CN: <literal>dquilt header -e</literal> 添加對它的描述；

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: If this is to update an existing patch, do the following:
zh_CN: 如果是更新一個已存在的補丁，這樣做：

note: type: Content of: <book><chapter><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: <literal>dquilt pop <replaceable>foo.patch</replaceable></literal> to recall the existing <filename><replaceable>foo.patch</replaceable></filename>;
zh_CN: <literal>dquilt pop <replaceable>foo.patch</replaceable></literal> 重現已存在的 <filename><replaceable>foo.patch</replaceable></filename>；

note: type: Content of: <book><chapter><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: Correct the problem in the old <filename><replaceable>foo.patch</replaceable></filename>;
zh_CN: 修正舊的 <filename><replaceable>foo.patch</replaceable></filename> 中的問題；

note: type: Content of: <book><chapter><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: <literal>dquilt refresh</literal> to update <filename><replaceable>foo.patch</replaceable></filename>;
zh_CN: <literal>dquilt refresh</literal> 更新 <filename><replaceable>foo.patch</replaceable></filename>；

note: type: Content of: <book><chapter><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: <literal>dquilt header -e</literal> to update its description;
zh_CN: <literal>dquilt header -e</literal> 更新對它的描述；

note: type: Content of: <book><chapter><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: <literal>while dquilt push; do dquilt refresh; done</literal> to apply all patches while removing <emphasis>fuzz</emphasis>;
zh_CN: <literal>while dquilt push; do dquilt refresh; done</literal> 應用所有補丁以確保它們 <emphasis>邊界清晰</emphasis>；

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para><footnote><para>
en: To get the date in the required format, use <literal>LANG=C date -R</literal>.
zh_CN: 要獲得需要的日期格式，使用 <literal>LANG=C date -R</literal>。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: Add a new revision at the top of the Debian <filename>changelog</filename> file, for example with <literal>dch -i</literal>, or explicitly with <literal>dch -v <replaceable>version</replaceable>-<replaceable>revision</replaceable></literal> and then insert the comments using your preferred editor.  <placeholder type="footnote" id="0"/>
zh_CN: 在 Debian <filename>changelog</filename> 檔案的頂部添加一個條目。例如可以使用 <literal>dch -i</literal> 或用 <literal>dch -v <replaceable>version</replaceable>-<replaceable>revision</replaceable></literal> 來指定版本，然後用你喜歡的編輯器插入訊息。<placeholder type="footnote" id="0"/>

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: Include a short description of the bug and the solution in the changelog entry, followed by <literal>Closes: #654321</literal>.  That way, the bug report will be <emphasis>automagically</emphasis> closed by the archive maintenance software the moment your package gets accepted into the Debian archive.
zh_CN: 在 changlog 條目中簡要描述 Bug 和相應的解決辦法，並在後面添加 <literal>Closes: #654321</literal>。這樣 Bug 報告會在你的軟件包被 Debian 倉庫接受的同時被倉庫管理軟件 <emphasis>自動關閉</emphasis>。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: Repeat what you did in the above to fix more bugs while updating the Debian <filename>changelog</filename> file with <literal>dch</literal> as needed.
zh_CN: 重複上述操作來修復更多的 Bug，並在需要的時候使用 <literal>dch</literal> 更新 Debian <filename>changelog</filename> 檔案。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: Repeat what you did in <xref linkend="completebuild"/> and <xref linkend="checkit"/>.
zh_CN: 重複你在 <xref linkend="completebuild"/> 和 <xref linkend="checkit"/> 中所做的事情。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: Once you are satisfied, you should change the distribution value in <filename>changelog</filename> from <literal>UNRELEASED</literal> to the target distribution value <literal>unstable</literal> (or even <literal>experimental</literal>).<placeholder type="footnote" id="0"/>
zh_CN: 一旦你滿意了，那就將 <filename>changelog</filename> 中的發行版值由 <literal>UNRELEASED</literal> 修改成 目標發行版值 <literal>unstable</literal> (或者是 <literal>experimental</literal>)。<placeholder type="footnote" id="0"/>

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: Upload the package as in <xref linkend="upload"/>.  The difference is that this time, the original source archive won't be included, as it hasn't been changed and it already exists in the Debian archive.
zh_CN: 按照 <xref linkend="upload"/> 來上傳軟體包。惟一的區別是這次不需要再包含原始程式碼檔案，因為它們沒有變化且已經存在於 Debian 倉庫中。

note: type: Content of: <book><chapter><section><para>
en: One tricky case can occur when you make a local package, to experiment with the packaging before uploading the normal version to the official archive, e.g., <literal><replaceable>1.0.1</replaceable>-<replaceable>1</replaceable></literal>.  For smoother upgrades, it is a good idea to create a <filename>changelog</filename> entry with a version string such as <literal><replaceable>1.0.1</replaceable>-<replaceable>1~rc1</replaceable></literal>.  You may unclutter <filename>changelog</filename> by consolidating such local change entries into a single entry for the official package.  See <xref linkend="namever"/> for the order of version strings.
zh_CN: 有一種棘手的情況，當你在上傳正常版本到官方倉庫中之前，你製作了一個本地包以進行打包實驗，例如, <literal><replaceable>1.0.1</replaceable>-<replaceable>1</replaceable></literal>。 為了平滑升級，建立一個 <filename>changelog</filename> 條目，其中包含類似<literal><replaceable>1.0.1</replaceable>-<replaceable>1~rc1</replaceable></literal> 這樣的版本字串不失為一劑良方。  你可以透過合併這樣的本地修改條目到官方包的單個條目中來整理 <filename>changelog</filename>。 參見 <xref linkend="namever"/> 來了解版本字串的排序。

note: type: Content of: <book><chapter><section><title>
en: Inspection of the new upstream release
zh_CN: 檢査新上游版本

note: type: Content of: <book><chapter><section><para>
en: When preparing packages of a new upstream release for the Debian archive, you must check the new upstream release first.
zh_CN: 在為 Debian 倉庫準備新上游版本的軟體包前，你必須首先對新的上游釋出版本進行檢查。

note: type: Content of: <book><chapter><section><para>
en: Start by reading the upstream <filename>changelog</filename>, <filename>NEWS</filename>, and whatever other documentation they may have released with the new version.
zh_CN: 檢查工作應從閱讀上游 <filename>changelog</filename>、<filename>NEWS</filename> 以及所有隨新版本一同發佈的文檔。

note: type: Content of: <book><chapter><section><para>
en: You can then inspect changes between the old and new upstream sources as follows, watching out for anything suspicious:
zh_CN: 然後應按照以下步驟檢查新舊版本之間源碼的差別，小心任何可疑的內容：

note: type: Content of: <book><chapter><section><para>
en: Changes to some auto-generated files by Autotools such as <filename>missing</filename>, <filename>aclocal.m4</filename>, <filename>config.guess</filename>, <filename>config.h.in</filename>, <filename>config.sub</filename>, <filename>configure</filename>, <filename>depcomp</filename>, <filename>install-sh</filename>, <filename>ltmain.sh</filename>, and <filename>Makefile.in</filename> may be ignored.  You may delete them before running <command>diff</command> on the source for inspection.
zh_CN: 對於 Autotools 自動生成的文件發生的改動，例如 <filename>missing</filename>、<filename>aclocal.m4</filename>、<filename>config.guess</filename>、<filename>config.h.in</filename>、<filename>config.sub</filename>、<filename>configure</filename>、<filename>depcomp</filename>、<filename>install-sh</filename>、<filename>ltmain.sh</filename> 和 <filename>Makefile.in</filename> 是可以忽略的。你可以在運行 <command>diff</command> 進行代碼檢查前刪除它們。

note: type: Content of: <book><chapter><section><title>
en: New upstream release
zh_CN: 新上游版本

note: type: Content of: <book><chapter><section><para><footnote><para>
en: If a package <systemitem role="package"><replaceable>foo</replaceable></systemitem> is packaged in the old <literal>1.0</literal> format, this can be done by running <literal>zcat /<replaceable>path</replaceable>/<replaceable>to</replaceable>/<replaceable>foo</replaceable>_<replaceable>oldversion</replaceable>.diff.gz|patch -p1</literal> in the new extracted source, instead.
zh_CN: 如果套件 <systemitem role="package"><replaceable>foo</replaceable></systemitem> 是使用舊的 <literal>1.0</literal> 格式的，可以在新解壓的原始碼目錄裏運行 <literal>zcat /<replaceable>path</replaceable>/<replaceable>to</replaceable>/<replaceable>foo</replaceable>_<replaceable>oldversion</replaceable>.diff.gz|patch -p1</literal> 來完成。

note: type: Content of: <book><chapter><section><para>
en: If a package <systemitem role="package"><replaceable>foo</replaceable></systemitem> is properly packaged in the newer <literal>3.0 (native)</literal> or <literal>3.0 (quilt)</literal> formats, packaging a new upstream version is essentially moving the old <filename>debian</filename> directory to the new source.  This can be done by running <literal>tar xvzf /<replaceable>path</replaceable>/<replaceable>to</replaceable>/<replaceable>foo</replaceable>_<replaceable>oldversion</replaceable>.debian.tar.gz</literal> in the new extracted source.  <placeholder type="footnote" id="0"/> Of course, you need to do some obvious chores:
zh_CN: 如果軟件包 <systemitem role="package"><replaceable>foo</replaceable></systemitem> 是使用新的 <literal>3.0 (native)</literal> 或 <literal>3.0 (quilt)</literal> 格式打包的，製作新的上游版本時需要先把舊的 <filename>debian</filename> 目錄移至新的源代碼內。這可以通過在新解壓的源代碼目錄裏運行 <literal>tar xvzf /<replaceable>path</replaceable>/<replaceable>to</replaceable>/<replaceable>foo</replaceable>_<replaceable>oldversion</replaceable>.debian.tar.gz</literal> 完成。<placeholder type="footnote" id="0"/>當然，你需要做幾個很顯然的雜事：

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: Create a copy of the upstream source as the <filename>foo_<replaceable>newversion</replaceable>.orig.tar.gz</filename> file.
zh_CN: 創建一份上游原始碼的副本，命名爲 <filename>foo_<replaceable>newversion</replaceable>.orig.tar.gz</filename>

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: Update the Debian <filename>changelog</filename> file with <literal>dch -v <replaceable>newversion</replaceable>-<replaceable>1</replaceable></literal>.
zh_CN: 使用 <literal>dch -v <replaceable>newversion</replaceable>-<replaceable>1</replaceable></literal> 更新 Debian <filename>changelog</filename> 檔案。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: Add an entry with <literal>New upstream release</literal>.
zh_CN: 添加一個條目，內容爲 <literal>New upstream release</literal>。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: Describe concisely the changes <emphasis>in the new upstream release</emphasis> that fix reported bugs and close those bugs by adding <literal>Closes: #<replaceable>bug_number</replaceable></literal>.
zh_CN: 簡明地介紹 <emphasis>在新上游版本中</emphasis> 上游修復和關閉的 Bug (添加 <literal>Closes: #<replaceable>bug_number</replaceable></literal>) 。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: Describe concisely the changes <emphasis>to the new upstream release</emphasis> by the maintainer that fix reported bugs and close those bugs by adding <literal>Closes: #<replaceable>bug_number</replaceable></literal>.
zh_CN: 簡明地介紹維護者對 <emphasis>本個新上游版本</emphasis> 做出的修改，修復和關閉的 Bug (添加 <literal>Closes: #<replaceable>bug_number</replaceable></literal>)。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: <literal>while dquilt push; do dquilt refresh; done</literal> to apply all patches while removing <emphasis>fuzz</emphasis>.
zh_CN: 運行 <literal>while dquilt push; do dquilt refresh; done</literal> 以應用全部補丁並使它們 <emphasis>邊界清晰</emphasis>。

note: type: Content of: <book><chapter><section><para>
en: If the patch/merge did not apply cleanly, inspect the situation (clues are left in <filename>.rej</filename> files).
zh_CN: 如果補丁沒有乾淨地被應用，檢査原因(線索在 <filename>.rej</filename> 檔案裏)。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: If a patch you applied to the source was integrated into the upstream source,
zh_CN: 如果你的補丁已經被上游接受，

note: type: Content of: <book><chapter><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: <literal>dquilt delete</literal> to remove it.
zh_CN: 使用 <literal>dquilt delete</literal> 刪除它。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: If a patch you applied to the source conflicted with new changes in the upstream source,
zh_CN: 如果你的補丁與上遊程式碼中的變更有衝突：

note: type: Content of: <book><chapter><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: <literal>dquilt push -f</literal> to apply old patches while forcing rejects as <filename><replaceable>baz</replaceable>.rej</filename>.
zh_CN: 使用 <literal>dquilt push -f</literal> 應用舊補丁，未應用的部分會被保存爲 <filename><replaceable>baz</replaceable>.rej</filename>。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: Edit the <filename><replaceable>baz</replaceable></filename> file manually to bring about the intended effect of <filename><replaceable>baz</replaceable>.rej</filename>.
zh_CN: 手工編輯 <filename><replaceable>baz</replaceable></filename> 文件來在新的代碼中實現 <filename><replaceable>baz</replaceable>.rej</filename> 中應有的效果。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: <literal>dquilt refresh</literal> to update the patch.
zh_CN: 使用 <literal>dquilt refresh</literal> 更新補丁。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: Continue as usual with <literal>while dquilt push; do dquilt refresh; done</literal>.
zh_CN: 正常繼續，執行 <literal>while dquilt push; do dquilt refresh; done</literal>。

note: type: Content of: <book><chapter><section><para>
en: This process can be automated using the <citerefentry> <refentrytitle>uupdate</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> command as follows:
zh_CN: 這個過程可以通過使用 <citerefentry> <refentrytitle>uupdate</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> 來更自動化地完成：

note: type: Content of: <book><chapter><section><para><footnote><para>
en: If the <command>uscan</command> command downloads the updated source but it does not run the <command>uupdate</command> command, you should correct the <filename>debian/watch</filename> file to have <literal>debian uupdate</literal> at the end of the URL.
zh_CN: 如果 <command>uscan</command> 命令下載並更新了原始碼，但沒有運行 <command>uupdate</command> 命令，你應該修正 <filename>debian/watch</filename> 檔案，使 URL 末尾後帶有 <literal>debian uupdate</literal>。

note: type: Content of: <book><chapter><section><para>
en: If you set up a <filename>debian/watch</filename> file as described in <xref linkend="watch"/>, you can skip the <command>wget</command> command.  You simply run <citerefentry> <refentrytitle>uscan</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> in the <filename><replaceable>foo</replaceable>-<replaceable>oldversion</replaceable></filename> directory instead of the <command>uupdate</command> command.  This will <emphasis>automagically</emphasis> look for the updated source, download it, and run the <command>uupdate</command> command.  <placeholder type="footnote" id="0"/>
zh_CN: 如果你按照 <xref linkend="watch"/> 的敘述設置了 <filename>debian/watch</filename> 檔案，你可以跳過這個 <command>wget</command> 命令，轉而在 <filename><replaceable>foo</replaceable>-<replaceable>oldversion</replaceable></filename> 目錄中運行 <citerefentry> <refentrytitle>uscan</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>，且無需再執行 <command>uupdate</command> 命令。它會 <emphasis>自動</emphasis> 査找新的原始碼、下載並運行 <command>uupdate</command> 命令。<placeholder type="footnote" id="0"/>

note: type: Content of: <book><chapter><section><para>
en: You can release this updated source by repeating what you did in <xref linkend="completebuild"/>, <xref linkend="checkit"/>, and <xref linkend="upload"/>.
zh_CN: 重複 <xref linkend="completebuild"/> 、<xref linkend="checkit"/> 和 <xref linkend="upload"/> 中的操作，即可發佈此更新的套件。

note: type: Content of: <book><chapter><section><title>
en: Updating the packaging style
zh_CN: 更新打包風格

note: type: Content of: <book><chapter><section><para><footnote><para>
en: If your sponsor or other maintainers object to updating the existing packaging style, don't bother arguing.  There are more important things to do.
zh_CN: 如果你的 sponsor 或其他維護者一定反對更新已有的打包風格，則不值得去爲此煩惱或爭論，總是有更重要的事要做。

note: type: Content of: <book><chapter><section><para>
en: Updating the package style is not a required activity for the update of a package.  However, doing so lets you use the full capabilities of the modern <systemitem role="package">debhelper</systemitem> system and the <literal>3.0</literal> source format.  <placeholder type="footnote" id="0"/>
zh_CN: 更新打包風格不是更新軟件包的必須步驟，但是這樣可以使你的軟件包得到對現代的 <systemitem role="package">debhelper</systemitem> 系統和 <literal>3.0</literal> 源代碼包格式完整的兼容性。<placeholder type="footnote" id="0"/>

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: If you need to recreate deleted template files for any reason, you can run <command>dh_make</command> again in the same Debian package source tree with the <literal>--addmissing</literal> option.  Then edit them appropriately.
zh_CN: 如果你需要重新添加已刪除的模板文件，可以在同一個 debian 軟件包源代碼樹中運行 <command>dh_make</command>，並添加 <literal>--addmissing</literal> 選項。然後對模板進行相應的編輯。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: If the package has not been updated to use the <systemitem role="package">debhelper</systemitem> v7+ <command>dh</command> syntax for the <filename>debian/rules</filename> file, update it to use <command>dh</command>.  Update the <filename>debian/control</filename> file accordingly.
zh_CN: 如果軟件包的 <filename>debian/rules</filename> 文件沒有更新爲使用 <systemitem role="package">debhelper</systemitem> v7+ 的 <command>dh</command> 語法，則更新它使用 <command>dh</command>。在需要的時候更新 <filename>debian/control</filename> 文件。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: If you want to update the <filename>rules</filename> file created with the <filename>Makefile</filename> inclusion mechanism of the Common Debian Build System (<systemitem role="package">cdbs</systemitem>) to the <command>dh</command> syntax, see the following to understand its <literal>DEB_*</literal> configuration variables.
zh_CN: 如果你希望將使用 <systemitem role="package">cdbs</systemitem> 的 <filename>Makefile</filename> 包含機制創建的 <filename>rules</filename> 文件更新爲 <command>dh</command> 語法，參看下文並理解各 <literal>DEB_*</literal> 配置變量。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: local copy of <filename>&cdbs-doc;</filename>
zh_CN: <filename>&cdbs-doc;</filename> 的本地副本

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: If you have a <literal>1.0</literal> source package without the <filename><replaceable>foo</replaceable>.diff.gz</filename> file, you can update it to the newer <literal>3.0 (native)</literal> source format by creating <filename>debian/source/format</filename> with <literal>3.0 (native)</literal>.  The rest of the <filename>debian/*</filename> files can just be copied.
zh_CN: 如果你有一個不帶有 <filename><replaceable>foo</replaceable>.diff.gz</filename> 文件的 <literal>1.0</literal> 格式的源代碼包，你可以通過創建 <filename>debian/source/format</filename> 文件並在其中添加 <literal>3.0 (native)</literal> 來將其更新爲新的 <literal>3.0 (native)</literal> 源代碼包格式。<filename>debian</filename> 目錄中的其他文件可以直接複製過來。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para><footnote><para>
en: You can split <filename>big.diff</filename> into many small incremental patches using the <command>splitdiff</command> command.
zh_CN: 你可能使用 <command>splitdiff</command> 命令將 <filename>big.diff</filename> 分割爲多個增量補丁。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: If you have a <literal>1.0</literal> source package with the <filename><replaceable>foo</replaceable>.diff.gz</filename> file, you can update it to the newer <literal>3.0 (quilt)</literal> source format by creating <filename>debian/source/format</filename> with <literal>3.0 (quilt)</literal>.  The rest of the <filename>debian/*</filename> files can just be copied.  Import the <filename>big.diff</filename> file generated by the command <literal>filterdiff -z -x '*/debian/*' <replaceable>foo</replaceable>.diff.gz &gt; big.diff</literal> to your <command>quilt</command> system, if needed.  <placeholder type="footnote" id="0"/>
zh_CN: 如果你有一個帶有 <filename><replaceable>foo</replaceable>.diff.gz</filename> 文件的 <literal>1.0</literal> 格式的源代碼包，你可以通過創建 <filename>debian/source/format</filename> 文件並在其中添加 <literal>3.0 (quilt)</literal> 來將其更新爲新的 <literal>3.0 (quilt)</literal> 源代碼包格式。<filename>debian</filename> 目錄中的其他文件可以直接複製過來。如果需要，把 <literal>filterdiff -z -x '*/debian/*' <replaceable>foo</replaceable>.diff.gz &gt; big.diff</literal> 生成的 <filename>big.diff</filename> 文件導入到 <command>quilt</command> 系統。<placeholder type="footnote" id="0"/>

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: If it was packaged using another patch system such as <systemitem role="package">dpatch</systemitem>, <systemitem role="package">dbs</systemitem>, or <systemitem role="package">cdbs</systemitem> with <literal>-p0</literal>, <literal>-p1</literal>, or <literal>-p2</literal>, convert it to <systemitem role="package">quilt</systemitem> using <filename>deb3</filename> at <ulink url="&deb3;"/>.
zh_CN: 如果它使用了其他的補丁系統，例如 <systemitem role="package">dpatch</systemitem>、<systemitem role="package">dbs</systemitem> 或 <systemitem role="package">cdbs</systemitem>，使用 <literal>-p0</literal>、<literal>-p1</literal> 或 <literal>-p2</literal> 級別，使用 <ulink url="&deb3;">&deb3;</ulink> 的 <filename>deb3</filename> 命令將其轉換到 <systemitem role="package">quilt</systemitem> 系統。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: If it was packaged with the <command>dh</command> command with the <literal>--with quilt</literal> option or with the <command>dh_quilt_patch</command> and <command>dh_quilt_unpatch</command> commands, remove these and make it use the newer <literal>3.0 (quilt)</literal> source format.
zh_CN: 如果它使用 <command>dh</command> 命令的 <literal>--with quilt</literal> 選項，或 <command>dh_quilt_patch</command> 和 <command>dh_quilt_unpatch</command> 命令，刪除它們並使其使用新的 <literal>3.0 (native)</literal> 源代碼包格式。

note: type: Content of: <book><chapter><section><para>
en: You should check <ulink url="&dep;">DEP - Debian Enhancement Proposals</ulink> and adopt ACCEPTED proposals.
zh_CN: 你應當查看 <ulink url="&dep;">DEP - Debian Enhancement Proposals</ulink> 並採納 ACCEPTED 建議。

note: type: Content of: <book><chapter><section><para>
en: You need to do the other tasks described in <xref linkend="newupstream"/>, too.
zh_CN: 當然你還需要按照 <xref linkend="newupstream"/> 完成其他的步驟。

note: type: Content of: <book><chapter><section><title>
en: UTF-8 conversion
zh_CN: UTF-8 轉換

note: type: Content of: <book><chapter><section><para>
en: If upstream documents are encoded in old encoding schemes, converting them to <ulink url="&utf8;">UTF-8</ulink> is a good idea.
zh_CN: 如果上游文檔採用了老式編碼，那麼將其轉換爲 <ulink url="&utf8;">UTF-8</ulink> 不失爲一良方。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: Use <citerefentry> <refentrytitle>iconv</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> to convert encodings of plain text files.
zh_CN: 用 <citerefentry> <refentrytitle>iconv</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> 來轉換普通文本文件的編碼。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: Use <citerefentry> <refentrytitle>w3m</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> to convert from HTML files to UTF-8 plain text files.  When you do this, make sure to execute it under UTF-8 locale.
zh_CN: 使用 <citerefentry> <refentrytitle>w3m</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> 來把 HTML 文件轉換爲 UTF-8 普通文本文件。 當你這樣做的時候，請確認在 UTF-8 locale 下執行。

note: type: Content of: <book><chapter><section><title>
en: Reminders for updating packages
zh_CN: 對更新套件的幾點提示

note: type: Content of: <book><chapter><section><para>
en: Here are a few reminders for updating packages:
zh_CN: 以下是對更新軟體包的幾點提示：

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: Preserve old <filename>changelog</filename> entries (sounds obvious, but there have been cases of people typing <literal>dch</literal> when they should have typed <literal>dch -i</literal>.)
zh_CN: 保留舊的 <filename>changelog</filename> 條目(看似顯然，但是總有可能把 <literal>dch -i</literal> 輸入爲 <literal>dch</literal>)。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: Existing Debian changes need to be reevaluated; throw away stuff that upstream has incorporated (in one form or another) and remember to keep stuff that hasn't been incorporated by upstream, unless there is a compelling reason not to.
zh_CN: 已存在的 Debian 修改需要被重新校驗，去除上游已經接受的東西，除非有必要的原因，還要記錄尚未被上游接受的部分。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: If any changes were made to the build system (hopefully you'd know from inspecting upstream changes) then update the <filename>debian/rules</filename> and <filename>debian/control</filename> build dependencies if necessary.
zh_CN: 如果對編譯系統作出了修改(希望你已經在檢査上游變更時瞭解了這些)，那麼要在必要時更新 <filename>debian/rules</filename> 和 <filename>debian/control</filename> 編譯依賴關係。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: Check the <ulink url="&bts;">Debian Bug Tracking System (BTS)</ulink> to see if someone has provided patches to bugs that are currently open.
zh_CN: 檢查 <ulink url="&bts;">Debian Bug Tracking System (BTS)</ulink> 是否有人爲某些仍然未修復的 bug 提供了補丁。

note: type: Content of: <book><chapter><section><itemizedlist><listitem><para>
en: Check the contents of the <filename>.changes</filename> file to make sure you are uploading to the correct distribution, the proper bug closures are listed in the <literal>Closes</literal> field, the <literal>Maintainer</literal> and <literal>Changed-By</literal> fields match, the file is GPG-signed, etc.
zh_CN: 檢查 <filename>.changes</filename> 文件以確保你正要上傳到正確的發行版、正確的列出BUG關閉 <literal>Closes</literal> 字段、<literal>Maintainer</literal> 和 <literal>Changed-By</literal> 字段相匹配，以及文件是否已經使用 GPG 簽署等。

note: type: Content of: <book><chapter><title>
en: Uploading the package
zh_CN: 上傳套件

note: type: Content of: <book><chapter><para>
en: Now that you have tested your new package thoroughly, you want to release it to a public archive to share it.
zh_CN: 現在你完成了對軟件包的徹底測試，接下來將其釋出到公共歸檔中分享它吧。

note: type: Content of: <book><chapter><section><title>
en: Uploading to the Debian archive
zh_CN: 上傳到 Debian 倉庫

note: type: Content of: <book><chapter><section><para><footnote><para>
en: See <xref linkend="socialdynamics"/>.
zh_CN: 參見 <xref linkend="socialdynamics"/>。

note: type: Content of: <book><chapter><section><para><footnote><para>
en: There are publicly accessible archives such as <ulink url="&mentors-dn;"/> which work almost the same way as the Debian archive and provide an upload area for non-DDs.  You can set up an equivalent archive by yourself using the tools listed at <ulink url="&deb-archive;"/>.  So this section is useful for non-DDs, too.
zh_CN: 有許多公開的檔案比如 <ulink url="&mentors-dn;"/> ，它們的運作方式幾乎與 Debian 檔案一致，並提供了一個非開發者的上傳區域。你可以自己建立一個等效檔案，只要使用 <ulink url="&deb-archive;"/> 裏邊列舉出來的工具。  所以這一小節也對非開發者特別有用。

note: type: Content of: <book><chapter><section><para><footnote><para>
en: The <systemitem role="package">dput</systemitem> package seems to come with more features and to be becoming more popular than the <systemitem role="package">dupload</systemitem> package.  It uses the file <filename>/etc/dput</filename> for its global configuration and the file <filename>~/.dput.cf</filename> for per-user configuration.  It supports Ubuntu-related services out-of-the-box, too.
zh_CN: <systemitem role="package">dput</systemitem> 軟件包提供了更多的特性，相比於 <systemitem role="package">dupload</systemitem> 也越來越受歡迎。它使用 <filename>/etc/dput</filename> 文件作爲全局配置文件、<filename>~/.dput.cf</filename> 作爲用戶配置文件。它也直接支持 ubuntu 相關的服務。

note: type: Content of: <book><chapter><section><para>
en: Once you become an official developer, <placeholder type="footnote" id="0"/> you can upload the package to the Debian archive.  <placeholder type="footnote" id="1"/> You can do this manually, but it's easier to use the existing automated tools, like <citerefentry> <refentrytitle>dupload</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> or <citerefentry> <refentrytitle>dput</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>.  We'll describe how it's done with <command>dupload</command>.  <placeholder type="footnote" id="2"/>
zh_CN: 當你成爲正式的開發人員<placeholder type="footnote" id="0"/>，你可以把軟件包上傳到 Debian 倉庫<placeholder type="footnote" id="1"/>。你可以手工進行這項工作，但使用例如 <citerefentry> <refentrytitle>dupload</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> 或 <citerefentry> <refentrytitle>dput</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> 的自動化工具可以幫你更好地完成這項操作。在此我們將敘述如何使用 <command>dupload</command> 操作。<placeholder type="footnote" id="2"/>

note: type: Content of: <book><chapter><section><para>
en: First you have to set up <command>dupload</command>'s config file.  You can either edit the system-wide <filename>/etc/dupload.conf</filename> file, or have your own <filename>~/.dupload.conf</filename> file override the few things you want to change.
zh_CN: 首先需要設置 <command>dupload</command> 的設定檔案。你既可以編輯系統級的 <filename>/etc/dupload.conf</filename> 檔案，也可以使用自己的 <filename>~/.dupload.conf</filename> 檔案覆蓋一些需要修改的設置。

note: type: Content of: <book><chapter><section><para>
en: You can read the <citerefentry> <refentrytitle>dupload.conf</refentrytitle> <manvolnum>5</manvolnum> </citerefentry> manual page to understand what each of these options means.
zh_CN: 你可以閱讀 <citerefentry> <refentrytitle>dupload.conf</refentrytitle> <manvolnum>5</manvolnum> </citerefentry> man 手冊頁來瞭解各選項的含義。

note: type: Content of: <book><chapter><section><para><footnote><para>
en: See <ulink url="&devref-upload;">Debian Developer's Reference 5.6, "Uploading a package"</ulink>.
zh_CN: 參見 <ulink url="&devref-upload;">Debian Developer's Reference 5.6. "Uploading a package"</ulink>.

note: type: Content of: <book><chapter><section><para>
en: The <literal>$default_host</literal> option determines which of the upload queues will be used by default.  <literal>anonymous-ftp-master</literal> is the primary one, but it's possible that you will want to use another one.  <placeholder type="footnote" id="0"/>
zh_CN: <literal>$default_host</literal> 選項決定了默認使用哪個上傳隊列，<literal>anonymous-ftp-master</literal> 是最基本的一個，但你很可能希望改用其他的。<placeholder type="footnote" id="0"/>

note: type: Content of: <book><chapter><section><para>
en: While connected to the Internet, you can upload your package as follows:
zh_CN: 連接到互聯網後，可以使用以下命令上傳你的軟件包：

note: type: Content of: <book><chapter><section><para>
en: <command>dupload</command> checks that the SHA1/SHA256 file checksums match those listed in the <filename>.changes</filename> file.  If they do not match, it will warn you to rebuild it as described in <xref linkend="completebuild"/> so it can be properly uploaded.
zh_CN: <command>dupload</command> 會檢查文件的 SHA1/SHA256 校驗和是否與 <filename>.changes</filename> 文件中的相匹配，如果不匹配它會做出警告。你應按照如 <xref linkend="completebuild"/> 所述來重構建軟件包使得它可以被正常上傳。

note: type: Content of: <book><chapter><section><para><footnote><para>
en: See <ulink url="&uploadqueue-readme;"/>.  Alternatively, you can use the <command>dcut</command> command from the <systemitem role="package">dput</systemitem> package.
zh_CN: 參見 <ulink url="&uploadqueue-readme;"/>。 或者是， 你可以使用 <command>dcut</command> 命令，它來自 <systemitem role="package">dput</systemitem> 軟件包。

note: type: Content of: <book><chapter><section><para>
en: If you encounter an upload problem at <ulink url="&uploadqueue;"/>, you can fix this by manually uploading a GPG-signed <filename>*.commands</filename> file to there with <command>ftp</command>.  <placeholder type="footnote" id="0"/> For example, using <filename>hello.commands</filename>:
zh_CN: 如果你在 <ulink url="&uploadqueue;"/> 遇到了上傳問題，你可以通過 <command>ftp</command> 來手動上傳 GPG 簽署的 <filename>*.commands</filename> 文件。  <placeholder type="footnote" id="0"/> 比如說，使用 <filename>hello.commands</filename> 命令：

note: type: Content of: <book><chapter><section><title>
en: Including <filename>orig.tar.gz</filename> for upload
zh_CN: 在上傳時包含 <filename>orig.tar.gz</filename> 檔案

note: type: Content of: <book><chapter><section><para>
en: When you first upload the package to the archive, you need to include the original <filename>orig.tar.gz</filename> source, too.  If the Debian revision number of this package is neither <literal>1</literal> nor <literal>0</literal>, you must provide the <command>dpkg-buildpackage</command> option <literal>-sa</literal>.
zh_CN: 第一次向倉庫上傳軟件包時要包含 <filename>orig.tar.gz</filename> 源代碼歸檔。如果這個軟件包的修訂號既不是  <literal>1</literal> 也不是 <literal>0</literal>, 那你就必須給 <command>dpkg-buildpackage</command> 加上選項 <literal>-sa</literal>。

note: type: Content of: <book><chapter><section><para>
en: For the <command>dpkg-buildpackage</command> command:
zh_CN: 對於 <command>dpkg-buildpackage</command> 命令：

note: type: Content of: <book><chapter><section><para>
en: For the <command>debuild</command> command:
zh_CN: 對於 <command>debuild</command> 命令：

note: type: Content of: <book><chapter><section><para>
en: For the <command>pdebuild</command> command:
zh_CN: 對於 <command>pdebuild</command> 命令：

note: type: Content of: <book><chapter><section><para>
en: On the other hand, the <literal>-sd</literal> option will force the exclusion of the original <filename>orig.tar.gz</filename> source.
zh_CN: 另一方面，請注意 <literal>-sd</literal> 選項會強制 排除原始的 <filename>orig.tar.gz</filename> 源代碼。

note: type: Content of: <book><chapter><section><title>
en: Skipped uploads
zh_CN: 跳過的上傳

note: type: Content of: <book><chapter><section><para>
en: If you created multiple entries in <filename>debian/changelog</filename> by skipping uploads, you must create a proper <filename>*_.changes</filename> file that includes all changes since the last upload.  This can be done by specifying the <command>dpkg-buildpackage</command> option <literal>-v</literal> with the version, e.g., <literal><replaceable>1.2</replaceable></literal>.
zh_CN: 如果你在 <filename>debian/changelog</filename> 建立了多個條目並跳過了上傳，你必須建立一個相應的 <filename>*_.changes</filename> 檔案，其中包含自上次上傳以來的全部變更記錄。這可以透過指定 <command>dpkg-buildpackage</command> 的 <literal>-v</literal> 並將版本傳遞給它來完成。比如， <literal><replaceable>1.2</replaceable></literal>.

note: type: Content of: <book><appendix><title>
en: Advanced packaging
zh_CN: 高級打包

note: type: Content of: <book><appendix><para>
en: Here are some hints and pointers for advanced packaging topics that you are most likely to deal with.  You are strongly advised to read all the references suggested here.
zh_CN: 這裡有一些關於你可能遇到的高階打包問題的提示。如果有需要的話，本教程強烈建議閱讀這裡引用和建議的文件。

note: type: Content of: <book><appendix><para>
en: You may need to manually edit the packaging template files generated by the <command>dh_make</command> command to address topics covered in this chapter.  The newer <command>debmake</command> command should address these topics better.
zh_CN: 你可能需要手工編輯由 <command>dh_make</command> 命令生成的打包模板文件，以此來解決本章中所討論的問題。 新的 <command>debmake</command> 命令應該能更好地解決這些問題。

note: type: Content of: <book><appendix><section><title>
en: Shared libraries
zh_CN: 共享庫

note: type: Content of: <book><appendix><section><para>
en: Before packaging shared <ulink url="&library;">libraries</ulink>, you should read the following primary references in detail:
zh_CN: 在打包 <ulink url="&library;">共享庫</ulink> 之前，你 應該閱讀以下的主要參考資料：

note: type: Content of: <book><appendix><section><para>
en: Here are some oversimplified hints for you to get started:
zh_CN: 以下是幫助你開始的極簡解釋：

note: type: Content of: <book><appendix><section><itemizedlist><listitem><para>
en: Shared libraries are <ulink url="&elf;">ELF</ulink> object files containing compiled code.
zh_CN: 共享庫均爲 <ulink url="&elf;">elf</ulink> 對象文件，其包含編譯好的機器碼。

note: type: Content of: <book><appendix><section><itemizedlist><listitem><para>
en: Shared libraries are distributed as <filename>*.so</filename> files. (Neither <filename>*.a</filename> files nor <filename>*.la</filename> files)
zh_CN: 共享庫以 <filename>*.so</filename> 文件的形式發放。(既非 <filename>*.a</filename> 文件也非 <filename>*.la</filename> 文件)

note: type: Content of: <book><appendix><section><itemizedlist><listitem><para>
en: Shared libraries are mainly used to share common codes among multiple executables with the <command>ld</command> mechanism.
zh_CN: 共享庫主要用於在不同的二進制可執行程序之間共享代碼，這背後使用了 <command>ld</command> （譯註：鏈接）機制。

note: type: Content of: <book><appendix><section><itemizedlist><listitem><para>
en: Shared libraries are sometimes used to provide multiple plugins to an executable with the <command>dlopen</command> mechanism.
zh_CN: 共享庫有時會爲一個可執行程序提供多個插件，這背後使用了 <command>dlopen</command> 機制。

note: type: Content of: <book><appendix><section><itemizedlist><listitem><para>
en: Shared libraries export <ulink url="&symbol;">symbols</ulink>, which represent compiled objects such as variables, functions, and classes; and enable access to them from the linked executables.
zh_CN: 共享庫能匯出代表著變數，函式和類的 <ulink url="&symbol;">symbols</ulink>（符號）；並允許連結到它的可執行檔案訪問之。

note: type: Content of: <book><appendix><section><itemizedlist><listitem><para><footnote><para>
en: Alternatively: <literal>readelf -d lib<replaceable>foo</replaceable>.so.<replaceable>1</replaceable> | grep SONAME</literal>
zh_CN: 或者這樣： <literal>readelf -d lib<replaceable>foo</replaceable>.so.<replaceable>1</replaceable> | grep SONAME</literal>

note: type: Content of: <book><appendix><section><itemizedlist><listitem><para>
en: The <ulink url="&soname;">SONAME</ulink> of a shared library <filename>lib<replaceable>foo</replaceable>.so</filename>.<replaceable>1</replaceable>: <literal>objdump -p lib<replaceable>foo</replaceable>.so.<replaceable>1</replaceable> | grep SONAME</literal> <placeholder type="footnote" id="0"/>
zh_CN: 共享庫 <filename>lib<replaceable>foo</replaceable>.so</filename>.<replaceable>1</replaceable> 中的 <ulink url="&soname;">SONAME</ulink> : <literal>objdump -p lib<replaceable>foo</replaceable>.so.<replaceable>1</replaceable> | grep SONAME</literal> <placeholder type="footnote" id="0"/>

note: type: Content of: <book><appendix><section><itemizedlist><listitem><para>
en: The SONAME of a shared library usually matches the library file name (but not always).
zh_CN: 共享庫的 SONAME 常常與庫文件自身文件名一致(不過有特例)。

note: type: Content of: <book><appendix><section><itemizedlist><listitem><para><footnote><para>
en: Alternatively: <literal>readelf -d lib<replaceable>foo</replaceable>.so.<replaceable>1</replaceable> | grep NEEDED</literal>
zh_CN: 或者這樣： <literal>readelf -d lib<replaceable>foo</replaceable>.so.<replaceable>1</replaceable> | grep NEEDED</literal>

note: type: Content of: <book><appendix><section><itemizedlist><listitem><para>
en: The SONAME of shared libraries linked to <filename><replaceable>/usr/bin/foo</replaceable></filename>: <literal>objdump -p <replaceable>/usr/bin/foo</replaceable> | grep NEEDED</literal> <placeholder type="footnote" id="0"/>
zh_CN: 鏈接到 <filename><replaceable>/usr/bin/foo</replaceable></filename> 的共享庫的 SONAME ： <literal>objdump -p <replaceable>/usr/bin/foo</replaceable> | grep NEEDED</literal> <placeholder type="footnote" id="0"/>

note: type: Content of: <book><appendix><section><itemizedlist><listitem><para><footnote><para>
en: See <ulink url="&policy-runtime;">Debian Policy Manual, 8.1 "Run-time shared libraries"</ulink>.
zh_CN: 參見 <ulink url="&policy-runtime;">Debian Policy Manual, 8.1 "Run-time shared libraries"</ulink>.

note: type: Content of: <book><appendix><section><itemizedlist><listitem><para>
en: <systemitem role="package">lib<replaceable>foo</replaceable><replaceable>1</replaceable></systemitem>: the library package for the shared library <filename>lib<replaceable>foo</replaceable>.so.<replaceable>1</replaceable></filename> with the SONAME ABI version <replaceable>1</replaceable>.<placeholder type="footnote" id="0"/>
zh_CN: <systemitem role="package">lib<replaceable>foo</replaceable><replaceable>1</replaceable></systemitem>:  共享庫 <filename>lib<replaceable>foo</replaceable>.so.<replaceable>1</replaceable></filename> 的庫文件包，其 SONAME ABI 版本爲 <replaceable>1</replaceable>.<placeholder type="footnote" id="0"/>

note: type: Content of: <book><appendix><section><itemizedlist><listitem><para><footnote><para>
en: See <ulink url="&policy-ldconfig;">Debian Policy Manual, 8.1.1 "ldconfig"</ulink>.
zh_CN: 參見 <ulink url="&policy-ldconfig;">Debian Policy Manual, 8.1.1 "ldconfig"</ulink>.

note: type: Content of: <book><appendix><section><itemizedlist><listitem><para>
en: The package maintainer scripts of the library package must call <command>ldconfig</command> under the specific circumstances to create the necessary symbolic links for the SONAME.<placeholder type="footnote" id="0"/>
zh_CN: 在某些情況下，庫軟件包的 maintainer scripts 必須調用 <command>ldconfig</command> 來爲 SONAME 創建 必要的符號鏈接。<placeholder type="footnote" id="0"/>

note: type: Content of: <book><appendix><section><itemizedlist><listitem><para>
en: <systemitem role="package">lib<replaceable>foo</replaceable><replaceable>1</replaceable>-dbg</systemitem>: the debugging symbols package that contains the debugging symbols for the shared library package <systemitem role="package">lib<replaceable>foo</replaceable><replaceable>1</replaceable></systemitem>.
zh_CN: <systemitem role="package">lib<replaceable>foo</replaceable><replaceable>1</replaceable>-dbg</systemitem>: 包含了除錯共享庫包用的除錯符號的軟體包 <systemitem role="package">lib<replaceable>foo</replaceable><replaceable>1</replaceable></systemitem>.

note: type: Content of: <book><appendix><section><itemizedlist><listitem><para><footnote><para>
en: See <ulink url="&policy-static;">Debian Policy Manual, 8.3 "Static libraries"</ulink> and <ulink url="&policy-dev;">Debian Policy Manual, 8.4 "Development files"</ulink>.
zh_CN: 參見 <ulink url="&policy-static;">Debian Policy Manual, 8.3 "Static libraries"</ulink> and <ulink url="&policy-dev;">Debian Policy Manual, 8.4 "Development files"</ulink>.

note: type: Content of: <book><appendix><section><itemizedlist><listitem><para>
en: <systemitem role="package">lib<replaceable>foo</replaceable>-dev</systemitem>: the development package that contains the header files etc. for the shared library <filename>lib<replaceable>foo</replaceable>.so.<replaceable>1</replaceable></filename>.<placeholder type="footnote" id="0"/>
zh_CN: <systemitem role="package">lib<replaceable>foo</replaceable>-dev</systemitem>: 包含了標頭檔案等內容的開發包。用於 <filename>lib<replaceable>foo</replaceable>.so.<replaceable>1</replaceable></filename>.<placeholder type="footnote" id="0"/>

note: type: Content of: <book><appendix><section><itemizedlist><listitem><para><footnote><para>
en: See <ulink url="&removela;">Debian wiki ReleaseGoals/LAFileRemoval</ulink>.
zh_CN: 參見 <ulink url="&removela;">Debian wiki ReleaseGoals/LAFileRemoval</ulink>.

note: type: Content of: <book><appendix><section><itemizedlist><listitem><para>
en: Debian packages should not contain <filename>*.la</filename> Libtool archive files in general.<placeholder type="footnote" id="0"/>
zh_CN: 一般而言，Debian 軟體包不應當包含 <filename>*.la</filename> Libtool 歸檔檔案。 <placeholder type="footnote" id="0"/>

note: type: Content of: <book><appendix><section><itemizedlist><listitem><para><footnote><para>
en: See <ulink url="&rpathissues;">Debian wiki RpathIssue</ulink>.
zh_CN: 參見 <ulink url="&rpathissues;">Debian wiki RpathIssue</ulink>.

note: type: Content of: <book><appendix><section><itemizedlist><listitem><para>
en: Debian packages should not use RPATH in general.<placeholder type="footnote" id="0"/>
zh_CN: 一般來說，Debian 軟體包不應當使用 RPATH。<placeholder type="footnote" id="0"/>

note: type: Content of: <book><appendix><section><itemizedlist><listitem><para>
en: Although it is somewhat outdated and is only a secondary reference, <ulink url="&debianlibrarypackagingguide;">Debian Library Packaging Guide</ulink> may still be useful.
zh_CN: 雖然這有點過時，而且是第二參考， <ulink url="&debianlibrarypackagingguide;">Debian Library Packaging Guide</ulink> 可能仍然對你有用。

note: type: Content of: <book><appendix><section><title>
en: Managing <filename>debian/<replaceable>package</replaceable>.symbols</filename>
zh_CN: 管理 <filename>debian/<replaceable>package</replaceable>.symbols</filename>

note: type: Content of: <book><appendix><section><para><footnote><para>
en: Backward-incompatible ABI changes normally require you to update the SONAME of the library and the shared library package name to new ones.
zh_CN: 向後不兼容的 ABI 變更常常需要你更新共享庫的 SONAME，並把共享庫名稱換成新的。

note: type: Content of: <book><appendix><section><para>
en: When you package a shared library, you should create a <filename>debian/<replaceable>package</replaceable>.symbols</filename> file to manage the minimal version associated with each symbol for backward-compatible ABI changes under the same SONAME of the library for the same shared library package name.<placeholder type="footnote" id="0"/> You should read the following primary references in detail:
zh_CN: 當你給共享庫打包時，你應當建立 <filename>debian/<replaceable>package</replaceable>.symbols</filename> 檔案來管理在共享庫名稱不變，在同一個 SONAME 下又要提供 ABI 向後相容性的情況下每個符號關聯到的最小版本號。 <placeholder type="footnote" id="0"/> 你可以閱讀下邊的主要參考以獲知細節：

note: type: Content of: <book><appendix><section><itemizedlist><listitem><para><footnote><para>
en: For C++ libraries and other cases where tracking individual symbols is too difficult, follow <ulink url="&policy-library-shlibs;">Debian Policy Manual, 8.6.4 "The shlibs system"</ulink>, instead.
zh_CN: 對於 C++ 庫和其他追蹤單個符號過於困難的情況下，請遵循  <ulink url="&policy-library-shlibs;">Debian Policy Manual, 8.6.4 "The shlibs system"</ulink>。

note: type: Content of: <book><appendix><section><para>
en: Here is a rough example of how to create the <systemitem role="package">libfoo1</systemitem> package from the upstream version <literal>1.3</literal> with the proper <filename>debian/libfoo1.symbols</filename> file:
zh_CN: 這是個粗略的例子，用來來演示建立 <systemitem role="package">libfoo1</systemitem> 軟體包的方法，此時使用上游 <literal>1.3</literal> 版本，有著妥當的<filename>debian/libfoo1.symbols</filename> 檔案：

note: type: Content of: <book><appendix><section><itemizedlist><listitem><para>
en: Prepare the skeleton debianized source tree using the upstream <filename>libfoo-1.3.tar.gz</filename> file.
zh_CN: 使用上游提供的 <filename>libfoo-1.3.tar.gz</filename> 文件來準備 Debian化 的源碼骨架。

note: type: Content of: <book><appendix><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: If this is the first packaging of the <systemitem role="package">libfoo1</systemitem> package, create the <filename>debian/libfoo1.symbols</filename> file with empty content.
zh_CN: 如果這是庫軟件包 <systemitem role="package">libfoo1</systemitem> 的第一次打包，那麼以空內容創建 <filename>debian/libfoo1.symbols</filename> 文件。

note: type: Content of: <book><appendix><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: If the previous upstream version <literal>1.2</literal> was packaged as the <systemitem role="package">libfoo1</systemitem> package with the proper <filename>debian/libfoo1.symbols</filename> in its source package, use it again.
zh_CN: 如果之前的上游版本 <literal>1.2</literal> 已經被 <systemitem role="package">libfoo1</systemitem> 軟件包打包了，並且其源碼包中有妥當的 <filename>debian/libfoo1.symbols</filename>， 再用它一次。

note: type: Content of: <book><appendix><section><itemizedlist><listitem><itemizedlist><listitem><para><footnote><para>
en: All previous versions of Debian packages are available at <ulink url="&snapshot;">http://snapshot.debian.org/</ulink>.  The Debian revision is dropped from the version to make it easier to backport the package: <literal>1.1</literal> &lt;&lt; <literal>1.1-1~bpo70+1</literal> &lt;&lt; <literal>1.1-1</literal> and <literal>1.2</literal> &lt;&lt; <literal>1.2-1~bpo70+1</literal> &lt;&lt; <literal>1.2-1</literal>
zh_CN: 所有先前的 Debian 軟件包版本都能在 <ulink url="&snapshot;">http://snapshot.debian.org/</ulink> 找到。不過 Debian 修訂號 被去掉了，以使軟件包的 backport 更爲容易： <literal>1.1</literal> &lt;&lt; <literal>1.1-1~bpo70+1</literal> &lt;&lt; <literal>1.1-1</literal> and <literal>1.2</literal> &lt;&lt; <literal>1.2-1~bpo70+1</literal> &lt;&lt; <literal>1.2-1</literal>

note: type: Content of: <book><appendix><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: If the previous upstream version <literal>1.2</literal> was not packaged with <filename>debian/libfoo1.symbols</filename>, create it as the <filename>symbols</filename> file from all available binary packages of the same shared library package name containing the same SONAME of the library, for example, versions <literal>1.1-1</literal> and <literal>1.2-1</literal>.  <placeholder type="footnote" id="0"/>
zh_CN: 如果前一個上游 <literal>1.2</literal> 版本打包時沒有 <filename>debian/libfoo1.symbols</filename>，那就從具有相同庫 SONAME 的同一個共享庫包的所有可用的二進位制軟體包中建立它並命名為 <filename>symbols</filename> 檔案。比如 <literal>1.1-1</literal> 和 <literal>1.2-1</literal>。 <placeholder type="footnote" id="0"/>

note: type: Content of: <book><appendix><section><itemizedlist><listitem><para>
en: Make trial builds of the source tree with tools such as <command>debuild</command> and <command>pdebuild</command>.  (If this fails due to missing symbols etc., there were some backward-incompatible ABI changes that require you to bump the shared library package name to something like <systemitem role="package">libfoo1a</systemitem> and you should start over again.)
zh_CN: 嘗試用像 <command>debuild</command> 和 <command>pdebuild</command> 這樣的工具來對原始碼樹進行試構建。 (如果這因為缺失符號之類原因而失敗，那麼這裡就有一些不向後相容的 ABI 改變，這就需要你轉移(bump)共享庫的名稱到諸如 <systemitem role="package">libfoo1a</systemitem> ，並重新開始一次。）

note: type: Content of: <book><appendix><section><itemizedlist><listitem><para><footnote><para>
en: The Debian revision is dropped from the version to make it easier to backport the package: <literal>1.3</literal> &lt;&lt; <literal>1.3-1~bpo70+1</literal> &lt;&lt; <literal>1.3-1</literal>
zh_CN: Debian 修訂號已被從版本中去掉，這能讓軟件包的 backport 更爲容易： <literal>1.3</literal> &lt;&lt; <literal>1.3-1~bpo70+1</literal> &lt;&lt; <literal>1.3-1</literal>

note: type: Content of: <book><appendix><section><itemizedlist><listitem><para>
en: If you see the diff printed by the <command>dpkg-gensymbols</command> as above, extract the proper updated <filename>symbols</filename> file from the generated binary package of the shared library.  <placeholder type="footnote" id="0"/>
zh_CN: 如果你如上述看見由 <command>dpkg-gensymbols</command> 命令打印出來的差異， 那就從生成的二進位制庫包中抽取妥當更新的 <filename>symbols</filename> 檔案。 <placeholder type="footnote" id="0"/>

note: type: Content of: <book><appendix><section><itemizedlist><listitem><para>
en: Build release packages with tools such as <command>debuild</command> and <command>pdebuild</command>.
zh_CN: 使用像 <command>debuild</command> 和 <command>pdebuild</command> 這樣的工具來構建發行軟件包。

note: type: Content of: <book><appendix><section><para><footnote><para>
en: See <ulink url="&policy-library-abi;">Debian Policy Manual, 8.6.2 "Shared library ABI changes"</ulink>.
zh_CN: 參見 <ulink url="&policy-library-abi;">Debian Policy Manual, 8.6.2 "Shared library ABI changes"</ulink>.

note: type: Content of: <book><appendix><section><para>
en: In addition to the above examples, we need to check the ABI compatibility further and bump versions for some symbols manually as needed.  <placeholder type="footnote" id="0"/>
zh_CN: 對上邊這個例子補充一點，我們需要進一步檢查 ABI (應用程序二進制接口) 兼容性 並在需要的時候手動更新一些符號的版本。  <placeholder type="footnote" id="0"/>

note: type: Content of: <book><appendix><section><para>
en: Although it is only a secondary reference, <ulink url="&usingsymbolsfiles;">Debian wiki UsingSymbolsFiles</ulink> and its linked web pages may be useful.
zh_CN: 雖然這只是第二參考， <ulink url="&usingsymbolsfiles;">Debian wiki UsingSymbolsFiles</ulink> 和它指向的頁面可能會有所幫助。

note: type: Content of: <book><appendix><section><title>
en: Multiarch
zh_CN: 多體繫結構

note: type: Content of: <book><appendix><section><para>
en: The multiarch feature introduced to Debian wheezy integrates support for cross-architecture installation of binary packages (particularly <literal>i386</literal>&lt;-&gt;<literal>amd64</literal>, but also other combinations) in <systemitem role="package">dpkg</systemitem> and <systemitem role="package">apt</systemitem>. You should read the following references in detail:
zh_CN: Debian wheezy 引入的多體繫結構特性，集成了對 二進制包跨體繫結構安裝的支持 (尤其是 <literal>i386</literal>&lt;-&gt;<literal>amd64</literal>，其他的組合也有) 於 <systemitem role="package">dpkg</systemitem> 和 <systemitem role="package">apt</systemitem> 中。你可以閱讀下邊的參考：

note: type: Content of: <book><appendix><section><itemizedlist><listitem><para>
en: <ulink url="&multiarchspec;">Ubuntu wiki MultiarchSpec</ulink> (upstream)
zh_CN: <ulink url="&multiarchspec;">Ubuntu wiki MultiarchSpec</ulink> (上游)

note: type: Content of: <book><appendix><section><itemizedlist><listitem><para>
en: <ulink url="&multiarchimplementation;">Debian wiki Multiarch/Implementation</ulink> (Debian situation)
zh_CN: <ulink url="&multiarchimplementation;">Debian wiki Multiarch/Implementation</ulink> (Debian 的局勢)

note: type: Content of: <book><appendix><section><para><footnote><para>
en: Old special purpose library paths such as <filename>/lib32/</filename> and <filename>/lib64/</filename> are not used anymore.
zh_CN: 老舊且具有特殊用途的庫路徑，比如 <filename>/lib32/</filename> 和 <filename>/lib64/</filename> 已不再使用。

note: type: Content of: <book><appendix><section><para>
en: It uses the triplet such as <literal>i386-linux-gnu</literal> and <literal>x86_64-linux-gnu</literal> for the install path of shared libraries. The actual triplet path is dynamically set into the <literal>$(DEB_HOST_MULTIARCH)</literal> variable using the <citerefentry> <refentrytitle>dpkg-architecture</refentrytitle><manvolnum>1</manvolnum></citerefentry> command for each binary package build. For example, the path to install multiarch libraries are changed as follows:<placeholder type="footnote" id="0"/>
zh_CN: 它爲每個共享庫的安裝路徑使用了類似 <literal>i386-linux-gnu</literal> 和 <literal>x86_64-linux-gnu</literal> 這樣的三元名字。實際上每個二進制軟件包構建的三元路徑是被動態設置到 <literal>$(DEB_HOST_MULTIARCH)</literal> 變量中的，經由 <citerefentry> <refentrytitle>dpkg-architecture</refentrytitle><manvolnum>1</manvolnum></citerefentry> 命令。舉個例子， 安裝多體繫結構庫文件的路徑被按照下表進行了修改：<placeholder type="footnote" id="0"/>

note: type: Content of: <book><appendix><section><informaltable><tgroup><thead><row><entry>
en: Old path
zh_CN: 舊路徑

note: type: Content of: <book><appendix><section><informaltable><tgroup><thead><row><entry>
en: i386 multiarch path
zh_CN: i386 多體繫結構路徑

note: type: Content of: <book><appendix><section><informaltable><tgroup><thead><row><entry>
en: amd64 multiarch path
zh_CN: amd64 多體繫結構路徑

note: type: Content of: <book><appendix><section><para>
en: Here are some typical multiarch package split scenario examples for the following:
zh_CN: 下面是一些典型的多體系結構軟體包分離情景：

note: type: Content of: <book><appendix><section><itemizedlist><listitem><para>
en: a library source <filename>lib<replaceable>foo</replaceable>-1.tar.gz</filename>
zh_CN: 庫源碼 <filename>lib<replaceable>foo</replaceable>-1.tar.gz</filename>

note: type: Content of: <book><appendix><section><itemizedlist><listitem><para>
en: a tool source <filename><replaceable>bar</replaceable>-1.tar.gz</filename> written in a compiled language
zh_CN: 一個用編譯型語言編寫的工具的源碼 <filename><replaceable>bar</replaceable>-1.tar.gz</filename>

note: type: Content of: <book><appendix><section><itemizedlist><listitem><para>
en: a tool source <filename><replaceable>baz</replaceable>-1.tar.gz</filename> written in an interpreted language
zh_CN: 一個用解釋型語言編寫的工具的源碼 <filename><replaceable>bar</replaceable>-1.tar.gz</filename>

note: type: Content of: <book><appendix><section><informaltable><tgroup><thead><row><entry>
en: Package
zh_CN: 軟件包

note: type: Content of: <book><appendix><section><informaltable><tgroup><thead><row><entry>
en: Architecture:
zh_CN: 體繫結構：

note: type: Content of: <book><appendix><section><informaltable><tgroup><thead><row><entry>
en: Multi-Arch:
zh_CN: 多體繫結構：

note: type: Content of: <book><appendix><section><informaltable><tgroup><thead><row><entry>
en: Package content
zh_CN: 軟件包內容

note: type: Content of: <book><appendix><section><informaltable><tgroup><tbody><row><entry>
en: any
zh_CN: 任何

note: type: Content of: <book><appendix><section><informaltable><tgroup><tbody><row><entry>
en: same
zh_CN: 相同

note: type: Content of: <book><appendix><section><informaltable><tgroup><tbody><row><entry>
en: the shared library, co-installable
zh_CN: 共享庫，可共同安裝

note: type: Content of: <book><appendix><section><informaltable><tgroup><tbody><row><entry>
en: the shared library debug symbols, co-installable
zh_CN: 共享庫調試符號，可共同安裝

note: type: Content of: <book><appendix><section><informaltable><tgroup><tbody><row><entry>
en: the shared library header files etc., co-installable
zh_CN: 共享庫頭文件之類，可共同安裝

note: type: Content of: <book><appendix><section><informaltable><tgroup><tbody><row><entry>
en: foreign
zh_CN: 外來

note: type: Content of: <book><appendix><section><informaltable><tgroup><tbody><row><entry>
en: the run-time support programs, not co-installable
zh_CN: 運行時支持程序，不可共同安裝

note: type: Content of: <book><appendix><section><informaltable><tgroup><tbody><row><entry>
en: all
zh_CN: 全部

note: type: Content of: <book><appendix><section><informaltable><tgroup><tbody><row><entry>
en: the shared library documentation files
zh_CN: 共享庫文檔

note: type: Content of: <book><appendix><section><informaltable><tgroup><tbody><row><entry>
en: the compiled program files, not co-installable
zh_CN: 編譯好的程序文件，不可共同安裝

note: type: Content of: <book><appendix><section><informaltable><tgroup><tbody><row><entry>
en: the documentation files for the program
zh_CN: 程序的配套文檔文件

note: type: Content of: <book><appendix><section><informaltable><tgroup><tbody><row><entry>
en: the interpreted program files
zh_CN: 解釋型程序文件

note: type: Content of: <book><appendix><section><para>
en: Please note that the development package should contain a symlink for the associated shared library <emphasis role="strong">without a version number</emphasis>.  E.g.: <filename>/usr/lib/x86_64-linux-gnu/libfoo.so</filename> -&gt; <filename>libfoo.so.1</filename>
zh_CN: 請注意，開發軟件包應該包含一個指向共享庫的符號鏈接並且 <emphasis role="strong">不帶有版本號</emphasis>。 比如： <filename>/usr/lib/x86_64-linux-gnu/libfoo.so</filename> -&gt; <filename>libfoo.so.1</filename>

note: type: Content of: <book><appendix><section><title>
en: Building a shared library package
zh_CN: 構建共享庫包

note: type: Content of: <book><appendix><section><para>
en: You can build a Debian library package enabling multiarch support using <citerefentry> <refentrytitle>dh</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> as follows:
zh_CN: 你可以用 <citerefentry> <refentrytitle>dh</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> 透過以下方法構建一個支援多體系結構的 Debian 庫軟體包：

note: type: Content of: <book><appendix><section><itemizedlist><listitem><para>
en: Update <filename>debian/control</filename>.
zh_CN: 更新 <filename>debian/control</filename>。

note: type: Content of: <book><appendix><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: Add <literal>Build-Depends: debhelper (>=10)</literal> for the source package section.
zh_CN: 為原始碼包部分新增 <literal>Build-Depends: debhelper (>=10)</literal> 部分。

note: type: Content of: <book><appendix><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: Add <literal>Pre-Depends: ${misc:Pre-Depends}</literal> for each shared library binary package.
zh_CN: 爲每個二進制庫軟件包添加 <literal>Pre-Depends: ${misc:Pre-Depends}</literal> 。

note: type: Content of: <book><appendix><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: Add <literal>Multi-Arch:</literal> stanza for each binary package section.
zh_CN: 在每個二進制包的段中添加 <literal>Multi-Arch:</literal> 小節。

note: type: Content of: <book><appendix><section><itemizedlist><listitem><para>
en: Set <filename>debian/compat</filename> to "10".
zh_CN: 設定 <filename>debian/compat</filename> 為"10"。

note: type: Content of: <book><appendix><section><itemizedlist><listitem><para>
en: Adjust the path from the normal <literal>/usr/lib/</literal> to the multiarch <literal>/usr/lib/$(DEB_HOST_MULTIARCH)/</literal> for all packaging scripts.
zh_CN: 將所有打包腳本中的路徑從普通的 <literal>/usr/lib/</literal> 調整到 多體繫結構的 <literal>/usr/lib/$(DEB_HOST_MULTIARCH)/</literal>。

note: type: Content of: <book><appendix><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: Call <literal>DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)</literal> in <filename>debian/rules</filename> to set the <literal>DEB_HOST_MULTIARCH</literal> variable first.
zh_CN: 首先，在 <filename>debian/rules</filename> 中呼叫 <literal>DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)</literal> 以設定 <literal>DEB_HOST_MULTIARCH</literal> 變數。

note: type: Content of: <book><appendix><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: Replace <literal>/usr/lib/</literal> with <literal>/usr/lib/$(DEB_HOST_MULTIARCH)/</literal> in <filename>debian/rules</filename>.
zh_CN: 在 <filename>debian/rules</filename> 中用 <literal>/usr/lib/$(DEB_HOST_MULTIARCH)/</literal> 替換 <literal>/usr/lib/</literal>。

note: type: Content of: <book><appendix><section><itemizedlist><listitem><itemizedlist><listitem><para><footnote><para>
en: Alternatively, you can add <literal>--libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH)</literal> and <literal>--libexecdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH)</literal> arguments to <literal>./configure</literal>.  Please note that <literal>--libexecdir</literal> specifies the default path to install executable programs run by other programs rather than by users.  Its Autotools default is <filename>/usr/libexec/</filename> but its Debian default is <filename>/usr/lib/</filename>.
zh_CN: 作爲替代，你可以添加 <literal>--libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH)</literal> 和 <literal>--libexecdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH)</literal> 參數到 <literal>./configure</literal> 後頭。 請注意 <literal>--libexecdir</literal> 指定了 安裝可執行程序(它們被其他程序使用，而更少是用戶)的默認路徑。它的 Autotools 默認設置爲 <filename>/usr/libexec/</filename> 但是 Debian 的設置爲 <filename>/usr/lib/</filename>。

note: type: Content of: <book><appendix><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: If <literal>./configure</literal> is used in part of the <literal>override_dh_auto_configure</literal> target in <filename>debian/rules</filename>, make sure to replace it with <literal>dh_auto_configure -- </literal>.  <placeholder type="footnote" id="0"/>
zh_CN: 如果 <filename>debian/rules</filename> 檔案中的 <literal>override_dh_auto_configure</literal> 目標使用了 <literal>./configure</literal> 檔案，那麼請確認用 <literal>dh_auto_configure -- </literal> 來替換它。  <placeholder type="footnote" id="0"/>

note: type: Content of: <book><appendix><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: Replace all occurrences of <literal>/usr/lib/</literal> with <literal>/usr/lib/*/</literal> in <filename>debian/<replaceable>foo</replaceable>.install</filename> files.
zh_CN: 在<filename>debian/<replaceable>foo</replaceable>.install</filename> 文件中將所有 <literal>/usr/lib/</literal> 的事件替換爲 <literal>/usr/lib/*/</literal> 。

note: type: Content of: <book><appendix><section><itemizedlist><listitem><itemizedlist><listitem><para>
en: Generate files like <filename>debian/<replaceable>foo</replaceable>.links</filename> from <filename>debian/<replaceable>foo</replaceable>.links.in</filename> dynamically by adding a script to the <literal>override_dh_auto_configure</literal> target in <filename>debian/rules</filename>.
zh_CN: 如需從 <filename>debian/<replaceable>foo</replaceable>.links.in</filename> 動態地生成像 <filename>debian/<replaceable>foo</replaceable>.links</filename> 這樣的檔案，可以新增一個指令碼到 <filename>debian/rules</filename> 檔案的 <literal>override_dh_auto_configure</literal> 目標中。

note: type: Content of: <book><appendix><section><para>
en: Please make sure to verify that the shared library package contains only the expected files, and that your -dev package still works.
zh_CN: 請確認該共享庫軟件包僅僅包含預期中的文件，並且你的 -dev 軟件包還奏效。

note: type: Content of: <book><appendix><section><para>
en: All files installed simultaneously as the multiarch package to the same file path should have exactly the same file content.  You must be careful of differences generated by the data byte order and by the compression algorithm.
zh_CN: 所有作為多體系結構軟體包而同時安裝到同一個檔案路徑的所有檔案應當具有完全一致的檔案內容。你必須小心由資料位元組序和壓縮演算法造成的區別。

note: type: Content of: <book><appendix><section><title>
en: Native Debian package
zh_CN: Debian 本土軟件包

note: type: Content of: <book><appendix><section><para>
en: If a package is maintained only for Debian or possibly only for local use, its source may contain all the <filename>debian/*</filename> files in it.  There are 2 ways to package it.
zh_CN: 如果一個軟件包是僅僅爲 Debian 維護的，或者是可能的本地使用，那麼它的源碼可以容納所有的 <filename>debian/*</filename> 於其中。這裏有它的兩種打包方式。

note: type: Content of: <book><appendix><section><para>
en: You can make the upstream tarball by excluding the <filename>debian/*</filename> files and package it as a non-native Debian package as in <xref linkend="workflow"/>.  This is the normal way, which some people encourage using.
zh_CN: 你可以將除 <filename>debian/*</filename> 檔案之外的部分製作成上游 tarball，然後將其作為非本土 Debian 軟體包來打包，正如 <xref linkend="workflow"/> 所述。 這是一些人鼓勵使用的普通方法。

note: type: Content of: <book><appendix><section><para>
en: The alternative is the workflow of the native Debian package.
zh_CN: 另一種方法就是本土 Debian 軟件包的打包工作流。

note: type: Content of: <book><appendix><section><itemizedlist><listitem><para>
en: Create a native Debian source package in the <literal>3.0 (native)</literal> format using a single compressed tar file in which all files are included.
zh_CN: 用包含所有文件的，單一壓縮過的 tar 文件，以 <literal>3.0 (native)</literal> 格式來創建本土 Debian 源碼包。

note: type: Content of: <book><appendix><section><itemizedlist><listitem><para>
en: Build Debian binary packages from the native Debian source package.
zh_CN: 用 Debian 本土源碼包構建二進制包

note: type: Content of: <book><appendix><section><para>
en: For example, if you have source files in <filename>~/mypackage-1.0</filename> without the <filename>debian/*</filename> files, you can create a native Debian package by issuing the <command>dh_make</command> command as follows:
zh_CN: 比如說，如果你的原始碼檔案都存放在 <filename>~/mypackage-1.0</filename> 中，而且沒有 <filename>debian/*</filename> 這些檔案，那麼你可以用它建立 一個本土 Debian 軟體包，只要按照下邊的方法使用 <command>dh_make</command> 命令：

note: type: Content of: <book><appendix><section><para>
en: Then the <filename>debian</filename> directory and its contents are created just like in <xref linkend="non-native-dh-make"/>.  This does not create a tarball, since this is a native Debian package.  But that is the only difference.  The rest of the packaging activities are practically the same.
zh_CN: 接下來 <filename>debian</filename> 目錄和它的內容都會被建立， 正如 <xref linkend="non-native-dh-make"/> 中那樣。 這不會建立一個 tarball，因為這是個本土 Debian 軟體包。不過這也是唯一的區別。 剩下的打包操作就是完全一致的了。

note: type: Content of: <book><appendix><section><para>
en: After execution of the <command>dpkg-buildpackage</command> command, you will see the following files in the parent directory:
zh_CN: 在執行了 <command>dpkg-buildpackage</command> 命令後，你將會在上一級目錄中看到這些文件：

note: type: Content of: <book><appendix><section><itemizedlist><listitem><para>
en: This is the source code tarball created from the <filename>mypackage-1.0</filename> directory by the <command>dpkg-source</command> command.  (Its suffix is not <filename>orig.tar.gz</filename>.)
zh_CN: 這是 <command>dpkg-source</command> 命令用 <filename>mypackage-1.0</filename> 目錄創建出來的源代碼 tarball 。 (它的 文件名後綴不是 <filename>orig.tar.gz</filename>)

note: type: Content of: <book><appendix><section><itemizedlist><listitem><para>
en: This is a summary of the contents of the source code, as in the non-native Debian package. (There is no Debian revision.)
zh_CN: 這是對原始碼內容的簡述，正如在非本土 Debian 軟體包中那樣。（沒有 Debian 修訂號。）

note: type: Content of: <book><appendix><section><itemizedlist><listitem><para>
en: This is your completed binary package, as in the non-native Debian package.  (There is no Debian revision.)
zh_CN: 這是完成的二進位制包，正如在非本土 Debian 軟體包中那樣。（沒有 Debian 修訂號。）

note: type: Content of: <book><appendix><section><itemizedlist><listitem><para>
en: This file describes all the changes made in the current package version as in the non-native Debian package. (There is no Debian revision.)
zh_CN: 這個文件描述了這個軟件作爲外來 Debian 包，在當前版本所作出的所有更改。（沒有 Debian 修訂）
