# Chinese translations for maint-guide package # maint-guide 套件的繁體中文翻譯 # Copyright (C) 2010 Free Software Foundation, Inc. # This file is distributed under the same license as the maint-guide package. # Aron , 2010. # zh-tw by Osamu Aoki # msgid "" msgstr "" "Project-Id-Version: maint-guide HEAD\n" "POT-Creation-Date: 2011-04-16 16:11+0900\n" "PO-Revision-Date: 2010-12-19 20:51+0900\n" "Last-Translator: Aron Xu \n" "Language-Team: Chinese (simplified) \n" "Language: zh_CN\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. type: Attribute 'lang' of: msgid "en" msgstr "zh-tw" #. type: Content of: msgid "Debian New Maintainers' Guide" msgstr "Debian 新維護人員手冊" #. type: Content of: <book><bookinfo><authorgroup><author><personname> msgid "Josip Rodin" msgstr "" #. type: Content of: <book><bookinfo><authorgroup><author><email> msgid "joy-mg@debian.org" msgstr "joy-mg@debian.org" #. type: Content of: <book><bookinfo><authorgroup><author><contrib> msgid "original contents" msgstr "" #. type: Content of: <book><bookinfo><authorgroup><author><personname> msgid "Osamu Aoki" msgstr "" #. type: Content of: <book><bookinfo><authorgroup><author><email> msgid "osamu@debian.org" msgstr "osamu@debian.org" #. type: Content of: <book><bookinfo><authorgroup><author><contrib> msgid "updated contents" msgstr "" #. type: Content of: <book><bookinfo><releaseinfo> msgid "version &docversion;" msgstr "版本 &docversion;" #. type: Content of: <book><bookinfo> msgid "" "<pubdate>&docisodate;</pubdate> <copyright><year>1998-2002</year> " "<holder>Josip Rodin</holder></copyright> <copyright><year>2005-2011</year> " "<holder>Osamu Aoki</holder></copyright> <copyright><year>2010</year> " "<holder>Craig Small</holder></copyright> <copyright><year>2010</year> " "<holder>Raphaël Hertzog</holder></copyright>" msgstr "" "<pubdate>&docisodate;</pubdate> <copyright><year>1998-2002</year> " "<holder>Josip Rodin</holder></copyright> <copyright><year>2005-2011</year> " "<holder>Osamu Aoki</holder></copyright> <copyright><year>2010</year> " "<holder>Craig Small</holder></copyright> <copyright><year>2010</year> " "<holder>Raphaël Hertzog</holder></copyright>" #. type: Content of: <book><bookinfo><legalnotice><para> msgid "" "This document may be used under the terms the GNU General Public License " "version 2 or higher." msgstr "本文件可在 GNU 通用公共許可證第二版或更高版本的條款規定下使用。" #. type: Content of: <book><bookinfo><legalnotice><para> msgid "This document was made using with these two documents as examples:" msgstr "本文件在撰寫過程中參考了以下兩篇文件:" #. type: Content of: <book><bookinfo><legalnotice><itemizedlist><listitem><para> msgid "" "Making a Debian Package (AKA the Debmake Manual), copyright © 1997 Jaldhar " "Vyas." msgstr "" #. type: Content of: <book><bookinfo><legalnotice><itemizedlist><listitem><para> msgid "" "The New-Maintainer's Debian Packaging Howto, copyright © 1997 Will Lowe." msgstr "" #. type: Content of: <book><chapter><title> msgid "Getting started The Right Way" msgstr "從一條正確的路開始" #. type: Content of: <book><chapter><para> msgid "" "This document tries to describe building of a Debian package to the common " "Debian user, and the prospectus developer. It uses pretty common language, " "and it's well covered with working examples. There is an old Roman saying, " "<emphasis>Longum iter est per preaecepta, breve et efficax per exempla!</" "emphasis> (It's a long way by the rules, but short and efficient with " "examples!)." msgstr "" "本文件試圖爲普通 Debian 用戶,和希望對 Debian 套件有所瞭解的開發人員講述如何" "製作 Debian 套件。它使用了通俗的語言,並輔以大量可用於實踐的範例。有一句古羅" "馬諺語說得好:<emphasis>一例勝千言!</emphasis>" #. type: Content of: <book><chapter><para><footnote><para> #, fuzzy #| msgid "" #| "The document assumes you are using the <literal>squeeze</literal> " #| "system. If you need to follow this text in the <literal>lenny</literal> " #| "system, you must install backported <systemitem role=\"package\">dpkg</" #| "systemitem> and <systemitem role=\"package\">debhelper</systemitem> " #| "packages, at least." msgid "" "The document assumes you are using the <literal>&base-release;</literal> " "system or newer. 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." msgstr "" "本文件默認您使用 <literal>squeeze</literal> 爲作業系統。如果你需要在 " "<literal>lenny</literal> 系統上使用本文件記述的方法,則至少必須安裝 " "backports 的 <systemitem role=\"package\">dpkg</systemitem> 和 <systemitem " "role=\"package\">debhelper</systemitem> 套件。" #. type: Content of: <book><chapter><para> #, fuzzy #| msgid "" #| "This document has been updated for the Debian <literal>squeeze</literal> " #| "release. <placeholder type=\"footnote\" id=\"0\"/>" msgid "" "This document has been updated for the Debian <literal>&base-release;</" "literal> release. <placeholder type=\"footnote\" id=\"0\"/>" msgstr "" "本文件已經爲 Debian <literal>squeeze</literal> 進行了更新。 <placeholder " "type=\"footnote\" id=\"0\"/>" #. type: Content of: <book><chapter><para><footnote><para> msgid "" "You can learn basic operations of the Debian system from <ulink url=" "\"&debref;\">Debian Reference</ulink>. It contains some pointers to learn " "about Unix programming, too." msgstr "" #. type: Content of: <book><chapter><para> #, fuzzy #| msgid "" #| "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 rookie, you wouldn't be reading this " #| "doc now. :-) You do need to know a little about Unix programming but you " #| "certainly don't need to be a wizard." msgid "" "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 rookie, you wouldn't be reading this doc now. :-) 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\"/>" msgstr "" "Debian 能夠成爲一個頂級的發行版的原因之一就是它的套件系統。儘管相當數量的軟體" "已經被以 Debian 格式打包,有時還是需要安裝一些不是這一格式的軟體。可能你會爲" "如何製作自己的套件而迷惑,並可能認爲這是很困難的任務。是的,如果你是一個 " "Linux 初學者,那麼這的確很難;不過如果你真的只是一個新手,現在也不會來讀這篇" "文件了。:-) 你的確需要對 Unix 編程有所瞭解,但顯然不需要是這方面的天才。" #. type: Content of: <book><chapter><para> msgid "" "One thing is certain, though: to properly create and maintain Debian " "packages you need many hours. Make no mistake, for our system to work the " "maintainers need to be both technically competent and diligent." msgstr "" "有一件事是非常明確的:創建並維護一個 Debian 套件需要花費很多時間。爲了能夠不" "犯錯誤,維護者需要良好的技術基礎並十分勤奮。" #. type: Content of: <book><chapter><para> msgid "" "This document will explain every little (at first maybe irrelevant) step, " "and help you create that first package, and to gain some experience in " "building next releases of that and maybe other packages later on." msgstr "" "本文件會講述每一個細節(在開始時或許給人感覺毫不相關),並幫助你創建出自己的第" "一個 Debian 套件,從而使你學習到如何打包該軟體的下一個版本或其他軟體的經驗。" #. type: Content of: <book><chapter><para> msgid "" "If you need some help on packaging, please read <xref linkend=\"helpme\"/>." msgstr "如果需要幫助,請閱讀 <xref linkend=\"helpme\"/>。" #. type: Content of: <book><chapter><para> msgid "" "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." msgstr "" #. type: Content of: <book><chapter><section><title> msgid "Social dynamism of Debian" msgstr "" #. type: Content of: <book><chapter><section><para> msgid "" "Here are my observations of the social dynamism of Debian. I hope this will " "prepare you for the interaction with Debian." msgstr "" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "We all are volunteers." msgstr "" #. type: Content of: <book><chapter><section><itemizedlist><listitem><itemizedlist><listitem><para> msgid "You can not impose others what to do." msgstr "" #. type: Content of: <book><chapter><section><itemizedlist><listitem><itemizedlist><listitem><para> msgid "You should be motivated to do things by yourself." msgstr "" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "Friendly cooperation is the driving force." msgstr "" #. type: Content of: <book><chapter><section><itemizedlist><listitem><itemizedlist><listitem><para> msgid "Your contribution should not overstrain others." msgstr "" #. type: Content of: <book><chapter><section><itemizedlist><listitem><itemizedlist><listitem><para> msgid "Your contribution is valuable only when others appreciate it." msgstr "" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "Debian is not your school where you get automatic attention of teachers." msgstr "" #. type: Content of: <book><chapter><section><itemizedlist><listitem><itemizedlist><listitem><para> msgid "You should be able to learn many things by yourself." msgstr "" #. type: Content of: <book><chapter><section><itemizedlist><listitem><itemizedlist><listitem><para> msgid "Attention of other volunteers is the very scarce resource." msgstr "" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "Debian is constantly improving." msgstr "" #. type: Content of: <book><chapter><section><itemizedlist><listitem><itemizedlist><listitem><para> msgid "You are expected to make high quality packages." msgstr "" #. type: Content of: <book><chapter><section><itemizedlist><listitem><itemizedlist><listitem><para> msgid "You should adapt yourself to the change." msgstr "" #. type: Content of: <book><chapter><section><para> msgid "" "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." msgstr "" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "<ulink url=\"&logiciellibre;\">Debian: 17 years of Free Software, \"do-ocracy" "\", and democracy</ulink> (Introductory slides)" msgstr "" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> #, fuzzy #| msgid "<ulink url=\"&wnpp-dn;\">Debian Packages that Need Lovin'</ulink>" msgid "" "<ulink url=\"&debianorghelp;\">How can you help Debian?</ulink> (official)" msgstr "<ulink url=\"&wnpp-dn;\">Debian Packages that Need Lovin'</ulink>" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> #, fuzzy #| msgid "<ulink url=\"&wnpp-dn;\">Debian Packages that Need Lovin'</ulink>" msgid "" "<ulink url=\"&debianfaqhelp;\">The Debian GNU/Linux FAQ, Chapter 13 - " "'Contributing to the Debian Project'</ulink> (semi-official)" msgstr "<ulink url=\"&wnpp-dn;\">Debian Packages that Need Lovin'</ulink>" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "<ulink url=\"&debianwikihelp;\">Debian Wiki, HelpDebian</ulink> " "(supplemental)" msgstr "" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> #, fuzzy #| msgid "<ulink url=\"&wnpp-dn;\">Debian Packages that Need Lovin'</ulink>" msgid "<ulink url=\"&nm-do;\">Debian New Maintainer site</ulink> (official)" msgstr "<ulink url=\"&wnpp-dn;\">Debian Packages that Need Lovin'</ulink>" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "<ulink url=\"&debianmentorfaq;\">Debian Mentors FAQ</ulink> (supplemental)" msgstr "" #. type: Content of: <book><chapter><section><title> msgid "Official Debian Developer" msgstr "正式的 Debian Developer" #. type: Content of: <book><chapter><section><para> #, fuzzy #| msgid "" #| "You can not become an official <emphasis role=\"strong\">Debian " #| "Developer</emphasis> (DD) over night 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>. See <ulink url=\"&nm-join;\">Debian New Maintainers</ulink> " #| "for more." msgid "" "You can not become an official <emphasis role=\"strong\">Debian Developer</" "emphasis> (DD) over night 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>." msgstr "" "你不可能在一夜之間成爲 <emphasis role=\"strong\">Debian Developer</emphasis> " "(DD),因爲一個 DD 所需要的遠不只是技術能力,請不要因此感覺到挫敗或沮喪。如果" "你的軟體對其他人有用,你可以作爲一個 <emphasis role=\"strong\">維護者" "(maintainer)</emphasis> 通過 一位 <emphasis role=\"strong\">保證人(sponsor)</" "emphasis> 來上傳軟體,或者申請成爲一位 <emphasis role=\"strong\">Debian " "Maintainer</emphasis>。詳見 <ulink url=\"&nm-join;\">Debian New Maintainers</" "ulink>。" #. type: Content of: <book><chapter><section><para> msgid "" "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 become an official Debian Developer too. There are many " "packages waiting for good maintainers (see <xref linkend=\"choose\"/>)." msgstr "" "請注意,要成爲一位正式的 Debian Developer 並不一定要創建新套件。對已有軟體做" "出貢獻也是成爲正式的 Debian Developer 的路徑。眼下正有很多套件正在等待一個好" "的維護者對其做出貢獻。(參考 <xref linkend=\"choose\"/>)" #. type: Content of: <book><chapter><section><title> msgid "Programs you need for development" msgstr "開發時需要的軟體" #. type: Content of: <book><chapter><section><para> msgid "" "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." msgstr "" "在開始之前,你需要確認你是否已經正確安裝了開發所需要的附加套件。注意這些套件" "不包含任何已經被標記爲 <literal>essential</literal> 或 <literal>required</" "literal> —— 我們假設你已經安裝了它們。" #. type: Content of: <book><chapter><section><para> #, fuzzy #| msgid "" #| "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 it with <literal>aptitude show " #| "<replaceable>package</replaceable></literal>." msgid "" "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 it with <literal>aptitude show " "<replaceable>package</replaceable></literal> or with <literal>dpkg -s " "<replaceable>package</replaceable></literal>." msgstr "" "以下這些套件已經隨標準的 Debian 安裝而在系統中,所以你可能不需要再動手安裝它" "們(以及任何附加的依賴套件)。然而,你還是應該用 <literal>aptitude show " "<replaceable>package</replaceable></literal> 來檢査一下。" #. type: Content of: <book><chapter><section><para> msgid "" "The most important package to install on your development system is the " "<systemitem role=\"package\">build-essential</systemitem> package. Once you " "try to install it, it will <emphasis>pull in</emphasis> other packages " "required to have a basic build environment." msgstr "" #. type: Content of: <book><chapter><section><para> msgid "" "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 install or may be required by your package:" msgstr "" "對於某些類型的軟體,以上的就是所需要的全部。然而還有一組套件雖不是對於所有套" "件都必須,卻可能對你有用或被你的套件所需要:" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "<systemitem role=\"package\">file</systemitem> - this handy program can " "determine what type a file is. (see <citerefentry> <refentrytitle>file</" "refentrytitle> <manvolnum>1</manvolnum> </citerefentry>)" msgstr "" "<systemitem role=\"package\">file</systemitem> - 這個小程式可以檢測檔案的類" "型。(參考 <citerefentry> <refentrytitle>file</refentrytitle> <manvolnum>1</" "manvolnum> </citerefentry>)" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "<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>)" msgstr "" "<systemitem role=\"package\">patch</systemitem> - 這是一個非常有用的工具,它" "可以把 <command>diff</command> 程式生成的差異清單檔案應用到原先的檔案上,從而" "生成一個補丁版本。(參考 <citerefentry> <refentrytitle>patch</refentrytitle> " "<manvolnum>1</manvolnum> </citerefentry>)" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "<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>)" msgstr "" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "<systemitem role=\"package\">python</systemitem> - Python is another of the " "most used interpreted scripting languages on the Debian system that combines " "remarkable power with very clear syntax. (see <citerefentry> " "<refentrytitle>python</refentrytitle> <manvolnum>1</manvolnum> </" "citerefentry>)" msgstr "" "<systemitem role=\"package\">python</systemitem> - Python 是 Debian 系統中另" "一個最常用的解譯型腳本語言,它擁有着可圈可點的強大功能和十分清晰的語法。(參" "考 <citerefentry> <refentrytitle>python</refentrytitle> <manvolnum>1</" "manvolnum> </citerefentry>)" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "<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 help of programs like " "these. (see <literal>info autoconf</literal>, <literal>info automake</" "literal>). The <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." msgstr "" "<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> 則用於保持指定的自動設定檔案爲最新,並帶有關於使用那些檔案的" "最佳方法的文件。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para><footnote><para> msgid "" "There are few similar but specialized packages such as <systemitem role=" "\"package\">dh-make-perl</systemitem>, <systemitem role=\"package\">dh-make-" "php</systemitem>, etc." msgstr "" "還有幾個類似但更針對某一類軟體的套件,如 <systemitem role=\"package\">dh-" "make-perl</systemitem>、<systemitem role=\"package\">dh-make-php</" "systemitem> 等。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> #, fuzzy #| msgid "" #| "<systemitem role=\"package\">dh-make</systemitem> and <systemitem role=" #| "\"package\">debhelper</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 creation of packages, but are <emphasis>highly</emphasis> " #| "recommended for new maintainers. It makes the whole process very much " #| "easier to start, and control afterwards. (see <citerefentry> " #| "<refentrytitle>dh_make</refentrytitle> <manvolnum>1</manvolnum> </" #| "citerefentry>, <citerefentry> <refentrytitle>debhelper</refentrytitle> " #| "<manvolnum>1</manvolnum> </citerefentry>, <filename>/usr/share/doc/" #| "debhelper/README</filename>) <placeholder type=\"footnote\" id=\"0\"/>" msgid "" "<systemitem role=\"package\">dh-make</systemitem> and <systemitem role=" "\"package\">debhelper</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 creation of " "packages, but are <emphasis>highly</emphasis> recommended for new " "maintainers. It makes the whole process very much easier to start, and " "control afterwards. (see <citerefentry> <refentrytitle>dh_make</" "refentrytitle> <manvolnum>1</manvolnum> </citerefentry>, <citerefentry> " "<refentrytitle>debhelper</refentrytitle> <manvolnum>1</manvolnum> </" "citerefentry>) <placeholder type=\"footnote\" id=\"0\"/>" msgstr "" "<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>1</manvolnum> </" "citerefentry>、<citerefentry> <refentrytitle>debhelper</refentrytitle> " "<manvolnum>1</manvolnum> </citerefentry>、<filename>/usr/share/doc/debhelper/" "README</filename>) <placeholder type=\"footnote\" id=\"0\"/>" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> #, fuzzy #| msgid "" #| "<systemitem role=\"package\">devscripts</systemitem> - this package " #| "contains some nice and useful scripts that can be helpful to the " #| "maintainers, but they are also not necessary for building packages. " #| "Packages recommended and suggested by this package are worth looking " #| "into. (see <filename>/usr/share/doc/devscripts/README.gz</filename>)" msgid "" "<systemitem role=\"package\">devscripts</systemitem> - this package contains " "some nice and useful scripts that can be helpful to the maintainers, but " "they are also not necessary for building packages. Packages recommended and " "suggested by this package are worth looking into. (see <ulink url=" "\"&devscripts-readme;\"/>.)" msgstr "" "<systemitem role=\"package\">devscripts</systemitem> - 此套件提供了一些非常好" "非常有用的腳本幫助維護者,但他們並非構建套件所必須。此套件所推薦或建議的套件" "都值得一看。(參考 <filename>/usr/share/doc/devscripts/README.gz</filename>)" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "<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>)" msgstr "" "<systemitem role=\"package\">fakeroot</systemitem> - 這個工具集使你可以在編譯" "過程中必要的時候用普通用戶模擬 root 用戶環境。(參考 <citerefentry> " "<refentrytitle>fakeroot</refentrytitle> <manvolnum>1</manvolnum> </" "citerefentry>)" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "<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 it 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>)" msgstr "" "<systemitem role=\"package\">gnupg</systemitem> - 使你可以使用 <emphasis>數位" "簽章</emphasis> 簽署你的套件。這在當你想把它散佈給其他人時特別重要。如果你要" "把你的工作加入到 Debian 發行版中,這是必須的步驟。(參考 <citerefentry> " "<refentrytitle>gpg</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>)" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "<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>)" msgstr "" "<systemitem role=\"package\">gfortran</systemitem> - GNU Fortran 95 編譯器," "如果你的程式是用 Fortran 編寫的則必須此套件完成編譯。(參考 <citerefentry> " "<refentrytitle>gfortran</refentrytitle> <manvolnum>1</manvolnum> </" "citerefentry>)" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "<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>)" msgstr "" "<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>)" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "<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>)" msgstr "" "<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>)" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> #, fuzzy #| msgid "" #| "<systemitem role=\"package\">lintian</systemitem> - this is the Debian " #| "package checker that can let 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>, <filename>/usr/share/doc/lintian/lintian.html/index.html</" #| "filename>)" msgid "" "<systemitem role=\"package\">lintian</systemitem> - this is the Debian " "package checker that can let 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>)" msgstr "" "<systemitem role=\"package\">lintian</systemitem> - Debian 套件檢査工具,使你" "可以在編譯套件後知道它是否有常見的錯誤,並對找到的錯誤進行解釋。(參考 " "<citerefentry> <refentrytitle>lintian</refentrytitle> <manvolnum>1</" "manvolnum> </citerefentry>、<filename>/usr/share/doc/lintian/lintian.html/" "index.html</filename>)" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "<systemitem role=\"package\">pbuilder</systemitem> - this package contains " "programs which are used for creating and maintaining <command>chroot</" "command> environment. Building Debian package in this <command>chroot</" "command> environment verifies the proper build dependency and avoid 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>)" msgstr "" "<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>)" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "<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." msgstr "" "<systemitem role=\"package\">patchutils</systemitem> - 此套件提供了一些可以幫" "助處理補丁的工具,如 <command>lsdiff</command>、<command>interdiff</command> " "和 <command>filterdiff</command> 命令。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> #, fuzzy #| msgid "" #| "<systemitem role=\"package\">quilt</systemitem> - this package helps you " #| "to manage a series of patches by keeping track of the changes each of " #| "them makes. They are logically organized as a stack, and you can apply " #| "(=push), un-apply (=pop), refresh them easily by traveling into the " #| "stack. (see <citerefentry> <refentrytitle>quilt</refentrytitle> " #| "<manvolnum>1</manvolnum> </citerefentry>, <filename>/usr/share/doc/quilt/" #| "README.Debian</filename>)" msgid "" "<systemitem role=\"package\">quilt</systemitem> - this package helps you to " "manage a series of patches by keeping track of the changes each of them " "makes. They are logically organized as a stack, and you can apply (=push), " "un-apply (=pop), refresh them easily by traveling into the stack. (see " "<citerefentry> <refentrytitle>quilt</refentrytitle> <manvolnum>1</manvolnum> " "</citerefentry>, <ulink url=\"&quilt-pdf;\">quilt.pdf</ulink>)" msgstr "" "<systemitem role=\"package\">quilt</systemitem> - 此套件幫助你管理一系列的補" "丁。它們被以邏輯堆疊的方式組織在一起。你可以 apply (=push)、un-apply (=pop) " "或簡單地更新它們然後再放入堆疊內。(參考 <citerefentry> <refentrytitle>quilt</" "refentrytitle> <manvolnum>1</manvolnum> </citerefentry>、<filename>/usr/" "share/doc/quilt/README.Debian</filename>)" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> #, fuzzy #| msgid "" #| "<systemitem role=\"package\">git</systemitem> - this package provides " #| "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>, <filename>/usr/share/doc/git-doc/index.html</filename>)" msgid "" "<systemitem role=\"package\">git</systemitem> - this package provides " "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>, <ulink url=\"&git-" "doc;\">git Manual</ulink>)" msgstr "" "<systemitem role=\"package\">git</systemitem> - 此套件提供了用於快捷處理大型" "項目的著名版本控制系統 - git。它被廣泛用於各種開源項目,最著名的是 Linux 核心" "項目。(參考 <citerefentry> <refentrytitle>git</refentrytitle> <manvolnum>1</" "manvolnum> </citerefentry>、<filename>/usr/share/doc/git-doc/index.html</" "filename>)" #. type: Content of: <book><chapter><section><para> msgid "" "The short descriptions that are given above only serve to introduce you to " "what each package does. Before continuing please thoroughly read the " "documentation of each program, 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." msgstr "" "以上給出的簡短描述僅僅是爲了使你對這些套件有一個基本的印象。在繼續前請詳細閱" "讀每個程式的文件,至少了解其一般的用途和用法。現在看來這是一項耗時巨大的任" "務,但在接下來的工作中你將爲你閱讀了它們而感覺到 <emphasis>非常</emphasis> 愉" "快。" #. type: Content of: <book><chapter><section><para> msgid "" "If you have specific questions later, I suggest you to read the documents " "mentioned above again. Since this is a tutorial, I intentionally skipped " "details and provided only pointers to keep it simple." msgstr "" #. type: Content of: <book><chapter><section><title> #, fuzzy #| msgid "Programs you need for development" msgid "Documentations you need for development" msgstr "開發時需要的軟體" #. type: Content of: <book><chapter><section><para> msgid "" "The following is the <emphasis>very important</emphasis> documentation which " "you should read along with this document:" msgstr "" "以下是 <emphasis>非常重要</emphasis> 的文件,你應該在讀本文件時同時參考它們:" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> #, fuzzy #| msgid "" #| "<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 Filesystem Hierarchy Standard (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 <filename>/usr/share/doc/debian-policy/policy.html/" #| "index.html</filename>)." msgid "" "<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 <ulink " "url=\"&policy-pdf;\">policy.pdf</ulink> and <ulink url=\"&fhs-pdf;\">fhs-2.3." "pdf</ulink>)." msgstr "" "<systemitem role=\"package\">debian-policy</systemitem> - <ulink url=" "\"&debian-policy;\">Debian Policy Manual</ulink> 包含了對 Debian 軟體倉庫、作" "業系統設計事宜、檔案系統層級標準(FHS,Filesystem Hierarchy Standard)(講述每個" "檔案和目錄應該放在哪裏)等的描述。對於你而言,最重要的是它描述了套件要進入官方" "倉庫前必須滿足的條件。(參考 <filename>/usr/share/doc/debian-policy/policy." "html/index.html</filename>)" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> #, fuzzy #| msgid "" #| "<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, " #| "pick up packages, how to do NMUs, how to manage bugs, best packaging " #| "practices, when and where to upload etc. (see <filename>/usr/share/doc/" #| "developers-reference/</filename>)." msgid "" "<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, pick up " "packages, how to do NMUs, how to manage bugs, best packaging practices, when " "and where to upload etc. (see the local copy of <ulink url=\"&developers-" "refpdf;\">developers-reference.pdf</ulink>)." msgstr "" "<systemitem role=\"package\">developers-reference</systemitem> - <ulink url=" "\"&developers-reference;\">Debian Developer's Reference</ulink> 描述了打包所" "需的包含技術細節在內的全部詳細訊息,如倉庫結構、如何重命名/丟棄/接手套件、如" "何進行 NMU(非維護者上傳)、如何管理 Bug 以及打包最佳經驗、何時向何處上傳等。" "(參考 <filename>/usr/share/doc/developers-reference/</filename>)" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "<ulink url=\"&autotools-tutorial;\">Autotools Tutorial</ulink> provides 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." msgstr "" "<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 提供了很好的" "文件。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> #, fuzzy #| msgid "" #| "<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 <filename>/usr/share/doc/" #| "gnu-standards/standards.html</filename> and <filename>/usr/share/doc/gnu-" #| "standards/maintain.html</filename>)." msgid "" "<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 <ulink url=\"&gnu-standard-pdf;" "\">standards.pdf</ulink> and <ulink url=\"&gnu-maintainer-pdf;\">maintain." "pdf</ulink>)." msgstr "" "<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>/usr/share/doc/gnu-standards/standards.html</filename> 和 " "<filename>/usr/share/doc/gnu-standards/maintain.html</filename>)" #. type: Content of: <book><chapter><section><para> #, fuzzy #| msgid "" #| "If this document contradicts with what the Debian Policy Manual and " #| "Debian Developer's Reference describes, they are correct. Please file a " #| "bug report on the <systemitem role=\"package\">maint-guide</systemitem> " #| "package." msgid "" "If this document contradicts with 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>." msgstr "" "若本文件所敘述的內容與 Debian Policy Manual 或 Debian Developer's Reference " "有不符,則按照後兩者的要求進行,並向 <systemitem role=\"package\">maint-" "guide</systemitem> 套件提交 Bug 報告。" #. type: Content of: <book><chapter><section><title> msgid "Basic terminology" msgstr "基本術語" #. type: Content of: <book><chapter><section><para> msgid "There are two types of packages." msgstr "一共有兩種類型的套件。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "<emphasis role=\"strong\">source package</emphasis>: A source package is a " "set of files which contain code and data which you can compile and process " "into execution programs and formatted documents. It usually comes as a " "combination of <filename>*.orig.tar.gz</filename>, <filename>*.debian.tar." "gz</filename> (or <filename>*.diff.gz</filename>), and <filename>*.dsc</" "filename>. Some other archive and compression methods may be used, too." msgstr "" "<emphasis role=\"strong\">原始碼套件</emphasis>:原始碼套件包含了程式碼和數" "據,可以編譯成爲可執行的程式和格式化的文件。它通常是以 <filename>*.orig.tar." "gz</filename>、<filename>*.debian.tar.gz</filename> (或 <filename>*.diff.gz</" "filename>) 和 <filename>*.dsc</filename> 的組合形式出現的。也可能使用一些其他" "的格式和壓縮方法。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "<emphasis role=\"strong\">binary package</emphasis>: A binary package " "contains execution programs and formatted documents. It usually comes as " "<filename>*.deb</filename> for the normal Debian system and as <filename>*." "udeb</filename> for the Debian Installer." msgstr "" "<emphasis role=\"strong\">二進位套件</emphasis>:二進位套件包含了可執行的程式" "和格式化的文件。它通常是以 <filename>*.deb</filename> 檔案的形式提供給普通 " "Debian 系統,以及 <filename>*.udeb</filename> 檔案形式提供給 Debian 安裝程" "式。" #. type: Content of: <book><chapter><section><para> msgid "" "Don't mix terms like source of the program and the source package of the " "program!" msgstr "不要混淆程式原始碼和程式的原始碼套件這樣相似但有區別的概念!" #. type: Content of: <book><chapter><section><para> msgid "There are several role names used around Debian." msgstr "在 Debian 社群中有幾個常見的角色。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "<emphasis role=\"strong\">upstream author</emphasis>: The person who made " "the original program." msgstr "" "<emphasis role=\"strong\">上游作者(upstream author)</emphasis>:程式的最原始" "作者。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "<emphasis role=\"strong\">upstream maintainer</emphasis>: The person who " "currently maintains the program." msgstr "" "<emphasis role=\"strong\">上游維護者(upstream maintainer)</emphasis>:目前在" "上游維護程式程式碼的人。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "<emphasis role=\"strong\">maintainer</emphasis>: The person who makes Debian " "package of the program." msgstr "" "<emphasis role=\"strong\">維護者(maintainer)</emphasis>:製作該程式的 Debian " "套件的人。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "<emphasis role=\"strong\">sponsor</emphasis>: The person who helps " "maintainers to upload packages to the official Debian Package Archive after " "checking their contents." msgstr "" "<emphasis role=\"strong\">保證人(sponsor)</emphasis>:檢査內容後幫助維護者上" "傳套件到 Debian 官方倉庫的人。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "<emphasis role=\"strong\">mentor</emphasis>: The person who helps novice " "maintainers on packaging etc." msgstr "" "<emphasis role=\"strong\">指導者(mentor)</emphasis>:幫助維護者熟悉和深入打包" "的人。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "<emphasis role=\"strong\">Debian Developer</emphasis> (DD): The person who " "is a member of Debian. He has full upload right to the official Debian " "Package Archive." msgstr "" "<emphasis role=\"strong\">Debian Developer</emphasis> (DD):Debian 社群的官方" "成員。DD 擁有向 Debian 官方倉庫上傳的全部權限。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "<emphasis role=\"strong\">Debian Maintainer</emphasis> (DM): The person who " "has limited upload right to the official Debian Package Archive." msgstr "" "<emphasis role=\"strong\">Debian Maintainer</emphasis> (DM):擁有對 Debian 官" "方倉庫部分上傳權限的人。" #. type: Content of: <book><chapter><section><para><footnote><para> msgid "" "See <ulink url=\"&policy-control;#s-f-Version\">Debian Policy Manual: 5.6.12 " "Version</ulink>." msgstr "" #. type: Content of: <book><chapter><section><para> #, fuzzy #| msgid "There are several version names used around Debian." msgid "" "There are several version names<placeholder type=\"footnote\" id=\"0\"/> " "used around Debian." msgstr "Debian 中使用了幾種不同的版本號。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "<emphasis role=\"strong\">upstream source version</emphasis>: The upstream " "source version is referred as <literal><replaceable>version</replaceable></" "literal>." msgstr "" "<emphasis role=\"strong\">上游原始碼版本</emphasis>:上游原始碼版本被指代爲 " "<literal><replaceable>version</replaceable></literal>。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "<emphasis role=\"strong\">Debian revision</emphasis>: The revision by Debian " "on package is referred as <literal><replaceable>revision</replaceable></" "literal>." msgstr "" "<emphasis role=\"strong\">Debian 版本</emphasis>:Debian 套件的版本被指代爲 " "<literal><replaceable>revision</replaceable></literal>。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "<emphasis role=\"strong\">Debian package version</emphasis>: The Debian " "package version is referred as the following." msgstr "" "<emphasis role=\"strong\">Debian 套件版本</emphasis>:Debian 套件版本被按以下" "規則指代。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><itemizedlist><listitem><para> msgid "" "<literal><replaceable>version</replaceable></literal> for the native Debian " "binary package and for the Debian source package." msgstr "" "對於 Debian 創建的軟體,其原始碼套件的版本即爲上文所述的 " "<literal><replaceable>version</replaceable></literal>。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><itemizedlist><listitem><para> msgid "" "<literal><replaceable>version</replaceable>-<replaceable>revision</" "replaceable></literal> for the non-native Debian binary package." msgstr "" "對於不是 Debian 創建的軟體,其原始碼套件的版本爲 " "<literal><replaceable>version</replaceable>-<replaceable>revision</" "replaceable></literal>。" #. type: Content of: <book><chapter><section><para><footnote><para> msgid "" "See lists in <xref linkend=\"socialdynamism\"/> and <xref linkend=\"needdocs" "\"/>." msgstr "" #. type: Content of: <book><chapter><section><para> #, fuzzy #| msgid "" #| "Please read the other manuals if you need more details on terminology." msgid "" "Please read the other manuals if you need more details on terminology. " "<placeholder type=\"footnote\" id=\"0\"/>" msgstr "如果你需要更詳細地瞭解術語,請閱讀其他手冊。" #. type: Content of: <book><chapter><section><title> msgid "Where to ask for help" msgstr "到何處尋求幫助" #. type: Content of: <book><chapter><section><para> msgid "" "Before you decide to ask your question in some public place, please read the " "fine documentation." msgstr "" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> #, fuzzy #| msgid "<filename>changelog</filename> file" msgid "files in <filename>/usr/share/doc/dpkg</filename>" msgstr "<filename>changelog</filename> 檔案" #. /usr/share/doc/debian is used be doc-debian and debian-faq #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> #, fuzzy #| msgid "Other files under the <filename>debian</filename> directory" msgid "files in <filename>/usr/share/doc/debian</filename>" msgstr "<filename>debian</filename> 目錄下的其他檔案" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> #, fuzzy #| msgid "<filename>source/local-options</filename> file" msgid "files in <filename>/usr/share/doc/autotools-dev</filename>" msgstr "<filename>source/local-options</filename> 檔案" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> #, fuzzy #| msgid "<filename><replaceable>package</replaceable>.info</filename> file" msgid "" "files in <filename>/usr/share/doc/<replaceable>package</replaceable></" "filename> for all pertinent packages" msgstr "<filename><replaceable>package</replaceable>.info</filename> 檔案" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "contents of <literal><command>man</command> <replaceable>command</" "replaceable></literal> for all pertinent commands" msgstr "" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "contents of <literal><command>info</command> <replaceable>command</" "replaceable></literal> for all pertinent commands" msgstr "" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> #, fuzzy #| msgid "" #| "See <ulink url=\"&debian-mentors-ldo;\">&debian-mentors-ldo;</ulink> for " #| "more information about this mailing list." msgid "" "contents of <ulink url=\"&debian-mentors-ldo;\">debian-mentors@lists.debian." "org mailing list archive</ulink>" msgstr "" "關於此郵件列表,參考 <ulink url=\"&debian-mentors-ldo;\">&debian-mentors-ldo;" "</ulink>" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "contents of <ulink url=\"&debian-devel-ldo;\">debian-devel@lists.debian.org " "mailing list archive</ulink>" msgstr "" #. type: Content of: <book><chapter><section><para> msgid "" "Please consider to use web search engine effectively by including search " "string such as <literal>site:lists.debian.org</literal> to limit the domain." msgstr "" #. type: Content of: <book><chapter><section><para> msgid "" "Making a small test package is good way to learn details of packaging. " "Inspecting existing well maintained packages is the best way to learn how " "other people make packages." msgstr "" "製作小的測試套件是學習打包的好方法,仔細査看維護較好的套件則是瞭解他人如何製" "作套件的最佳辦法。" #. type: Content of: <book><chapter><section><para> msgid "" "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." msgstr "" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> #, fuzzy #| msgid "" #| "See <ulink url=\"&debian-mentors-ldo;\">&debian-mentors-ldo;</ulink> for " #| "more information about this mailing list." msgid "" "<ulink url=\"&debian-mentors-ldo;\">debian-mentors@lists.debian.org mailing " "list</ulink>. (This mailing list is for the novice.)" msgstr "" "關於此郵件列表,參考 <ulink url=\"&debian-mentors-ldo;\">&debian-mentors-ldo;" "</ulink>" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "<ulink url=\"&debian-devel-ldo;\">debian-devel@lists.debian.org mailing " "list</ulink>. (This mailing list is for the expert.)" msgstr "" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "<ulink url=\"&irc-debian;\">IRC</ulink> such as <literal>#debian-mentors</" "literal>." msgstr "" #. type: Content of: <book><chapter><section><para> msgid "" "The more experienced Debian developers will gladly help you, if you ask " "properly after making your required efforts." msgstr "" #. type: Content of: <book><chapter><section><para> #, fuzzy #| msgid "" #| "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;\">Developer's Reference, 5.8. 'Handling " #| "bugs'</ulink>." msgid "" "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>." msgstr "" "當你收到一個 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>" #. type: Content of: <book><chapter><section><para> msgid "" "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... Just kidding. :-)" msgstr "" "即使以上的問題都解決了,也不能高興得太早。爲什麼?因爲幾個小時或幾天內就會有" "人開始使用你的套件,如果你犯了某些嚴重的錯誤,將被無數生氣的 Debian 用戶的郵" "件所轟炸…… 只是開個玩笑。:-)" #. type: Content of: <book><chapter><section><para> msgid "" "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!" msgstr "" "放鬆一點並準備好處理 Bug 報告,在你的套件完全符合 Debian 的各項規範前還需要付" "出很多努力,處理 Bug 也是對你很好的鍛煉(再一次提醒,閱讀那些 <emphasis>必須的" "文件</emphasis> 來了解詳情)。祝你好運!" #. type: Content of: <book><chapter><title> msgid "First steps" msgstr "第一步" #. type: Content of: <book><chapter><para> msgid "" "Let's try to make your own package (or, better even, adopt an existing one)." msgstr "讓我們嘗試創建一個自己的套件(“收養”一個已存在的套件則更好)。" #. type: Content of: <book><chapter><section><title> msgid "Choose your program" msgstr "選擇你的程式" #. type: Content of: <book><chapter><section><para> #, fuzzy #| msgid "" #| "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 <command>aptitude</command>." msgid "" "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." msgstr "" "可能你已經選好了要製作的套件。第一件要做的事是使用 <command>aptitude</" "command> 檢査它是否已經存在於發行版倉庫中了。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> #, fuzzy #| msgid "<command>debc</command> command" msgid "the <command>aptitude</command> command" msgstr "<command>debc</command> 命令" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> #, fuzzy #| msgid "<ulink url=\"&debian-packages-git;\">debian packages in git</ulink>" msgid "<ulink url=\"&packages-do;\">Debian packages</ulink> web page" msgstr "<ulink url=\"&debian-packages-git;\">debian packages in git</ulink>" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> #, fuzzy #| msgid "<ulink url=\"&debian-packages-git;\">debian packages in git</ulink>" msgid "" "<ulink url=\"&packages-qa-do;\">Debian Package Tracking System</ulink> web " "page" msgstr "<ulink url=\"&debian-packages-git;\">debian packages in git</ulink>" #. type: Content of: <book><chapter><section><para><footnote><para> #, fuzzy #| msgid "" #| "For more help about these, check in <ulink url=\"&developers-reference;" #| "\">Debian Developer's Reference</ulink>." msgid "" "See <ulink url=\"&devref-adopt;\">Debian Developer's Reference 5.9.5. " "'Adopting a package'</ulink>." msgstr "" "關於這些問題的更多幫助,査看 <ulink url=\"&developers-reference;\">Debian " "Developer's Reference</ulink>。" #. type: Content of: <book><chapter><section><para> #, fuzzy #| msgid "" #| "If the package already exists, well, install it! :-) If it happens to be " #| "<emphasis role=\"strong\">orphaned</emphasis> -- 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 (check the ownership status at <ulink " #| "url=\"&wnpp-bts;\">Debian Bug report logs: Bugs in package wnpp in " #| "unstable</ulink>). You may also adopt a package for which the " #| "corresponding maintainer has filed a Request for Adoption (<emphasis role=" #| "\"strong\">RFA</emphasis>)." msgid "" "If the package already exists, well, install it! :-) If it happens to be " "<emphasis role=\"strong\">orphaned</emphasis> -- 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 for which the " "corresponding maintainer has filed a Request for Adoption (<emphasis role=" "\"strong\">RFA</emphasis>).<placeholder type=\"footnote\" id=\"0\"/>" msgstr "" "如果套件已經存在,直接安裝就好了!:-) 如果它是被 <emphasis role=\"strong\">拋" "棄(orphaned)</emphasis> 的——也就是說它的維護者被設置爲 <ulink url=\"&qa-do;" "\">Debian QA Group</ulink>,那麼你可以嘗試接手維護它(在 <ulink url=\"&wnpp-" "bts;\">Debian Bug report logs: Bugs in package wnpp in unstable</ulink> 檢査" "它的維護者訊息)。你也可以“收養”維護者發出“Request for Adoption”(<emphasis " "role=\"strong\">RFA</emphasis>)請求的套件。" #. type: Content of: <book><chapter><section><para> #, fuzzy #| msgid "There are several role names used around Debian." msgid "There are several package ownership status resources." msgstr "在 Debian 社群中有幾個常見的角色。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "<ulink url=\"&wnpp-do;\">Work-Needing and Prospective Packages</ulink>" msgstr "<ulink url=\"&wnpp-do;\">Work-Needing and Prospective Packages</ulink>" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> #, fuzzy #| msgid "" #| "<ulink url=\"&wnpp-debtags;\">Browse WNPP bugs based on debtags</ulink>" msgid "" "<ulink url=\"&wnpp-bts;\">Debian Bug report logs: Bugs in pseudo-package " "<systemitem role=\"package\">wnpp</systemitem> in <literal>unstable</" "literal></ulink>" msgstr "" "<ulink url=\"&wnpp-debtags;\">Browse WNPP bugs based on debtags</ulink>" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "<ulink url=\"&wnpp-dn;\">Debian Packages that Need Lovin'</ulink>" msgstr "<ulink url=\"&wnpp-dn;\">Debian Packages that Need Lovin'</ulink>" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "<ulink url=\"&wnpp-debtags;\">Browse <systemitem role=\"package\">wnpp</" "systemitem> bugs based on debtags</ulink>" msgstr "" "<ulink url=\"&wnpp-debtags;\">Browse <systemitem role=\"package\">wnpp</" "systemitem> bugs based on debtags</ulink>" #. type: Content of: <book><chapter><section><para><footnote><para> msgid "" "Having said that, there will of course always be new programs that are " "worthwhile packaging." msgstr "當然,也一定總是有值得打包的新軟體。" #. type: Content of: <book><chapter><section><para> msgid "" "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 do that in various ways." msgstr "" "僅作爲一筆旁註,Debian 已經擁有了絕大多數類型軟體的套件,倉庫中套件的數量也遠" "遠超過了有上傳權限的貢獻者的數量。因此,爲已經在倉庫中的套件貢獻力量是非常受" "其他開發者歡迎的(且更容易獲得 sponsorship)<placeholder type=\"footnote\" id=" "\"0\"/>。你可以通過非常多的方式來實現這一目的。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "taking over orphaned, yet actively used, packages" msgstr "接手被拋棄而仍然被很多人使用的套件。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "joining <ulink url=\"&teams;\">packaging teams</ulink>" msgstr "加入 <ulink url=\"&teams;\">打包小組</ulink>。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "triaging bugs of very popular packages" msgstr "爲某些常用的套件分類 Bug。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "preparing <ulink url=\"&devref-nmu;\">QA or NMU uploads</ulink>" msgstr "在需要時準備 <ulink url=\"&devref-nmu;\">QA 或 NMU 上傳</ulink>。" #. type: Content of: <book><chapter><section><para> msgid "" "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 set up for you. Keep reading, though, a lot of the advice below " "will still be applicable for your case." msgstr "" "如果你有能力“收養”那個套件,下載(使用 <literal>apt-get source " "<replaceable>packagename</replaceable></literal> 或其他類似的工具)並分析它的" "程式碼。這篇文件沒有包含如何接手套件的詳細訊息,但幸運的是因爲接手套件時起始" "的工作已經有人完成,接手的工作應比從頭開始輕鬆得多。儘管如此,請繼續閱讀,下" "面給出的建議會對你很有幫助。" #. type: Content of: <book><chapter><section><para> msgid "" "If the package is new, and you decide you'd like to see it in Debian, " "proceed as follows:" msgstr "" "如果你要製作的套件是全新的,並且希望它出現在 Debian 中,請按照以下的步驟進" "行:" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "First, you must know that program works, and have tried it for some time to " "confirm its usefulness." msgstr "首先,你必須知道這個軟體能夠工作,並且需要試用一段時間。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> #, fuzzy #| msgid "" #| "You must check if no one else is working on the package already at <ulink " #| "url=\"&wnpp-packaged;\">the list of packages being worked on</ulink>. 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 - find another interesting program " #| "that nobody maintains." msgid "" "You must check if no one else is working on the package already at 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 - find another interesting program " "that nobody maintains." msgstr "" "你必須在 <ulink url=\"&wnpp-do;being_packaged\">正在被處理的套件列表</ulink> " "上査看以確定沒有其他人已經開始了工作。如果沒有,則提交一份 ITP (Intent To " "Package) Bug 報告到 <systemitem role=\"package\">wnpp</systemitem> pseudo 套" "件(可以使用 <command>reportbug</command>)。如果已經有人在處理,則在需要的情況" "下聯繫他或他們。如果不需要你的幫助,就尋找其他你感興趣且沒有人維護的套件。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "That program <emphasis role=\"strong\">must have a license</emphasis>." msgstr "軟體 <emphasis role=\"strong\">必須有一個許可證</emphasis>。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><itemizedlist><listitem><para> msgid "" "For the <literal>main</literal> section, it <emphasis role=\"strong\">must " "be compliant to all the Debian Free Software Guidelines</emphasis> (<ulink " "url=\"&dfsg;\">DFSG</ulink>) and <emphasis role=\"strong\">that program " "must not require a package outside of <literal>main</literal></emphasis> for " "compilation or execution as required by the Debian Policy. This is desired " "case." msgstr "" #. type: Content of: <book><chapter><section><itemizedlist><listitem><itemizedlist><listitem><para> msgid "" "For the <literal>contrib</literal> section, it must be compliant to all the " "DFSG but it may require a package outside of <literal>main</literal> for " "compilation or execution." msgstr "" "對於 <literal>contrib</literal> 類的軟體,其許可證必須滿足 DFSG 的全部條件," "但可以依賴於 <literal>main</literal> 之外的套件以完成編譯或運行。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><itemizedlist><listitem><para> msgid "" "For the <literal>non-free</literal> section, it may not be compliant to some " "of the DFSG but it <emphasis role=\"strong\">must be distributable</" "emphasis>." msgstr "" "對於 <literal>non-free</literal> 類的軟體,其許可證可以不滿足 DFSG 中的一些條" "件,但至少需要是 <emphasis role=\"strong\">可以散佈的</emphasis>。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "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." msgstr "" "如果你不清楚你的軟體應該分入哪一類,則把許可證文本發送到 <ulink url=" "\"&debian-legal-ldo;\">debian-legal@lists.debian.org</ulink> 請他人提出意見。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "That 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." msgstr "" "程式 <emphasis role=\"strong\">不應該</emphasis> setuid 到 root,甚至可以更好" "——不 setuid 或 setgid 到任何用戶或組。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "That program should not be a daemon, or something that goes in <filename>*/" "sbin</filename> directories, or open a port as root." msgstr "" "這個程式不應該是守護進程,也不應該安裝檔案到 <filename>*/sbin</filename> 目錄" "或者以 root 打開任何端口。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "That program should result in binary executable form, libraries are harder " "to handle." msgstr "程式應當最終以二進位可執行程式的形式呈現,函式庫則較難處理。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "That program should be well documented and its code needs to be " "understandable (i.e. not obfuscated)." msgstr "程式應當有很好的文件,最好原始碼也容易理解(比如不混亂)。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "You should contact program's author(s) to check if they agree with packaging " "it and amicable to Debian. It is important to be able to consult with author" "(s) about the program in case of any program specific problems, so don't " "try to package unmaintained pieces of software." msgstr "" "你應該與程式的作者取得聯繫問一下他是否認爲程式應當被打包,以及他是否對 " "Debian 友好。能夠詢問作者關於程式的任何問題是非常重要的,不要嘗試打包一個無人" "維護的軟體。" #. type: Content of: <book><chapter><section><para> #, fuzzy #| msgid "" #| "Of course, these things are just safety measures, and intended to save " #| "you from raging users if you do something wrong in some setuid daemon... " #| "When you gain some more experience in packaging, you'll be able to do " #| "such packages, but even the experienced developers consult the <ulink url=" #| "\"&debian-mentors-ldo;\">debian-mentors@lists.debian.org</ulink> mailing " #| "list when they are in doubt. And people there will gladly help." msgid "" "Of course, these things are just safety measures, and intended to save you " "from raging users if you do something wrong in some setuid daemon... When " "you gain some more experience in packaging, you'll be able to package such " "packages." msgstr "" "當然,這些問題都只是爲了安全,並試圖讓你不至於在比如 setuid 守護進程等問題上" "犯錯誤而激怒了用戶... 當你在打包方面有了更多經驗時,就可以處理這些套件了。但" "即便是富有經驗的開發人員在遇到疑惑時也會發郵件到 <ulink url=\"&debian-" "mentors-ldo;\">debian-mentors@lists.debian.org</ulink> 郵件列表諮詢,那裏的人" "會很樂意提供幫助。" #. type: Content of: <book><chapter><section><title> msgid "Get the program, and try it out" msgstr "獲得程式,並且試用它" #. type: Content of: <book><chapter><section><para> msgid "" "So the first thing to do is to find and download the original source code. " "I presume that 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 extension " "<filename>.tar.gz</filename>, or <command>tar</command>+<command>bzip2</" "command> format with extension <filename>.tar.bz2</filename>. These usually " "contain the subdirectory called <filename><replaceable>programname</" "replaceable>-<replaceable>version</replaceable></filename> in them and all " "the sources under it." msgstr "" "第一件要做的事就是找到並下載原始的原始碼。我假定你已經從作者的首頁上找到了它" "的原始碼。Unix 下的自由軟體原始碼通常是以 <command>tar</command>" "+<command>gzip</command> 格式(副檔名爲 <filename>.tar.gz</filename>)或 " "<command>tar</command>+<command>bzip2</command> 格式(副檔名爲 <filename>.tar." "bz2</filename>)的形式提供的。通常壓縮檔中包含了一個名爲 " "<filename><replaceable>programname</replaceable>-<replaceable>version</" "replaceable></filename> 的子目錄,裏面包含了全部的原始碼。" #. type: Content of: <book><chapter><section><para> msgid "" "If the latest version of such sources are available through VCS such as Git, " "Subversion, or CVS repository, 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 by yourself " "using the <literal>--exclude-vcs</literal> option." msgstr "" #. type: Content of: <book><chapter><section><para><footnote><para> msgid "" "You can identify the archive format using the <command>file</command> " "command when the file extension is not enough." msgstr "" "當檔案副檔名不足以判斷檔案類型時,可以使用 <command>file</command> 命令來判" "斷。" #. type: Content of: <book><chapter><section><para> msgid "" "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\"/>), unpack it with " "appropriate tools and repack it, too." msgstr "" "如果你的程式原始碼是以其他形式提供的(比如檔案名以 <filename>.Z</filename> 或 " "<filename>.zip</filename> 結尾<placeholder type=\"footnote\" id=\"0\"/>),則" "使用合適的工具將其解壓縮,再重新打包。" #. type: Content of: <book><chapter><section><para><footnote><para> #, fuzzy #| msgid "" #| "This program is already packaged. Current version 0.15.3 has changed " #| "substantially from the version 0.9.12 in the following examples." msgid "" "This program is already packaged. Its <ulink url=\"&gentoo-package;" "\">current version</ulink> uses Autotools as its build structure and is " "substantially different from the following examples based on the version " "0.9.12." msgstr "" "需要注意的是,這個程式已經被打包好了,並且從寫這篇文件之初到現在它已經發生了" "很大的變化。" #. type: Content of: <book><chapter><section><para> #, fuzzy #| msgid "" #| "As an example, I'll use a program called <command>gentoo</command>, an X " #| "GTK+ file manager.<placeholder type=\"footnote\" id=\"0\"/>" msgid "" "As an example, I'll use a program called <command>gentoo</command>, an X GTK" "+ file manager. <placeholder type=\"footnote\" id=\"0\"/>" msgstr "" "作爲範例,我將使用一個名爲 <command>gentoo</command> 的程式,它是一個 X GTK+ " "檔案管理器。<placeholder type=\"footnote\" id=\"0\"/>" #. type: Content of: <book><chapter><section><para> msgid "" "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 errors, even some " "<emphasis>irrelevant</emphasis> ones, because there will most probably be " "problems unpacking on other people's systems, whose unpacking tools may or " "may not ignore those anomalies. On your console screen, you should see the " "following." msgstr "" "在你的用戶主目錄下創建一個子目錄,命名爲 <filename>debian</filename> 或 " "<filename>deb</filename> 或任意你覺得合適的其他名字(本例中使用 <filename>~/" "gentoo</filename>)。把下載好的壓縮檔放在其中並解壓縮(使用 <literal>tar xzf " "gentoo-0.9.12.tar.gz</literal> 命令)。要確定解壓縮過程中沒有發生錯誤,即便是" "有一點 <emphasis>不恰當</emphasis> 也不行,因爲在別人的系統上解壓縮這些檔案" "時,如果他們的工具並不忽略這些反常的現象就會出現問題。在你的終端螢幕上,應該" "看到如下的情形。" #. type: Content of: <book><chapter><section><screen> #, no-wrap msgid "" "$ mkdir ~/gentoo ; cd ~/gentoo\n" "$ wget http://<replaceable>www.example.org</replaceable>/gentoo-0.9.12.tar.gz\n" "$ tar xvzf gentoo-0.9.12.tar.gz\n" "$ ls -F\n" "gentoo-0.9.12/\n" "gentoo-0.9.12.tar.gz\n" msgstr "" "$ mkdir ~/gentoo ; cd ~/gentoo\n" "$ wget http://<replaceable>www.example.org</replaceable>/gentoo-0.9.12.tar.gz\n" "$ tar xvzf gentoo-0.9.12.tar.gz\n" "$ ls -F\n" "gentoo-0.9.12/\n" "gentoo-0.9.12.tar.gz\n" #. type: Content of: <book><chapter><section><para> msgid "" "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 correctly compile and install the program (most probably they'll " "assume you want to install to <filename>/usr/local/bin</filename> directory; " "you won't be doing that, but more on that later in <xref linkend=\"destdir\"/" ">)." msgstr "" "現在又有了一個新的子目錄,名爲 <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\"/> 中說明)。" #. type: Content of: <book><chapter><section><para><footnote><para> msgid "" "Many modern programs come with a script <filename>configure</filename> which " "creates a <filename>Makefile</filename> file customized for your system upon " "its execution." msgstr "" #. type: Content of: <book><chapter><section><para> #, fuzzy #| msgid "" #| "Simple programs come with a <filename>Makefile</filename> file in them " #| "and can be compiled simply with <literal>make</literal>. Some of them " #| "support <literal>make check</literal>, which runs included self-checks. " #| "Installation to the destination directories is usually done with " #| "<literal>make install</literal>." msgid "" "Simple programs come with a <filename>Makefile</filename> file in them and " "can be compiled simply with <literal>make</literal>.<placeholder type=" "\"footnote\" id=\"0\"/> Some of them support <literal>make check</literal>, " "which runs included self-checks. Installation to the destination " "directories is usually done with <literal>make install</literal>." msgstr "" "帶有 <filename>Makefile</filename> 檔案的簡單程式可以很容易地使用 " "<literal>make</literal> 來編譯。其中的一些還支持 <literal>make check</" "literal>,可以完成一系列自身測試。編譯好後可以使用 <literal>make install</" "literal> 來將程式安裝到目標目錄。" #. type: Content of: <book><chapter><section><para> msgid "" "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." msgstr "" "現在嘗試編譯和運行你的程式,確保它工作正常,且在安裝和運行時不會導致其他問" "題。" #. type: Content of: <book><chapter><section><para> msgid "" "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." msgstr "" "你還可以運行 <literal>make clean</literal> (或更好的 <literal>make " "distclean</literal>)來清理編譯目錄。有時還會帶有 <literal>make uninstall</" "literal> 用以反安裝已經安裝了的檔案。" #. type: Content of: <book><chapter><section><title> msgid "Free portable programs" msgstr "自由的可移植程式" #. type: Content of: <book><chapter><section><para> #, fuzzy #| msgid "" #| "A lot of Free programs are written in the <ulink url=\"&cxx;_" #| "(programming_language)\">C</ulink> and <ulink url=\"&cxx;++\">C++</ulink> " #| "languages. Many of these use Autotools or CMake to make them portable " #| "across different platforms. These tools are used to generate " #| "<filename>Makefile</filename> and other required source files. Then, " #| "such programs are built with usual <literal>make; make install</literal>." msgid "" "A lot of Free 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 " "tools are used to generate <filename>Makefile</filename> and other required " "source files. Then, such programs are built with usual <literal>make; make " "install</literal>." msgstr "" "非常多的自由軟體是使用 <ulink url=\"&cxx;_(programming_language)\">C</ulink> " "和 <ulink url=\"&cxx;++\">C++</ulink> 語言編寫的。其中的有很多使用 Autotools " "或 CMake 來使其可以在不同平臺上移植。這些工具被用於生成 <filename>Makefile</" "filename> 和其他必須的源檔案,然後這些程式可以使用正常的 <literal>make; make " "install</literal> 來編譯和安裝。" #. type: Content of: <book><chapter><section><para><footnote><para> #, fuzzy #| msgid "" #| "See <ulink url=\"&autotools-tutorial;\">Autotools Tutorial</ulink> and " #| "<filename>/usr/share/doc/autotools-dev/README.Debian.gz</filename>." msgid "" "See <ulink url=\"&autotools-tutorial;\">Autotools Tutorial</ulink> and " "<ulink url=\"&autotools-readme;\"/>." msgstr "" "參考 <ulink url=\"&autotools-tutorial;\">Autotools Tutorial</ulink> 和 " "<filename>/usr/share/doc/autotools-dev/README.Debian.gz</filename>。" #. type: Content of: <book><chapter><section><para> msgid "" "<ulink url=\"&gnu-build-system;\">Autotools</ulink> are 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 notice such sources " "by the <filename>configure.ac</filename>, <filename>Makefile.am</filename>, " "and <filename>Makefile.in</filename> files. <placeholder type=\"footnote\" " "id=\"0\"/>" msgstr "" "<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\"/>" #. type: Content of: <book><chapter><section><para> msgid "" "The first step of Autotools work flow is usually that the upstream runs " "<literal>autoreconf -i -f</literal> in the source and distributes this " "source with generated files." msgstr "" "使用 Autotools 的第一步是上游作者在程式碼中運行 <literal>autoreconf -i -f</" "literal> 並把生成的檔案同原始碼一起散佈。" #. type: Content of: <book><chapter><section><screen> #, no-wrap msgid "" "configure.ac-----+-> autoreconf -+-> configure\n" "Makefile.am -----+ | +-> Makefile.in\n" "src/Makefile.am -+ | +-> src/Makefile.in\n" " | +-> config.h.in\n" " automake\n" " aclocal\n" " aclocal.m4\n" " autoheader\n" msgstr "" "configure.ac-----+-> autoreconf -+-> configure\n" "Makefile.am -----+ | +-> Makefile.in\n" "src/Makefile.am -+ | +-> src/Makefile.in\n" " | +-> config.h.in\n" " automake\n" " aclocal\n" " aclocal.m4\n" " autoheader\n" #. type: Content of: <book><chapter><section><para> msgid "" "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>." msgstr "" "編輯 <filename>configure.ac</filename> 和 <filename>Makefile.am</filename> 等" "檔案需要一些關於 <command>autoconf</command> 和 <command>automake</command> " "的知識。參考 <literal>info autoconf</literal> 和 <literal>info automake</" "literal>。" #. type: Content of: <book><chapter><section><para> msgid "" "The second step of Autotools work flow is usually that the user obtains this " "distributed source and runs <literal>./configure && make</literal> " "in the source to compile program into a <command><replaceable>binary</" "replaceable></command>." msgstr "" "使用 Autotools 的流程第二部是用戶獲得散佈的原始碼後在原始碼中運行 <literal>./" "configure && make</literal> 並將其編譯成爲 " "<command><replaceable>binary</replaceable></command> (二進位程式)。" #. type: Content of: <book><chapter><section><screen> #, no-wrap msgid "" "Makefile.in -----+ +-> Makefile -----+-> make -> <replaceable>binary</replaceable>\n" "src/Makefile.in -+-> ./configure -+-> src/Makefile -+\n" "config.h.in -----+ +-> config.h -----+\n" " |\n" " config.status -+\n" " config.guess --+\n" msgstr "" "Makefile.in -----+ +-> Makefile -----+-> make -> <replaceable>binary</replaceable>\n" "src/Makefile.in -+-> ./configure -+-> src/Makefile -+\n" "config.h.in -----+ +-> config.h -----+\n" " |\n" " config.status -+\n" " config.guess --+\n" #. type: Content of: <book><chapter><section><para> msgid "" "You can change many things in the <filename>Makefile</filename> file such as " "the default file install location using the command option, e.g. <command>./" "configure --prefix=/usr</command>." msgstr "" "你可以通過命令選項來改變 <filename>Makefile</filename> 檔案中的很多設置,比如" "默認的檔案安裝位置(使用 <command>./configure --prefix=/usr</command>)。" #. type: Content of: <book><chapter><section><para><footnote><para> #, fuzzy #| msgid "" #| "Install the <systemitem role=\"package\">dh-autoreconf</systemitem> " #| "package in <literal>Build-Depends</literal>." msgid "" "You can automate this by using <systemitem role=\"package\">dh-autoreconf</" "systemitem> package. See <xref linkend=\"customrules\"/>." msgstr "" "在 <literal>Build-Depends</literal> 中添加 <systemitem role=\"package\">dh-" "autoreconf</systemitem> 套件。" #. type: Content of: <book><chapter><section><para> #, fuzzy #| msgid "" #| "Although it is not required, updating the <filename>configure</filename> " #| "and other files with <literal>autoreconf -i -f</literal> as the user may " #| "improve the compatibility of the source." msgid "" "Although it is not required, updating the <filename>configure</filename> and " "other files with <literal>autoreconf -i -f</literal> as the user may improve " "the compatibility of the source. <placeholder type=\"footnote\" id=\"0\"/>" msgstr "" "儘管不是必須的,還可以使用 <literal>autoreconf -i -f</literal> 更新 " "<filename>configure</filename> 和其他相關檔案,這樣做可能提高原始碼的兼容性。" #. type: Content of: <book><chapter><section><para> #, fuzzy #| msgid "" #| "<ulink url=\"&cxx;Make\">CMake</ulink> is an alternative build system. " #| "You can notice such sources by the <filename>CMakeLists.txt</filename> " #| "file." msgid "" "<ulink url=\"&cmake;\">CMake</ulink> is an alternative build system. You " "can notice such sources by the <filename>CMakeLists.txt</filename> file." msgstr "" "<ulink url=\"&cxx;Make\">CMake</ulink> 是另一個可選的編譯系統,可以通過 " "<filename>CMakeLists.txt</filename> 檔案來識別它。" #. type: Content of: <book><chapter><section><title> msgid "Package name and version" msgstr "套件名稱和版本" #. type: Content of: <book><chapter><section><para> msgid "" "You should start packaging with a completely clean (pristine) source " "directory, or simply with freshly unpacked sources." msgstr "" "開始打包時原始碼目錄應當是絕對乾淨(原始)的,或者直接使用剛剛解壓縮得到的原始" "碼。" #. type: Content of: <book><chapter><section><para> msgid "" "For the package to be built correctly, you must make the program's original " "name lowercase (if it isn't already), and you should move the source " "directory to <filename><replaceable>packagename</replaceable>-" "<replaceable>version</replaceable></filename>." msgstr "" "爲了讓套件可以正確地編譯和構建,如果程式原有的名字不是完全小寫的則必須將其改" "成小寫,並且應當把原始碼以 <filename><replaceable>packagename</replaceable>-" "<replaceable>version</replaceable></filename> 的形式命名。" #. type: Content of: <book><chapter><section><para> msgid "" "If the program name consists of more than one word, contract them to one " "word, or make an abbreviation. For example, program John's little editor " "for X package would be named <systemitem role=\"package\">johnledx</" "systemitem>, or <systemitem role=\"package\">jle4x</systemitem>, or whatever " "you decide, as long as it's under some reasonable limit, e.g. 20 characters." msgstr "" "如果程式的名稱超過一個單詞,把它改成一個單詞或縮寫成合適的形式。例如,程" "式“John's little editor for X”可以命名爲 <systemitem role=\"package" "\">johnledx</systemitem> 或 <systemitem role=\"package\">jle4x</systemitem>," "或者隨便你認爲合適的其他名字。它需要符合一定的限制,比如長度不要超過 20 和字" "符。" #. type: Content of: <book><chapter><section><para><footnote><para> msgid "" "Version string can be compared by <literal>dpkg --compare-versions " "<replaceable>ver1</replaceable> <replaceable>op</replaceable> " "<replaceable>ver2</replaceable></literal>. See <citerefentry> " "<refentrytitle>dpkg</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> " "manpage." msgstr "" "Version 字符串可以用 <literal>dpkg --compare-versions <replaceable>ver1</" "replaceable> <replaceable>op</replaceable> <replaceable>ver2</replaceable></" "literal> 命令比較。參考 <citerefentry> <refentrytitle>dpkg</refentrytitle> " "<manvolnum>1</manvolnum> </citerefentry> man 手冊頁。" #. type: Content of: <book><chapter><section><para> msgid "" "Also check for the exact version of the program (to be included in the " "package version). If that piece of software is not numbered with versions " "like <literal>X.Y.Z</literal>, but with some kind of date, feel free to use " "that date as the version number, as long as newer version numbers will look " "larger. While it is best to use the same version number as what upstream " "uses, if it is in the format of <literal>09Oct23</literal> you may need to " "convert it to <literal>YYYYMMDD</literal> format, which would be " "<literal>20091023</literal>, to ensure proper order for upgrade with the " "<command>dpkg</command> program.<placeholder type=\"footnote\" id=\"0\"/>" msgstr "" "還要檢査程式的版本號,它將被包含到套件版本內。如果手中的軟體版本號不是 " "<literal>X.Y.Z</literal> 的形式,而是使用日期等形式。那麼可以繼續使用日期來作" "爲版本號,只要新版本程式的版本號能變得比老闆本大即可。最好能與上游使用相同的" "版本號,如果上游使用了諸如 <literal>09Oct23</literal> 的格式,那麼最好將其轉" "換爲 <literal>YYYYMMDD</literal> 的格式,此例中爲 <literal>20091023</" "literal>,以便保證 <command>dpkg</command> 程式在更新軟體時能正確處理新舊版" "本。<placeholder type=\"footnote\" id=\"0\"/>" #. type: Content of: <book><chapter><section><para> msgid "" "Some programs won't be numbered at all, in which case you should contact the " "upstream maintainer to see if they've got some other revision-tracking " "method." msgstr "" "還有一些程式根本就沒有版本號,這是你應該聯繫上游維護者,看他們是否使用了其他" "的版本跟蹤方法。" #. type: Content of: <book><chapter><section><title> msgid "Initial Debian package" msgstr "初始化 Debian 套件" #. type: Content of: <book><chapter><section><para><footnote><para> msgid "" "The following text assumes you are using Bash as your login shell. If you " "use other login shells such as Z shell, use their pertinent configuration " "files instead of <filename>~/.bashrc</filename>." msgstr "" "以下默認以 Bash 作爲登陸 shell。如果你使用其他的 shell,例如 Z shell,使用它" "們的設定檔案代替這裏提到的 <filename>~/.bashrc</filename>。" #. type: Content of: <book><chapter><section><para> msgid "" "Let's set up the shell environment variable <literal>$DEBEMAIL</literal> and " "<literal>$DEBFULLNAME</literal> so many Debian maintenance tools recognize " "your name and email address to use for packages as follows.<placeholder type=" "\"footnote\" id=\"0\"/>." msgstr "" "首先我們設置兩個 環境變量,<literal>$DEBEMAIL</literal> 和 <literal>" "$DEBFULLNAME</literal>,使多數 Debian 維護工具能夠正確識別你用於維護套件的姓" "名和電子郵件地址。<placeholder type=\"footnote\" id=\"0\"/>" #. type: Content of: <book><chapter><section><screen> #, no-wrap msgid "" "$ cat >>~/.bashrc <<EOF\n" "DEBEMAIL=your.email.address@example.org\n" "DEBFULLNAME=Firstname Lastname\n" "export DEBEMAIL DEBFULLNAME\n" "EOF\n" msgstr "" "$ cat >>~/.bashrc <<EOF\n" "DEBEMAIL=your.email.address@example.org\n" "DEBFULLNAME=Firstname Lastname\n" "export DEBEMAIL DEBFULLNAME\n" "EOF\n" #. type: Content of: <book><chapter><section><para> msgid "" "Let's make an initial Debian package by issuing the <command>dh_make</" "command> command as follows." msgstr "" "讓我們按照以下方法使用 <command>dh_make</command> 來初始化 Debian 套件。" #. type: Content of: <book><chapter><section><screen> #, no-wrap msgid "" "$ . ~/.bashrc\n" "$ cd ~/gentoo/gentoo-0.9.12\n" "$ dh_make -f ../gentoo-0.9.12.tar.gz\n" msgstr "" "$ . ~/.bashrc\n" "$ cd ~/gentoo/gentoo-0.9.12\n" "$ dh_make -f ../gentoo-0.9.12.tar.gz\n" #. type: Content of: <book><chapter><section><para><footnote><para> msgid "" "If the upstream source provides the <filename>debian</filename> directory " "and its contents, run the <command>dh_make</command> command with the " "<literal>--addmissing</literal> option, instead. The new source " "<literal>3.0 (quilt)</literal> format is quite robust not to break even for " "these packages. You may need to update contents provided by the upstream " "for your Debian package." msgstr "" #. type: Content of: <book><chapter><section><para> msgid "" "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>1</manvolnum> </" "citerefentry> for details." msgstr "" #. type: Content of: <book><chapter><section><para><footnote><para> msgid "" "There are few choices here: <literal>s</literal> for Single binary, " "<literal>i</literal> for Arch-Independent, <literal>m</literal> for Multiple " "binary, <literal>l</literal> for Library, <literal>k</literal> for Kernel " "module, <literal>n</literal> for Kernel patch and <literal>b</literal> for " "<systemitem role=\"package\">cdbs</systemitem>. This document focuses on " "the use of the <systemitem role=\"package\">debhelper</systemitem> package " "with the <command>dh</command> command. This document focuses on the use of " "the new <command>dh</command> command for Single binary and touches on it " "for Arch-Independent and Multiple binary. The <systemitem role=\"package" "\">cdbs</systemitem> package offers alternative package script " "infrastructure to the <command>dh</command> command and outside of the scope " "of this document." msgstr "" #. type: Content of: <book><chapter><section><para> msgid "" "Some information will come up. It will ask you what sort of package you " "want to create. Gentoo is a single binary package - it creates only one " "binary, and thus one <filename>.deb</filename> file - 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\"/>" msgstr "" #. type: Content of: <book><chapter><section><para> msgid "" "After this execution of <command>dh_make</command>, a copy of the upstream " "tarball is created 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 <filename>debian.tar.gz</filename> later." msgstr "" "執行 <command>dh_make</command> 後,上一級目錄中自動創建了一份上游 tarball 的" "副本,名爲 <filename>gentoo_0.9.12.orig.tar.gz</filename>,這個檔案和稍後介紹" "的 <filename>debian.tar.gz</filename> 在一起滿足了 Debian 非本地原始碼套件的" "要求。" #. type: Content of: <book><chapter><section><screen> #, no-wrap msgid "" "$ cd ~/gentoo ; ls -F\n" "gentoo-0.9.12/\n" "gentoo-0.9.12.tar.gz\n" "gentoo_0.9.12.orig.tar.gz\n" msgstr "" "$ cd ~/gentoo ; ls -F\n" "gentoo-0.9.12/\n" "gentoo-0.9.12.tar.gz\n" "gentoo_0.9.12.orig.tar.gz\n" #. type: Content of: <book><chapter><section><para> msgid "" "Please note 2 key features in this <filename>gentoo_0.9.12.orig.tar.gz</" "filename> file name:" msgstr "" "請注意 <filename>gentoo_0.9.12.orig.tar.gz</filename> 這個檔案名的兩個關鍵特" "點:" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "Package name and version are separated by the <literal>_</literal> " "(underscore)." msgstr "套件名稱和版本是以底線 <literal>_</literal> 分隔的。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "There is the <filename>.orig</filename> before the <filename>.tar.gz</" "filename>." msgstr "<filename>.tar.gz</filename> 副檔名前有 <filename>.orig</filename>。" #. type: Content of: <book><chapter><section><para> msgid "" "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 the packaging is not automatic process. You need to modify " "the upstream source for Debian as <xref linkend=\"modify\"/>. After all " "these, you need to build Debian packages under the proper method as <xref " "linkend=\"build\"/>, check them as <xref linkend=\"checkit\"/>, and upload " "them as <xref linkend=\"upload\"/>. I will explain all these steps." msgstr "" "你應該可以注意到 <filename>debian</filename> 目錄下有了許多模板檔案。這些檔案" "將在 <xref linkend=\"dreq\"/> 和 <xref linkend=\"dother\"/> 一一解釋。你還應" "該明白,打包不是一個自動的過程,你還需要按照 <xref linkend=\"modify\"/> 中的" "方法來修改套件。此後,你還要按照 <xref linkend=\"build\"/> 中敘述的合適的方法" "來編譯 Debian 套件、按照 <xref linkend=\"checkit\"/> 中的方法檢査其中錯誤,最" "終依照 <xref linkend=\"upload\"/> 的介紹將其上傳。我將對所有的這些步驟進行解" "釋。" #. type: Content of: <book><chapter><section><para> msgid "" "Once again, as a new maintainer you are discouraged from creating " "complicated packages, e.g.," msgstr "再次強調,作爲一個新維護人員,不推薦創建複雜的套件,例如:" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "multiple binary packages," msgstr "多個二進位套件的套件;" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "library packages," msgstr "函式庫套件;" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "kernel module packages," msgstr "核心模組套件;" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "kernel patch packages," msgstr "核心補丁套件;" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "the source file format being neither in <filename>tar.gz</filename> nor " "<filename>tar.bz2</filename>, or" msgstr "" "原始碼不是 <filename>tar.gz</filename> 也不是 <filename>tar.bz2</filename> 格" "式,或" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "the source tarball containing undistributable contents." msgstr "原始碼 tarball 中包含不可散佈的內容。" #. type: Content of: <book><chapter><section><para> msgid "" "It's not too hard, but it does require a bit more knowledge, so we won't " "describe all of it here." msgstr "" "它們並非特別難於掌握,但確實需要更多的知識,所以我們不在這裏對所有情況進行描" "述。" #. type: Content of: <book><chapter><section><para> msgid "" "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." msgstr "" "如果你在修改過程中不小心刪除或弄壞了某些模板檔案,你可以使用 " "<command>dh_make</command> 加上 <literal>--addmissing</literal> 參數來將其還" "原。" #. type: Content of: <book><chapter><section><para> msgid "" "Updating an existing package may get complicated since it may be using older " "techniques. Please stick with fresh packaging cases for now to learn " "basics. I will come back to explain it later in <xref linkend=\"update\"/>." msgstr "" "更新一個已存在的套件可能比較複雜,因爲它可能使用舊的技術。請繼續在這裏學習最" "新的打包技術以便掌握必要的基本功。我們會在稍後的 <xref linkend=\"update\"/> " "中回頭講解如何處理這種情況。" #. type: Content of: <book><chapter><title> msgid "Modifying the source" msgstr "修改原始碼" #. type: Content of: <book><chapter><para> msgid "" "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." msgstr "" "請注意這裏沒有足夠的篇幅來描述修改上游原始碼的 <emphasis>全部</emphasis> 細" "節,但是這裏介紹了基本的步驟和常見的問題。" #. type: Content of: <book><chapter><section><title> msgid "Set up <command>quilt</command>" msgstr "設置 <command>quilt</command>" #. type: Content of: <book><chapter><section><para> #, fuzzy #| msgid "" #| "The <command>quilt</command> program offers the basic method to record " #| "modification to the source for the Debian packaging. Since slightly " #| "different default is desirable for Debian packaging, let's set up " #| "<filename>~/.quiltrc</filename> as follows. <placeholder type=\"footnote" #| "\" id=\"0\"/>" msgid "" "The <command>quilt</command> program offers the basic method to record " "modification to the source for the Debian packaging. Since slightly " "different default is desirable, let's create an alias <command>dquilt</" "command> for Debian packaging by adding the following line to <filename>~/." "bashrc</filename>." msgstr "" "<command>quilt</command> 程式爲 Debian 工作提供了對源碼修改的基本記錄方法。由" "於我們的需求與默認設定相當的不同,我們把 <filename>~/.quiltrc</filename> 設置" "成如下的樣子。<placeholder type=\"footnote\" id=\"0\"/>" #. type: Content of: <book><chapter><section><screen> #, no-wrap msgid "alias dquilt=quilt --quiltrc=~/.quiltrc-dpkg\n" msgstr "" #. type: Content of: <book><chapter><section><para> #, fuzzy #| msgid "You change the <filename>Makefile</filename> file as follows." msgid "Then let's create <filename>~/.quiltrc-dpkg</filename> as follows." msgstr "現在將 <filename>Makefile</filename> 修改爲如下的樣子。" #. type: Content of: <book><chapter><section><screen> #, fuzzy, no-wrap #| msgid "" #| "d=. ; while [ ! -d $d/debian -a `readlink -e $d` != / ]; do d=$d/..; done\n" #| "if [ -d $d/debian ] && [ -z $QUILT_PATCHES ]; then\n" #| " # Debian packaging case and unset $QUILT_PATCHES\n" #| " QUILT_PATCHES=debian/patches\n" #| " QUILT_PATCH_OPTS=--unified-reject-files\n" #| " QUILT_DIFF_ARGS=-p ab --no-timestamps --no-index --color=auto\n" #| " QUILT_REFRESH_ARGS=-p ab --no-timestamps --no-index\n" #| " QUILT_COLORS=diff_hdr=1;32:diff_add=1;34:diff_rem=1;31:diff_hunk=1;33:diff_ctx=35:diff_cctx=33\n" #| " if ! [ -d $d/debian/patches ]; then mkdir $d/debian/patches; fi\n" #| "fi\n" msgid "" "d=. ; while [ ! -d $d/debian -a `readlink -e $d` != / ]; do d=$d/..; done\n" "if [ -d $d/debian ] && [ -z $QUILT_PATCHES ]; then\n" " # Debian packaging case and unset $QUILT_PATCHES\n" " QUILT_PATCHES=\"debian/patches\"\n" " QUILT_PATCH_OPTS=\"--reject-format=unified\"\n" " QUILT_DIFF_ARGS=\"-p ab --no-timestamps --no-index --color=auto\"\n" " QUILT_REFRESH_ARGS=\"-p ab --no-timestamps --no-index\"\n" " QUILT_COLORS=\"diff_hdr=1;32:diff_add=1;34:diff_rem=1;31:diff_hunk=1;33:diff_ctx=35:diff_cctx=33\"\n" " if ! [ -d $d/debian/patches ]; then mkdir $d/debian/patches; fi\n" "fi\n" msgstr "" "d=. ; while [ ! -d $d/debian -a `readlink -e $d` != / ]; do d=$d/..; done\n" "if [ -d $d/debian ] && [ -z $QUILT_PATCHES ]; then\n" " # Debian packaging case and unset $QUILT_PATCHES\n" " QUILT_PATCHES=debian/patches\n" " QUILT_PATCH_OPTS=--unified-reject-files\n" " QUILT_DIFF_ARGS=-p ab --no-timestamps --no-index --color=auto\n" " QUILT_REFRESH_ARGS=-p ab --no-timestamps --no-index\n" " QUILT_COLORS=diff_hdr=1;32:diff_add=1;34:diff_rem=1;31:diff_hunk=1;33:diff_ctx=35:diff_cctx=33\n" " if ! [ -d $d/debian/patches ]; then mkdir $d/debian/patches; fi\n" "fi\n" #. type: Content of: <book><chapter><section><para> #, fuzzy #| msgid "" #| "See <citerefentry> <refentrytitle>quilt</refentrytitle> <manvolnum>1</" #| "manvolnum> </citerefentry> and <filename>/usr/share/doc/quilt/quilt.html</" #| "filename> for how to use <command>quilt</command>." msgid "" "See <citerefentry> <refentrytitle>quilt</refentrytitle> <manvolnum>1</" "manvolnum> </citerefentry> and <ulink url=\"&quilt-pdf;\">quilt.pdf</ulink> " "for how to use <command>quilt</command>." msgstr "" "參考 <citerefentry> <refentrytitle>quilt</refentrytitle> <manvolnum>1</" "manvolnum> </citerefentry> 和 <filename>/usr/share/doc/quilt/quilt.html</" "filename> 來了解如何使用 <command>quilt</command>。" #. type: Content of: <book><chapter><section><title> msgid "Fixing upstream bug" msgstr "修復上游 Bug" #. type: Content of: <book><chapter><section><para> msgid "" "Let's assume you find an error in the upstream <filename>Makefile</filename> " "file as follows where <literal>install: gentoo</literal> should have been " "<literal>install: gentoo-target</literal>." msgstr "" "讓我們假設你在上游的 <filename>Makefile</filename> 檔案中找到了一個錯誤,其中" "的 <literal>install: gentoo</literal> 應該是 <literal>install: gentoo-" "target</literal> 才正確。" #. type: Content of: <book><chapter><section><screen> #, no-wrap msgid "" "install: gentoo\n" " install ./gentoo $(BIN)\n" " install icons/* $(ICONS)\n" " install gentoorc-example $(HOME)/.gentoorc\n" msgstr "" "install: gentoo\n" " install ./gentoo $(BIN)\n" " install icons/* $(ICONS)\n" " install gentoorc-example $(HOME)/.gentoorc\n" #. type: Content of: <book><chapter><section><para><footnote><para> msgid "" "The <filename>debian/patches</filename> directory should exist now if you " "run <command>dh_make</command> as described before. This example operation " "creates it just in case you are updating the existing package." msgstr "" "<filename>debian/patches</filename> 應當在你按照前面所述的步驟運行 " "<command>dh_make</command> 時生成的。這個例子中我們新創建它,因爲假設的是在更" "新一個已存在的套件。" #. type: Content of: <book><chapter><section><para> #, fuzzy #| msgid "" #| "Let's fix this and record this with the <command>quilt</command> command " #| "as <filename>fix-gentoo-target.patch</filename>. <placeholder type=" #| "\"footnote\" id=\"0\"/>" msgid "" "Let's fix this and record this with the <command>dquilt</command> command as " "<filename>fix-gentoo-target.patch</filename>. <placeholder type=\"footnote" "\" id=\"0\"/>" msgstr "" "讓我們使用 <command>quilt</command> 修復它,並把它命名爲 <filename>fix-" "gentoo-target.patch</filename>。<placeholder type=\"footnote\" id=\"0\"/>" #. type: Content of: <book><chapter><section><screen> #, fuzzy, no-wrap #| msgid "" #| "$ mkdir debian/patches\n" #| "$ quilt new fix-gentoo-target.patch\n" #| "$ quilt add Makefile\n" msgid "" "$ mkdir debian/patches\n" "$ dquilt new fix-gentoo-target.patch\n" "$ dquilt add Makefile\n" msgstr "" "$ mkdir debian/patches\n" "$ quilt new fix-gentoo-target.patch\n" "$ quilt add Makefile\n" #. type: Content of: <book><chapter><section><para> msgid "You change the <filename>Makefile</filename> file as follows." msgstr "現在將 <filename>Makefile</filename> 修改爲如下的樣子。" #. type: Content of: <book><chapter><section><screen> #, no-wrap msgid "" "install: gentoo-target\n" " install ./gentoo $(BIN)\n" " install icons/* $(ICONS)\n" " install gentoorc-example $(HOME)/.gentoorc\n" msgstr "" "install: gentoo-target\n" " install ./gentoo $(BIN)\n" " install icons/* $(ICONS)\n" " install gentoorc-example $(HOME)/.gentoorc\n" #. type: Content of: <book><chapter><section><para> #, fuzzy #| msgid "" #| "Ask <command>quilt</command> to refresh the patch to create " #| "<filename>debian/patches/fix-gentoo-target.patch</filename> and add its " #| "description." msgid "" "Ask <command>dquilt</command> to refresh 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>." msgstr "" "使用 <command>quilt</command> 更新補丁以創建 <filename>debian/patches/fix-" "gentoo-targe.patch</filename> 並添加描述。" #. type: Content of: <book><chapter><section><screen> #, fuzzy, no-wrap #| msgid "" #| "$ quilt refresh\n" #| "$ quilt header -e\n" #| "... describe patch\n" msgid "" "$ dquilt refresh\n" "$ dquilt header -e\n" "... describe patch\n" msgstr "" "$ quilt refresh\n" "$ quilt header -e\n" "... 描述補丁\n" #. type: Content of: <book><chapter><section><title> msgid "Installation of files to the destination" msgstr "把檔案安裝到目的位置" #. type: Content of: <book><chapter><section><para> #, fuzzy #| msgid "" #| "Normally, programs install themselves in the <filename>/usr/local</" #| "filename> subdirectory. Since it is reserved for system administrator's " #| "(or user's) private use, Debian packages must not use that directory but " #| "should use system directories such as the <filename>/usr/bin</filename> " #| "subdirectory following the Filesystem Hierarchy Standard (<ulink url=" #| "\"&fhs;\">FHS</ulink>, <filename>/usr/share/doc/debian-policy/fhs/fhs-2.3." #| "html</filename>)." msgid "" "Normally, programs install themselves in the <filename>/usr/local</filename> " "subdirectory. Since it is reserved for system administrator's (or user's) " "private use, Debian packages must not use that directory but should use " "system directories such as the <filename>/usr/bin</filename> subdirectory " "following the <ulink url=\"&fhs;\">Filesystem Hierarchy Standard</ulink> " "(FHS)." msgstr "" "正常情況下,程式將其本身安裝在 <filename>/usr/local</filename>。因爲它是保留" "給系統管理員(或用戶)的私有位置,Debian 套件不可以使用該目錄,而是按照檔案系統" "層級標準(<ulink url=\"&fhs;\">FHS</ulink>,<filename>/usr/share/doc/debian-" "policy/fhs/fhs-2.3.html</filename>)使用如 <filename>/usr/bin</filename> 等目" "錄。" #. type: Content of: <book><chapter><section><para> msgid "" "Normally, <citerefentry> <refentrytitle>make</refentrytitle> <manvolnum>1</" "manvolnum> </citerefentry> is used to automate building the program and the " "execution of <literal>make install</literal> installs programs directly to " "the desired destination by the <literal>install</literal> target of the " "<filename>Makefile</filename> file. In order for Debian to provide binary " "packages, the build system installs programs to the file tree image created " "under a temporary directory instead to the actual destination." msgstr "" "通常在自動編譯程式時使用 <citerefentry> <refentrytitle>make</refentrytitle> " "<manvolnum>1</manvolnum> </citerefentry> 程式,執行 <literal>make install</" "literal> 就把程式直接按照 <filename>Makefile</filename> 檔案中的 " "<literal>install</literal> target 安裝到指定的位置。爲了使 Debian 能夠提供二" "進位套件,編譯系統將檔案安裝到一個臨時目錄中創建的檔案系統樹的鏡像中,而非直" "接安裝到實際的目標位置。" #. type: Content of: <book><chapter><section><para> msgid "" "These 2 differences between (1) the normal program installation and (2) the " "Debian packaging 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." msgstr "" "普通程式安裝過程和 Debian 打包安裝過程的區別可以由 <systemitem role=\"package" "\">debhelper</systemitem> 套件中的 <command>dh_auto_configure</command> 和 " "<command>dh_auto_install</command> 透明地處理。但程式必須滿足以下條件:" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para><footnote><para> msgid "" "See <ulink url=\"&gnu-destdir;\">GNU Coding Standards: 7.2.4 DESTDIR: " "Support for Staged Installs</ulink>." msgstr "" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> #, fuzzy #| msgid "" #| "The <filename>Makefile</filename> file follows the GNU conventions to " #| "support <literal>$(DESTDIR)</literal> variable (<filename>/usr/share/doc/" #| "gnu-standards/standards.html#Makefile-Conventions</filename>)." msgid "" "The <filename>Makefile</filename> file follows the GNU conventions to " "support <literal>$(DESTDIR)</literal> variable. <placeholder type=\"footnote" "\" id=\"0\"/>" msgstr "" "<filename>Makefile</filename> 檔案遵循 GNU 的規定支持 <literal>$(DESTDIR)</" "literal> 變量(<filename>/usr/share/doc/gnu-standards/standards.html#Makefile-" "Conventions</filename>)。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "The source follows the Filesystem Hierarchy Standard (FHS)." msgstr "原始碼遵循檔案系統層級標準(FHS)。" #. type: Content of: <book><chapter><section><para> msgid "" "Programs that use GNU <command>autoconf</command> <emphasis>automatically</" "emphasis> follow the GNU conventions and their packaging is almost " "<emphasis>automatic</emphasis>. With this and other heuristics, the " "<systemitem role=\"package\">debhelper</systemitem> package estimates that " "it works for about 90% of packages without making any intrusive changes to " "their build system. So the packaging is not as complicated as it may seem." msgstr "" "使用 GNU <command>autoconf</command> 的程式 <emphasis>自動</emphasis> 遵守了 " "GNU 的規定,這些程式的打包也就 <emphasis>幾乎是自動的</emphasis>。通過這項特" "點和其他啓發式處理,<systemitem role=\"package\">debhelper</systemitem> 套件" "可以直接打包約 90% 的套件而不需對編譯系統做出大的改變。所以打包也不是它看起來" "那樣複雜。" #. type: Content of: <book><chapter><section><para> msgid "" "If you need to make changes in the <filename>Makefile</filename> file, you " "should make sure to support these <literal>$(DESTDIR)</literal> variable. " "The <literal>$(DESTDIR)</literal> variable is unset in it and is prepended " "to each file path used for the program installation. The packaging script " "will set <literal>$(DESTDIR)</literal> to the temporary directory." msgstr "" "如果你需要修改 <filename>Makefile</filename> 檔案,要確保其支持 <literal>" "$(DESTDIR)</literal> 變量。默認情況下 <literal>$(DESTDIR)</literal> 變量沒有" "設置並且默認使用程式選擇的安裝位置。打包腳本會將 <literal>$(DESTDIR)</" "literal> 設置爲臨時目錄。" #. type: Content of: <book><chapter><section><para><footnote><para> msgid "" "For 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 " "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 multiple binary <filename>*.deb</filename> packages." msgstr "" "對於多個二進位套件,<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>*.deb</filename> 套件。" #. type: Content of: <book><chapter><section><para> msgid "" "The temporary directory used by the <command>dh_auto_install</command> " "command is chosen as <filename>debian/<replaceable>package</replaceable></" "filename> for single binary packages. <placeholder type=\"footnote\" id=" "\"0\"/> Everything that is contained in the temporary directory will be " "installed on a user's system when they install your package, the only " "difference is that <command>dpkg</command> will be installing the files in " "the root directory." msgstr "" "對於單個二進位套件 <command>dh_auto_install</command> 將臨時目錄設置爲 " "<filename>debian/<replaceable>package</replaceable></filename>。<placeholder " "type=\"footnote\" id=\"0\"/> 臨時目錄中的全部檔案都將在用戶安裝套件時被安裝到" "用戶系統,唯一的區別是 <command>dpkg</command> 會把檔案安裝到真實的根目錄樹" "中。" #. type: Content of: <book><chapter><section><para> msgid "" "Bear in mind that even though your program installs in <filename>debian/" "<replaceable>package</replaceable></filename>, it still needs to behave " "correctly when placed in the root directory, i.e. when installed from the " "<filename>.deb</filename> package. 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 the package file." msgstr "" "請記住,即使你的程式正確安裝到了<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> 的內容硬" "編碼到編譯系統中並裝入套件檔案。" #. type: Content of: <book><chapter><section><para><footnote><para> msgid "" "This is just an example to show how the <filename>Makefile</filename> file " "should look like. If the <filename>Makefile</filename> file is created by " "the <command>./configure</command> command, the correct way to fix this kind " "of <filename>Makefile</filename> is to executed the <command>./configure</" "command> command from the <command>dh_auto_configure</command> command with " "default options including <literal>--prefix=/usr</literal>." msgstr "" "這只是一個 <filename>Makefile</filename> 的例子。如果 <filename>Makefile</" "filename> 是通過 <command>./configure</command> 命令生成的,修復該類的 " "<filename>Makefile</filename> 的方法是通過 <command>dh_auto_configure</" "command> 執行 <command>./configure</command>,並帶上如 <literal>--prefix=/" "usr</literal> 的默認選項。" #. type: Content of: <book><chapter><section><para> msgid "" "Here's the relevant part of <systemitem role=\"package\">gentoo</" "systemitem>'s <filename>Makefile</filename> file <placeholder type=\"footnote" "\" id=\"0\"/>:" msgstr "" "以下是 <systemitem role=\"package\">gentoo</systemitem> 的 " "<filename>Makefile</filename> 檔案中的相關部分<placeholder type=\"footnote\" " "id=\"0\"/>:" #. type: Content of: <book><chapter><section><screen> #, no-wrap msgid "" "# Where to put binary on 'make install'?\n" "BIN = /usr/local/bin\n" "# Where to put icons on 'make install'?\n" "ICONS = /usr/local/share/gentoo\n" msgstr "" "# Where to put binary on 'make install'?\n" "BIN = /usr/local/bin\n" "# Where to put icons on 'make install'?\n" "ICONS = /usr/local/share/gentoo\n" #. type: Content of: <book><chapter><section><para> msgid "" "We see that the files are set to install under <filename>/usr/local</" "filename>. Change those paths to:" msgstr "" "可以看到檔案被放到了 <filename>/usr/local</filename> 下。把他們改變爲:" #. type: Content of: <book><chapter><section><screen> #, no-wrap msgid "" "# Where to put binary on 'make install'?\n" "BIN = $(DESTDIR)/usr/bin\n" "# Where to put icons on 'make install'?\n" "ICONS = $(DESTDIR)/usr/share/gentoo\n" msgstr "" "# Where to put binary on 'make install'?\n" "BIN = $(DESTDIR)/usr/bin\n" "# Where to put icons on 'make install'?\n" "ICONS = $(DESTDIR)/usr/share/gentoo\n" #. type: Content of: <book><chapter><section><para> msgid "" "But why in that directory, and not some other? Because Debian packages never " "install files beneath <filename>/usr/local</filename> -- that tree is " "reserved for the system administrator's use. Such files on Debian systems " "go under <filename>/usr</filename> instead." msgstr "" "爲什麼要放在那個目錄,而非其他的呢?因爲 Debian 套件從不在 <filename>/usr/" "local</filename> 下安裝檔案——那是保留給系統管理員使用的。在 Debian 中這些檔案" "被直接放入 <filename>/usr</filename>。" #. type: Content of: <book><chapter><section><para> #, fuzzy #| msgid "" #| "The more exact locations for binaries, icons, documentation etc. are " #| "specified in the Filesystem Hierarchy Standard (see <filename>/usr/share/" #| "doc/debian-policy/fhs/</filename>). I recommend you browse it and read " #| "the sections that might concern your package." msgid "" "The more exact locations for binaries, icons, documentation etc. are " "specified in the Filesystem Hierarchy Standard (FHS). I recommend you " "browse it and read the sections that might concern your package." msgstr "" "二進位檔案、圖示和文件等的更詳細位置均在檔案層級標準(FHS,參考 <filename>/" "usr/share/doc/debian-policy/fhs/</filename>)中作出了詳盡描述。我建議閱讀相關" "章節以瞭解可能影響你套件的內容。" #. type: Content of: <book><chapter><section><para> msgid "" "So, we should install the binary 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> " "etc. Notice how there's no manual page mentioned in <systemitem role=" "\"package\">gentoo</systemitem>'s <filename>Makefile</filename>, but since " "the Debian Policy requires that every program has one, we'll make one later " "and install it in <filename>/usr/share/man/man1</filename>." msgstr "" "因此,我們應當把二進位檔案安裝到 <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>" #. type: Content of: <book><chapter><section><para> msgid "" "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:" msgstr "" "有些程式不使用 <filename>Makefile</filename> 變量定義路徑,這意味着你可能需要" "去編輯 C 程式原始碼來使他們使用正確的路徑。但是到哪裏去搜索,哪些才是呢?你可" "以通過以下的方法找到它們:" #. type: Content of: <book><chapter><section><screen> #, no-wrap msgid "$ grep -nr -e 'usr/local/lib' --include='*.[c|h]' .\n" msgstr "$ grep -nr -e 'usr/local/lib' --include='*.[c|h]' .\n" #. type: Content of: <book><chapter><section><para> msgid "" "<command>grep</command> will run recursively through the source tree and " "tell you the filename and the line number for all matches." msgstr "" "<command>grep</command> 會遞歸搜索整個原始碼樹並告訴你所有匹配項的檔案名和行" "號。" #. type: Content of: <book><chapter><section><para> #, fuzzy #| msgid "" #| "Edit those files and in those lines replace <literal>usr/local/lib</" #| "literal> with <literal>usr/lib</literal>." msgid "" "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:" msgstr "" "編輯那些檔案,用 <literal>usr/lib</literal> 替換 <literal>usr/local/lib</" "literal>。" #. type: Content of: <book><chapter><section><screen> #, no-wrap msgid "" "$ vim '+argdo %s/usr\\/local\\/lib/usr\\/lib/gce|update' +q \\\n" " $(find . -type f -name '*.[c|h]')\n" msgstr "" "$ vim '+argdo %s/usr\\/local\\/lib/usr\\/lib/gce|update' +q \\\n" " $(find . -type f -name '*.[c|h]')\n" #. type: Content of: <book><chapter><section><para> msgid "Be careful that you don't mess up the rest of the code! :-)" msgstr "小心不要弄亂其他部分的程式碼! :-)" #. type: Content of: <book><chapter><section><para> msgid "" "After that you should find the install target (search for line that starts " "with <literal>install:</literal>, that will usually work) and rename all " "references to directories other than ones defined at the top of the " "<filename>Makefile</filename>." msgstr "" "此後你應該找到 install target (通常搜索以 <literal>install:</literal> 開頭的" "行即可),並把所有的相關目錄以及在 <filename>Makefile</filename> 頂部定義變量" "均做修改。" #. type: Content of: <book><chapter><section><para> #, fuzzy #| msgid "" #| "After your upstream bug fix, <systemitem role=\"package\">gentoo</" #| "systemitem>'s install target said:" msgid "" "Before your upstream bug fix, <systemitem role=\"package\">gentoo</" "systemitem>'s install target said:" msgstr "" "在你修復了上游的 Bug 後,<systemitem role=\"package\">gentoo</systemitem> 的 " "install target 應是這樣:" #. type: Content of: <book><chapter><section><para> #, fuzzy #| msgid "" #| "Let's fix this and record this with the <command>quilt</command> command " #| "as <filename>debian/patches/install.patch</filename>." msgid "" "Let's fix this and record this with the <command>dquilt</command> command as " "<filename>debian/patches/install.patch</filename>." msgstr "" "讓我們把這些修改使用 <command>quilt</command> 記錄到<filename>debian/patches/" "install.patch</filename>。" #. type: Content of: <book><chapter><section><screen> #, fuzzy, no-wrap #| msgid "" #| "$ quilt new install.patch\n" #| "$ quilt add Makefile\n" msgid "" "$ dquilt new install.patch\n" "$ dquilt add Makefile\n" msgstr "" "$ quilt new install.patch\n" "$ quilt add Makefile\n" #. type: Content of: <book><chapter><section><para> msgid "Let's change this for Debian package as following using the editor:" msgstr "我們使用編輯器按照以下內容爲 Debian 套件做修改:" #. type: Content of: <book><chapter><section><screen> #, no-wrap msgid "" "install: gentoo-target\n" " install -d $(BIN) $(ICONS) $(DESTDIR)/etc\n" " install ./gentoo $(BIN)\n" " install -m644 icons/* $(ICONS)\n" " install -m644 gentoorc-example $(DESTDIR)/etc/gentoorc\n" msgstr "" "install: gentoo-target\n" " install -d $(BIN) $(ICONS) $(DESTDIR)/etc\n" " install ./gentoo $(BIN)\n" " install -m644 icons/* $(ICONS)\n" " install -m644 gentoorc-example $(DESTDIR)/etc/gentoorc\n" #. type: Content of: <book><chapter><section><para> msgid "" "You've surely noticed that there's now a <literal>install -d</literal> " "command before the other commands in the rule. The original " "<filename>Makefile</filename> didn't have it because usually the <literal>/" "usr/local/bin</literal> and other directories already exist on the system " "where one runs <literal>make install</literal>. However, since we will " "install into our own empty (or even nonexistent) directory, we will have to " "create each and every one of those directories." msgstr "" "你一定會注意到在其他命令前有了一個 <literal>install -d</literal> 命令。原始" "的 <filename>Makefile</filename> 檔案中沒有它,因爲通常情況下 <literal>/usr/" "local/bin</literal> 和用到的其他目錄早已存在於系統,使用 <literal>make " "install</literal> 時不用對此處理。然而因爲我們要向空目錄或尚不存在的目錄中安" "裝,我們必須創建每一個目錄。" #. type: Content of: <book><chapter><section><para> msgid "" "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:" msgstr "我們還可以在末尾添加上其他的內容,比如上游作者有時會省略的附加文件:" #. type: Content of: <book><chapter><section><screen> #, no-wrap msgid "" " install -d $(DESTDIR)/usr/share/doc/gentoo/html\n" " cp -a docs/* $(DESTDIR)/usr/share/doc/gentoo/html\n" msgstr "" " install -d $(DESTDIR)/usr/share/doc/gentoo/html\n" " cp -a docs/* $(DESTDIR)/usr/share/doc/gentoo/html\n" #. type: Content of: <book><chapter><section><para> #, fuzzy #| msgid "" #| "After careful check, if everything is fine, ask <command>quilt</command> " #| "to refresh the patch to create <filename>debian/patches/install.patch</" #| "filename> and add its description." msgid "" "After careful check, if everything is fine, ask <command>dquilt</command> to " "refresh the patch to create <filename>debian/patches/install.patch</" "filename> and add its description." msgstr "" "仔細檢査後如果沒有問題,使用 <command>quilt</command> 更新補丁以創建 " "<filename>debian/patches/install.patch</filename> 檔案並添加對它的描述。" #. type: Content of: <book><chapter><section><para> msgid "Now you have a series of patches." msgstr "現在你有了一格系列的補丁。" #. type: Content of: <book><chapter><section><orderedlist><listitem><para> msgid "" "Upstream bug fix: <filename>debian/patches/fix-gentoo-target.patch</filename>" msgstr "" "修復上游 Bug:<filename>debian/patches/fix-gentoo-target.patch</filename>" #. type: Content of: <book><chapter><section><orderedlist><listitem><para> msgid "" "Debian specific packaging modification: <filename>debian/patches/install." "patch</filename>" msgstr "" "Debian 特有的打包修改:<filename>debian/patches/install.patch</filename>" #. type: Content of: <book><chapter><section><para> msgid "" "Whenever you make changes that are not specifically related to 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 program revision and be useful to everyone else. Also remember to " "make your fixes not specific to Debian or Linux (or even Unix!) prior to " "sending them -- make them portable. This will make your fixes much easier " "to apply." msgstr "" "進行任何不是 Debian 特有的修改時,比如 <filename>debian/patches/fix-gentoo-" "target.patch</filename>,一定要向上遊作者進行反饋,以便上游作者方便在下一版本" "中以使更多人受益。同時請記住在做不特別針對 Debian 或 Linux (甚至是 Unix!)的" "修改時要使其可以移植,這會使你的修改更容易被接受。" #. type: Content of: <book><chapter><section><para> msgid "" "Note that you don't have to send the <filename>debian/*</filename> files " "upstream." msgstr "注意你不一定要把 <filename>debian/*</filename> 都提交到上游。" #. type: Content of: <book><chapter><section><title> msgid "Differing libraries" msgstr "不一樣的函式庫名稱" #. type: Content of: <book><chapter><section><para> msgid "" "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 which doesn't exist on Debian systems. In " "that case, we need to change it to a library which does exist in Debian, and " "serves the same purpose." msgstr "" "還有另外一個常見的問題:不同平臺之間的函式庫常常是不同的。例如一個 " "<filename>Makefile</filename> 中可能引了用一個不在 Debian 上存在的函式庫。這" "種情況下我們需要將其修改爲 Debian 中存在的、提供完全相同功能的函式庫。" #. type: Content of: <book><chapter><section><para><footnote><para> msgid "" "The author realizes that this is not the best example considering our " "<systemitem role=\"package\">libncurses</systemitem> package now ships with " "a <filename>libcurses.so</filename> symlink, but he couldn't think of a " "better one. Suggestions very welcome :-)" msgstr "" "作者已經意識到這不是一個最好的例子,因爲我們的 <systemitem role=\"package" "\">libncurses</systemitem> 套件現在提供了一個 <filename>libcurses.so</" "filename> 的符號鏈接,但作者還沒有想出更好的例子。非常歡迎提出建議 :-)" #. type: Content of: <book><chapter><section><para> msgid "" "So, if there is a line in your program's <filename>Makefile</filename> (or " "<filename>Makefile.in</filename>) that says something like this (and your " "program doesn't compile) <placeholder type=\"footnote\" id=\"0\"/>:" msgstr "" "如果你手中程式的 <filename>Makefile</filename>(或 <filename>Makefile.in</" "filename>)中有如下的行(且程式無法通過編譯)<placeholder type=\"footnote\" id=" "\"0\"/>:" #. type: Content of: <book><chapter><section><screen> #, no-wrap msgid "LIBS = -lcurses -lsomething -lsomethingelse\n" msgstr "LIBS = -lcurses -lsomething -lsomethingelse\n" #. type: Content of: <book><chapter><section><para> msgid "" "Let's fix this as <filename>debian/patches/ncurse.patch</filename> by " "changing <literal>curses</literal> into <literal>ncurses</literal>." msgstr "" "我們將這個補丁命名爲 <filename>debian/patches/ncurse.patch</filename>,內容是" "把 <literal>curses</literal> 改爲 <literal>ncurses</literal>。" #. type: Content of: <book><chapter><section><screen> #, fuzzy, no-wrap #| msgid "" #| "$ quilt new ncurse.patch\n" #| "$ quilt add Makefile\n" #| "$ sed -i -e s/-lcurses/-lncurses/g Makefile\n" #| "$ quilt refresh\n" #| "$ quilt header -e\n" #| "... describe patch\n" msgid "" "$ dquilt new ncurse.patch\n" "$ dquilt add Makefile\n" "$ sed -i -e s/-lcurses/-lncurses/g Makefile\n" "$ dquilt refresh\n" "$ dquilt header -e\n" "... describe patch\n" msgstr "" "$ quilt new ncurse.patch\n" "$ quilt add Makefile\n" "$ sed -i -e s/-lcurses/-lncurses/g Makefile\n" "$ quilt refresh\n" "$ quilt header -e\n" "... 描述補丁\n" #. type: Content of: <book><chapter><title> msgid "Required files under the <filename>debian</filename> directory" msgstr "<filename>debian</filename> 目錄中的必須內容" #. type: Content of: <book><chapter><para><footnote><para> msgid "" "In this chapter, files in the <filename>debian</filename> directory are " "referred without preceding <filename>debian/</filename> for simplicity " "whenever they are obvious." msgstr "" #. type: Content of: <book><chapter><para> msgid "" "There is a new subdirectory under the program's source directory, it's " "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\"/>" msgstr "" #. type: Content of: <book><chapter><section><title> msgid "<filename>control</filename> file" msgstr "<filename>control</filename> 檔案" #. type: Content of: <book><chapter><section><para> msgid "" "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>." msgstr "" "這個檔案包含了很多供 <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> 中定義。" #. type: Content of: <book><chapter><section><para> msgid "" "Here is the <filename>control</filename> file <command>dh_make</command> " "created for us:" msgstr "" #. type: Content of: <book><chapter><section><screen> #, no-wrap msgid "" " 1 Source: gentoo\n" " 2 Section: unknown\n" " 3 Priority: extra\n" " 4 Maintainer: Josip Rodin <joy-mg@debian.org>\n" " 5 Build-Depends: debhelper (>= 7.0.50~)\n" " 6 Standards-Version: 3.8.4\n" " 7 Homepage: <insert the upstream URL, if relevant>\n" " 8\n" " 9 Package: gentoo\n" "10 Architecture: any\n" "11 Depends: ${shlibs:Depends}, ${misc:Depends}\n" "12 Description: <insert up to 60 chars description>\n" "13 <insert long description, indented with spaces>\n" msgstr "" " 1 Source: gentoo\n" " 2 Section: unknown\n" " 3 Priority: extra\n" " 4 Maintainer: Josip Rodin <joy-mg@debian.org>\n" " 5 Build-Depends: debhelper (>= 7.0.50~)\n" " 6 Standards-Version: 3.8.4\n" " 7 Homepage: <insert the upstream URL, if relevant>\n" " 8\n" " 9 Package: gentoo\n" "10 Architecture: any\n" "11 Depends: ${shlibs:Depends}, ${misc:Depends}\n" "12 Description: <insert up to 60 chars description>\n" "13 <insert long description, indented with spaces>\n" #. type: Content of: <book><chapter><section><para> msgid "(I've added the line numbers.)" msgstr "(注:我爲它添加了行號。)" #. type: Content of: <book><chapter><section><para> #, fuzzy #| msgid "Lines 1-6 are the control information for the source package." msgid "" "Lines 1-7 are the control information for the source package. Lines 9-13 " "are the control information for the binary package." msgstr "第 1-6 行是原始碼套件的控制訊息。" #. type: Content of: <book><chapter><section><para> msgid "Line 1 is the name of the source package." msgstr "第 1 行是原始碼套件的名稱。" #. type: Content of: <book><chapter><section><para> msgid "Line 2 is the section of the distribution the source package goes into." msgstr "第 2 行是該源碼包要進入發行版中的分類。" #. type: Content of: <book><chapter><section><para><footnote><para> msgid "" "See <ulink url=\"&policy-subsections;\">Debian Policy Manual, 2.4 " "'Sections'</ulink> and <ulink url=\"§ions-unstable;\">List of sections " "in <literal>sid</literal></ulink>." msgstr "" #. type: Content of: <book><chapter><section><para> #, fuzzy #| msgid "" #| "As you may have noticed, Debian archive is divided in sections: " #| "<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). Under those, there are " #| "logical subsections that describe in short what packages are in. So we " #| "have <literal>admin</literal> for administrator-only programs, " #| "<literal>base</literal> for the basic tools, <literal>devel</literal> for " #| "programmer tools, <literal>doc</literal> for documentation, " #| "<literal>libs</literal> for libraries, <literal>mail</literal> for e-mail " #| "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. See the <ulink url=\"&policy-subsections;\">Debian Policy " #| "Manual, 2.4 'Sections'</ulink> and <ulink url=\"§ions-unstable;" #| "\">List of sections in 'sid'</ulink> for the guidance." msgid "" "As you may have noticed, Debian archive is divided in sections: " "<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). Under those, there are logical " "subsections that describe in short what packages are in. So we have " "<literal>admin</literal> for administrator-only programs, <literal>base</" "literal> for the basic tools, <literal>devel</literal> for programmer tools, " "<literal>doc</literal> for documentation, <literal>libs</literal> for " "libraries, <literal>mail</literal> for e-mail 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\"/>" msgstr "" "你可能已經注意到,Debian 倉庫被分爲幾個類別:<literal>main</literal> (自由軟" "體)、<literal>non-free</literal> (非自由軟體)以及 <literal>contrib</literal> " "(依賴於非自由軟體的自由軟體)。在這些大的分類之下還有多個邏輯上的子分類,用以" "簡短描述套件的用途類別。<literal>admin</literal> 爲僅供系統管理員使用的程式," "<literal>base</literal> 爲基本工具,<literal>devel</literal> 爲開發工具," "<literal>doc</literal> 爲文件,<literal>libs</literal> 爲函式庫," "<literal>mail</literal> 爲電子郵件閱讀器或郵件系統守護程式,<literal>net</" "literal> 爲網絡應用程式或網絡服務守護進程,<literal>x11</literal> 爲不屬於其" "他分類的爲 X11 程式。更多的子分類見 <ulink url=\"&policy-subsections;" "\">Debian Policy Manual, 2.4 'Sections'</ulink> 和 <ulink url=\"§ions-" "unstable;\">List of sections in 'sid'</ulink>" #. type: Content of: <book><chapter><section><para> msgid "" "Let's change it then to x11. (A <literal>main/</literal> prefix is implied " "so we can omit it.)" msgstr "" "我們將本例設置爲 x11。( <literal>main/</literal> 前綴是默認值,可以省略。)" #. type: Content of: <book><chapter><section><para><footnote><para> #, fuzzy #| msgid "" #| "Line 3 describes how important it is that the user installs this " #| "package. See the <ulink url=\"&policy-priorities;\">Debian Policy " #| "Manual, 2.5 'Priorities'</ulink> for the guidance." msgid "" "See <ulink url=\"&policy-priorities;\">Debian Policy Manual, 2.5 " "'Priorities'</ulink>." msgstr "" "第 3 行描述了用戶安裝此套件的優先級。具體說明參考 <ulink url=\"&policy-" "priorities;\">Debian Policy Manual, 2.5 'Priorities'</ulink>" #. type: Content of: <book><chapter><section><para> #, fuzzy #| msgid "" #| "Line 3 describes how important it is that the user installs this " #| "package. See the <ulink url=\"&policy-priorities;\">Debian Policy " #| "Manual, 2.5 'Priorities'</ulink> for the guidance." msgid "" "Line 3 describes how important it is that the user installs this package. " "<placeholder type=\"footnote\" id=\"0\"/>" msgstr "" "第 3 行描述了用戶安裝此套件的優先級。具體說明參考 <ulink url=\"&policy-" "priorities;\">Debian Policy Manual, 2.5 'Priorities'</ulink>" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "The <literal>optional</literal> priority will usually work for new packages " "that do not conflict with others with <literal>required</literal>, " "<literal>important</literal> or <literal>standard</literal> priorities." msgstr "" "<literal>optional</literal> 優先級適用於不與優先級爲 <literal>required</" "literal>、<literal>important</literal> 或 <literal>standard</literal> 的套件" "衝突的新套件。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "The <literal>extra</literal> priority will usually work for new packages " "that conflict with others with non-<literal>extra</literal> priorities." msgstr "" "<literal>extra</literal> 優先級適用於與其他非 <literal>extra</literal> 優先級" "套件衝突的新套件。" #. type: Content of: <book><chapter><section><para> msgid "" "Section and priority are used by the frontends 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." msgstr "" "Section 和 Priority 常被如 <command>aptitude</command> 的前端所使用,以分類套" "件並計算默認值。一旦你把套件上傳到 Debian,這兩項的值可以被倉庫維護人員修改," "在被修改時你將收到郵件。" #. type: Content of: <book><chapter><section><para> msgid "" "As this is a normal priority package and doesn't conflict with anything " "else, we will change the priority to <literal>optional</literal>." msgstr "" "由於這是一個常規優先級的軟體,並不與其他套件衝突,我們將優先級改爲 " "<literal>optional</literal>。" #. type: Content of: <book><chapter><section><para> msgid "" "Line 4 is the name and email address of the maintainer. Make sure that this " "field includes a valid <literal>To</literal> header for an email, because " "after you upload it, the bug tracking system will use it to deliver bug " "emails to you. Avoid using commas, ampersands and parenthesis." msgstr "" "第 4 行是維護者的姓名和電子郵件地址。請確保此處的值可以直接用於電子郵件頭的 " "<literal>To</literal> 項。因爲一旦你將套件上傳至倉庫,Bug 跟蹤系統將使用其向" "你發送可能的 Bug 報告郵件。避免使用逗號、“&”符號或括號。" #. type: Content of: <book><chapter><section><para><footnote><para> msgid "" "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>." msgstr "" #. type: Content of: <book><chapter><section><para> #, fuzzy #| msgid "" #| "The 5th line 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. (see the <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>). 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 " #| "dependencies to find out more about the syntax of these lines." msgid "" "The 5th line 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 " "dependencies to find out more about the syntax of these lines." msgstr "" "第 5 行中的 <literal>Build-Depends</literal> 項列出了編譯此套件需要的套件。一" "些情況下你還需要這裏添加一行 <literal>Build-Depends-Indep</literal> (參考 " "<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>)。<systemitem role=\"package\">build-essential</systemitem> 依賴的套" "件,如 <systemitem role=\"package\">gcc</systemitem> 和 <systemitem role=" "\"package\">make</systemitem> 等,已經默認安裝而不需再寫到此處。如果你需要其" "他工具來編譯這個套件,請將它們加到這裏。多個套件應使用半形逗號分隔,繼續閱讀" "二進位套件依賴關係以增進對這些行的語法的理解。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "For all packages packaged with the <command>dh</command> command in the " "<filename>debian/rules</filename> file, you must have <literal>debhelper " "(>=7.0.50~)</literal> in the <literal>Build-Depends</literal> field to " "satisfy the Debian Policy requirement for the <literal>clean</literal> " "target." msgstr "" "對於所有在 <filename>debian/rules</filename> 檔案中使用 <command>dh</" "command> 命令的套件,必須在 <literal>Build-Depends</literal> 中包含 " "<literal>debhelper (>=7.0.50~)</literal> 以滿足 Debian Policy 中對 " "<literal>clean</literal> target 的要求。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "For source packages which have some binary packages with " "<literal>Architecture: any</literal>, they are rebuild by the autobuilder. " "Since this autobuilder procedure runs <literal>debian/rules build</literal> " "in it while installing only packages listed in the <literal>Build-Depends</" "literal> field (see <xref linkend=\"autobuilder\"/>), the <literal>Build-" "Depends</literal> field needs to list practically all the required packages " "and the <literal>Build-Depends-indep</literal> is rarely used." msgstr "" "對於生成一些標有 <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> 則很少使用。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "For source packages which have binary packages only with " "<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." msgstr "" "對於僅有 <literal>Architecture: all</literal> 的套件,<literal>Build-Depends-" "Indep</literal> 中應列出 <literal>Build-Depends</literal> 中未列出的所有需要" "的套件,以便滿足 Debian Policy 中對 <literal>clean</literal> target 的要求。" #. type: Content of: <book><chapter><section><para><footnote><para> msgid "" "This somewhat strange situation is a feature well documented in the <ulink " "url=\"&policy-build-depends-indep;\">Debian Policy Manual, Footnotes 48</" "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>." msgstr "" "這種奇怪的情況是 <ulink url=\"&policy-build-depends-indep;\">Debian Policy " "Manual, Footnotes 48</ulink> 中詳細描述的一種特性。這不是由於在 " "<filename>debian/rules</filename> 中使用 <command>dh</command> 命令所致的,真" "正的原因是 <command>dpkg-buildpackage</command> 如何運行。相同的情形也適用於 " "<ulink url=\"https://bugs.launchpad.net/launchpad-buildd/" "+bug/238141\">Ubuntu 的自動編譯系統</ulink>。" #. type: Content of: <book><chapter><section><para> msgid "" "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\"/>" msgstr "" "如果你不知道應該使用哪一個,則使用 <literal>Build-Depends</literal> 以保證安" "全。<placeholder type=\"footnote\" id=\"0\"/>" #. type: Content of: <book><chapter><section><para> msgid "" "To find out what packages your package needs to be built run the command:" msgstr "要找出編譯你的軟體所需的套件可以使用這個命令:" #. type: Content of: <book><chapter><section><screen> #, no-wrap msgid "$ dpkg-depcheck -d ./configure\n" msgstr "$ dpkg-depcheck -d ./configure\n" #. type: Content of: <book><chapter><section><para> msgid "" "To manually find exact build dependency for <command><replaceable>/usr/bin/" "foo</replaceable></command>, you execute" msgstr "" "要手工地找到 <command><replaceable>/usr/bin/foo</replaceable></command> 的編" "譯依賴,可以執行:" #. type: Content of: <book><chapter><section><screen> #, no-wrap msgid "$ objdump -p <replaceable>/usr/bin/foo</replaceable> | grep NEEDED\n" msgstr "$ objdump -p <replaceable>/usr/bin/foo</replaceable> | grep NEEDED\n" #. type: Content of: <book><chapter><section><para> msgid "" "and for each library listed, e.g., <command>libfoo.so.6</command>, execute" msgstr "對於列出的每個函式庫,例如 <command>libfoo.so.6</command>,運行:" #. type: Content of: <book><chapter><section><screen> #, no-wrap msgid "$ dpkg -S libfoo.so.6\n" msgstr "$ dpkg -S libfoo.so.6\n" #. type: Content of: <book><chapter><section><para> msgid "" "Then you just take <literal>-dev</literal> version of every package as " "<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." msgstr "" "接下來直接將相應的 <literal>-dev</literal> 套件的名稱放到 <literal>Build-" "Depends</literal> 項內。如果你使用 <command>ldd</command>,它也會報告出間接的" "函式庫依賴關係,這可能造成填寫了某些不必要的依賴。" #. type: Content of: <book><chapter><section><para> msgid "" "<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>." msgstr "" "<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> 之後。" #. type: Content of: <book><chapter><section><para> msgid "" "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." msgstr "" "第 6 行是此套件所依據的 <ulink url=\"&debian-policy;\">Debian Policy Manual</" "ulink> 標準版本號。" #. type: Content of: <book><chapter><section><para> msgid "On line 7 you can put the URL of the homepage for the upstream program." msgstr "在第 7 行你可以放置上游項目的首頁地址。" #. type: Content of: <book><chapter><section><para> msgid "" "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." msgstr "第 9 行是二進位套件的名稱。通常情況下與原始碼套件相同,但不是必須的。" #. type: Content of: <book><chapter><section><para> msgid "" "Line 10 describes the CPU architecture the binary package can be compiled " "for. We'll leave this as <literal>any</literal> because <citerefentry> " "<refentrytitle>dpkg-gencontrol</refentrytitle> <manvolnum>1</manvolnum> </" "citerefentry> will fill in the appropriate value for any machine this " "package gets compiled on." msgstr "" "第 10 行描述了這個套件可以在哪些 CPU 構架上編譯。我們將保持它爲 " "<literal>any</literal>,因爲 <citerefentry> <refentrytitle>dpkg-gencontrol</" "refentrytitle> <manvolnum>1</manvolnum> </citerefentry> 將在這個套件可以編譯" "的平臺上爲此處填寫合適的訊息。" #. type: Content of: <book><chapter><section><para> msgid "" "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." msgstr "" "如果你的套件是平臺獨立的(例如一個 shell 或 Perl 腳本,或一些文件),將這項改變" "爲 <literal>all</literal>,然後繼續閱讀 <xref linkend=\"rules\"/> 中關於使用 " "<literal>binary-indep</literal> 指令替代 <literal>binary-arch</literal> 來編" "譯套件的內容。" #. type: Content of: <book><chapter><section><para> msgid "" "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>." msgstr "" "第 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>。" #. type: Content of: <book><chapter><section><para> msgid "" "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.)" msgstr "" "套件管理工具通常對這些關係採取相同的操作,如果不是,我將會詳細解釋。(參考 " "<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> 等。)" #. type: Content of: <book><chapter><section><para><footnote><para> msgid "" "See <ulink url=\"&policy-relationships;\">Debian Policy Manual, 7 'Declaring " "relationships between packages'</ulink>." msgstr "" #. type: Content of: <book><chapter><section><para> #, fuzzy #| msgid "" #| "The <literal>dh $@</literal> command can be customized as follows. " #| "<placeholder type=\"footnote\" id=\"0\"/>" msgid "" "Here is a simplified description of package relationships. <placeholder " "type=\"footnote\" id=\"0\"/>" msgstr "" "<literal>dh $@</literal> 命令可以按以下方式定製。<placeholder type=\"footnote" "\" id=\"0\"/>" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "<literal>Depends</literal>" msgstr "<literal>Depends</literal>" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "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." msgstr "" "此套件僅當它依賴的套件均已安裝後纔可以安裝。此處寫明你的程式所必須的套件。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "<literal>Recommends</literal>" msgstr "<literal>Recommends</literal>" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "Use this for packages that are not strictly necessary but are typically used " "with your program. When a user installs your program, all frontends will " "likely prompt them to install the recommended packages. <command>aptitude</" "command> and <command>apt-get</command> install recommended packages along " "with your package (but the user can disable this default behaviour). " "<command>dpkg</command> will ignore this field." msgstr "" "這項中的套件不是嚴格意義上必須安裝纔可以保證程式運行。當用戶安裝套件時,所有" "前端工具都會詢問是否要安裝這些推薦的套件。<command>aptitude</command> 和 " "<command>apt-get</command> 會在安裝你的套件的時候自動安裝推薦的套件(用戶可以" "禁用這個默認行爲)。<command>dpkg</command> 則會忽略此項。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "<literal>Suggests</literal>" msgstr "<literal>Suggests</literal>" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "Use this for packages which will work nicely with your program but are not " "at all necessary. When a user installs your program, all frontends will " "likely prompt them to install the 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." msgstr "" "此項中的套件可以使你的程式更好地工作,但不是一定需要的。當用戶安裝程式時,所" "有的前端程式將詢問是否安裝建議的套件。<command>aptitude</command> 可以被設定" "爲安裝軟體時自動安裝建議的套件。<command>dpkg</command> 和 <command>apt-get</" "command> 將忽略此項。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "<literal>Pre-Depends</literal>" msgstr "<literal>Pre-Depends</literal>" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "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. :-)" msgstr "" "此項中的依賴強於 <literal>Depends</literal> 項。套件僅在預依賴的套件已經安裝" "後纔可以正常安裝並且 <emphasis>正確設定</emphasis> 後纔可以正常安裝。在使用此" "項時應 <emphasis>非常慎重</emphasis>,僅當在 <ulink url=\"&debian-devel-ldo;" "\">debian-devel@lists.debian.org</ulink> 郵件列表討論後才能使用。記住:根本就" "不要用這項。 :-)" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "<literal>Conflicts</literal>" msgstr "<literal>Conflicts</literal>" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "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." msgstr "" "僅當所有衝突的套件都已經刪除後此套件纔可以安裝。當程式在某些特定套件存在時根" "本無法運行或存在嚴重問題時使用此項。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "<literal>Breaks</literal>" msgstr "<literal>Breaks</literal>" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "The package will be installed while all the listed packages will be broken. " "Normally a <literal>Breaks</literal> entry has an earlier than version " "clause. The resolution is generally to upgrade the listed packages by the " "higher-level package management tools." msgstr "" "此套件安裝後列出的套件將會受到損壞。通常 <literal>Breaks</literal> 要附帶一" "個“版本號小於多少”的說明。這樣,套件管理工具將會選擇升級被損壞的特定版本的套" "件。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "<literal>Provides</literal>" msgstr "<literal>Provides</literal>" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> #, fuzzy #| msgid "" #| "For some types of packages where there are multiple alternatives virtual " #| "names have been defined. You can get the full list in the <filename>/usr/" #| "share/doc/debian-policy/virtual-package-names-list.txt.gz</filename> " #| "file. Use this if your program provides a function of an existing " #| "virtual package." msgid "" "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." msgstr "" "某些類型的套件會定義有多個可選的虛擬名稱。你可以在 <filename>/usr/share/doc/" "debian-policy/virtual-package-names-list.txt.gz</filename> 檔案中找到完整的列" "表。如果你的程式提供了某個已存在的虛擬套件的功能則使用此項。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "<literal>Replaces</literal>" msgstr "<literal>Replaces</literal>" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "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." msgstr "" "當你的程式要替換其他套件的某些檔案,或是完整地替換另一個套件(與 " "<literal>Conflicts</literal> 一起使用)。列出的套件中的某些檔案會被你的套件所" "覆蓋。" #. type: Content of: <book><chapter><section><para> msgid "" "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)." msgstr "" "所有的這些項都使用相同的語法。它們是一個套件列表,套件名稱間使用半形逗號分" "隔。也可以寫出有多個可選的套件名稱,這些套件使用 <literal>|</literal> 符號分" "隔。" #. type: Content of: <book><chapter><section><para> msgid "" "The fields may restrict their applicability to particular versions of each " "named package. These versions are listed in parentheses after each " "individual package name, and they should contain a relation from the list " "below followed by the version number. The relations allowed are: " "<literal><<</literal>, <literal><=</literal>, <literal>=</literal>, " "<literal>>=</literal> and <literal>>></literal> for strictly lower, " "lower or equal, exactly equal, greater or equal and strictly greater, " "respectively. For example," msgstr "" "這些項內還可以指定某些套件的版本號之間的關係。版本號在括號內,緊隨套件名稱之" "後,並在以下邏輯符號後寫清具體版本:<literal><<</literal>、" "<literal><=</literal>、<literal>=</literal>、<literal>>=</literal> 和 " "<literal>>></literal>,分別代表嚴格小於、小於或等於、嚴格等於、大於或等" "於以及嚴格大於。例如:" #. type: Content of: <book><chapter><section><screen> #, no-wrap msgid "" "Depends: foo (>= 1.2), libbar1 (= 1.3.4)\n" "Conflicts: baz\n" "Recommends: libbaz4 (>> 4.0.7)\n" "Suggests: quux\n" "Replaces: quux (<< 5), quux-foo (<= 7.6)\n" msgstr "" "Depends: foo (>= 1.2), libbar1 (= 1.3.4)\n" "Conflicts: baz\n" "Recommends: libbaz4 (>> 4.0.7)\n" "Suggests: quux\n" "Replaces: quux (<< 5), quux-foo (<= 7.6)\n" #. type: Content of: <book><chapter><section><para> msgid "" "The last feature you need to know about is <literal>${shlibs:Depends}</" "literal>, <literal>${perl:Depends}</literal>, <literal>${misc:Depends}</" "literal>, etc." msgstr "" #. type: Content of: <book><chapter><section><para> #, fuzzy #| msgid "" #| "<citerefentry> <refentrytitle>dh_shlibdeps</refentrytitle> <manvolnum>1</" #| "manvolnum> </citerefentry> will scan it for binaries and libraries " #| "determine their shared library dependencies and detect which packages " #| "they are in, such as <systemitem role=\"package\">libc6</systemitem> or " #| "<systemitem role=\"package\">xlib6g</systemitem>, after your package has " #| "been built and installed into the temporary directory. This list of " #| "shared library dependencies is used for <literal>${shlibs:Depends}</" #| "literal>." msgid "" "<citerefentry> <refentrytitle>dh_shlibdeps</refentrytitle> <manvolnum>1</" "manvolnum> </citerefentry> calculates shared library dependencies for binary " "packages. It generates a list of ELF executables and shared libraries it " "has found for each binary package. Such list is used for substituting " "<literal>${shlibs:Depends}</literal>." msgstr "" "<citerefentry> <refentrytitle>dh_shlibdeps</refentrytitle> <manvolnum>1</" "manvolnum> </citerefentry> 會在程式編譯完成並被放入臨時檔案夾後掃描二進位檔案" "和函式庫檔案來確定動態函式庫的依賴關係,並檢測包含它們的套件名稱。例如 " "<systemitem role=\"package\">libc6</systemitem> 或 <systemitem role=\"package" "\">xlib6g</systemitem>。 這些套件將被列在 <literal>${shlibs:Depends}</" "literal> 的位置。" #. type: Content of: <book><chapter><section><para> #, fuzzy #| msgid "" #| "The package list generated by the <citerefentry> <refentrytitle>dh_perl</" #| "refentrytitle> <manvolnum>1</manvolnum> </citerefentry> is used for " #| "<literal>${perl:Depends}</literal>." msgid "" "<citerefentry> <refentrytitle>dh_perl</refentrytitle> <manvolnum>1</" "manvolnum> </citerefentry> calculates Perl dependencies. It generates a " "list of a dependency on <literal>perl</literal> or <literal>perlapi</" "literal> for each binary package. Such list is used for substituting " "<literal>${perl:Depends}</literal>." msgstr "" "<citerefentry> <refentrytitle>dh_perl</refentrytitle> <manvolnum>1</" "manvolnum> </citerefentry> 所生成的套件列表將用於 <literal>${perl:Depends}</" "literal> 的位置。" #. type: Content of: <book><chapter><section><para> #, fuzzy #| msgid "" #| "Some <systemitem role=\"package\">debhelper</systemitem> commands may " #| "make the generated package need to depend on some other packages. This " #| "list of required packages is used for <literal>${misc:Depends}</literal>." msgid "" "Some <systemitem role=\"package\">debhelper</systemitem> commands may make " "the generated package need to depend on some other packages. All such " "commands generate a list of required packages for each binary package. Such " "list is used for substituting <literal>${misc:Depends}</literal>." msgstr "" "一些 <systemitem role=\"package\">debhelper</systemitem> 命令可能會使生成的套" "件需要依賴於某些其他套件,這些套件將被列於 <literal>${misc:Depends}</" "literal> 的位置。" #. type: Content of: <book><chapter><section><para> #, fuzzy #| msgid "" #| "The package list generated by the <citerefentry> <refentrytitle>dh_perl</" #| "refentrytitle> <manvolnum>1</manvolnum> </citerefentry> is used for " #| "<literal>${perl:Depends}</literal>." msgid "" "<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." msgstr "" "<citerefentry> <refentrytitle>dh_perl</refentrytitle> <manvolnum>1</" "manvolnum> </citerefentry> 所生成的套件列表將用於 <literal>${perl:Depends}</" "literal> 的位置。" #. type: Content of: <book><chapter><section><para> msgid "" "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 that <systemitem " "role=\"package\">file</systemitem> package." msgstr "" "說過這些以後,我們可以把 <literal>Depends</literal> 項保持現狀不動,並在其下" "插入一行 <literal>Suggests: file</literal>,因爲 <systemitem role=\"package" "\">gentoo</systemitem> 可以使用 <systemitem role=\"package\">file</" "systemitem> 套件提供的某些特性。" #. type: Content of: <book><chapter><section><para> msgid "" "Line 9 is the Homepage URL. Let's assume this to be at <ulink url=\"&gentoo;" "\"/>." msgstr "" #. type: Content of: <book><chapter><section><para> msgid "" "Line 12 is the short description. Most people screens are 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>." msgstr "" "第 12 行是短描述。絕大多數人的螢幕是 80 列寬,所以描述不應超過 60 個字符。在" "這個例子裏我把它寫爲 <literal>fully GUI-configurable, two-pane X file " "manager</literal>。" #. type: Content of: <book><chapter><section><para><footnote><para> msgid "" "These descriptions are in English. Translations of these descriptions are " "provided by <ulink url=\"&ddtp;\">The Debian Description Translation Project " "- DDTP</ulink>." msgstr "" #. type: Content of: <book><chapter><section><para> #, fuzzy #| msgid "" #| "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." msgid "" "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\"/>" msgstr "" "第 13 行是長描述開始的地方。這應當是一段更詳細地描述套件的話。每行的第一個格" "應當留空。描述中不應存在空行,如果必須使用空行,則在行中僅放置一個 <literal>." "</literal> (半形句點)。同時,長描述後也不應有超過一行的空白。" #. type: Content of: <book><chapter><section><para><footnote><para> #, fuzzy #| msgid "" #| "For more help about these, check in <ulink url=\"&developers-reference;" #| "\">Debian Developer's Reference</ulink>." msgid "" "See <ulink url=\"&devref-bpp-vcs;\">Developer's Reference, 6.2.5. 'Version " "Control System location'</ulink>." msgstr "" "關於這些問題的更多幫助,査看 <ulink url=\"&developers-reference;\">Debian " "Developer's Reference</ulink>。" #. type: Content of: <book><chapter><section><para> #, fuzzy #| msgid "" #| "Let's insert <literal>Vcs-*</literal> fields documented in <ulink url=" #| "\"&devref-bpp-vcs;\">Developer's Reference, 6.2.5. 'Version Control " #| "System location'</ulink> between line 6 and 7. Let's assume that the " #| "<systemitem role=\"package\">gentoo</systemitem> package is located in " #| "Debian Alioth Git Service at <literal>git://git.debian.org/git/collab-" #| "maint/gentoo.git</literal>." msgid "" "Let's insert <literal>Vcs-*</literal> fields to document the Version Control " "System (VCS) location between line 6 and 7. <placeholder type=\"footnote\" " "id=\"0\"/> Let's assume that the <systemitem role=\"package\">gentoo</" "systemitem> package has its VCS located in Debian Alioth Git Service at " "<literal>git://git.debian.org/git/collab-maint/gentoo.git</literal>." msgstr "" "接下來我們按照 <ulink url=\"&devref-bpp-vcs;\">Developer's Reference, " "6.2.5. 'Version Control System location'</ulink> 中記敘的內容在第 6 和第 7 " "行之間添加 <literal>Vcs-*</literal> 項。這裏我們假設 <systemitem role=" "\"package\">gentoo</systemitem> 套件處於 Debian Alioth Git 服務的 " "<literal>git://git.debian.org/git/collab-maint/gentoo.git</literal>" #. type: Content of: <book><chapter><section><para> msgid "Finally, here is the updated <filename>control</filename> file:" msgstr "到此爲止,我們做好了 <filename>control</filename> 檔案:" #. type: Content of: <book><chapter><section><screen> #, no-wrap msgid "" " 1 Source: gentoo\n" " 2 Section: x11\n" " 3 Priority: optional\n" " 4 Maintainer: Josip Rodin <joy-mg@debian.org>\n" " 5 Build-Depends: debhelper (>= 7.0.5), xlibs-dev, libgtk1.2-dev, libglib1.2-dev\n" " 6 Standards-Version: 3.8.4\n" " 7 Vcs-Git: git://git.debian.org/git/collab-maint/gentoo.git\n" " 8 Vcs-browser: http://git.debian.org/?p=collab-maint/gentoo.git\n" " 9 Homepage: &gentoo;\n" "10\n" "11 Package: gentoo\n" "12 Architecture: any\n" "13 Depends: ${shlibs:Depends}, ${misc:Depends}\n" "14 Suggests: file\n" "15 Description: fully GUI-configurable, two-pane X file manager\n" "16 gentoo is a two-pane file manager for the X Window System. gentoo lets the\n" "17 user do (almost) all of the configuration and customizing from within the\n" "18 program itself. If you still prefer to hand-edit configuration files,\n" "19 they're fairly easy to work with since they are written in an XML format.\n" "20 .\n" "21 gentoo features a fairly complex and powerful file identification system,\n" "22 coupled to a object-oriented style system, which together give you a lot\n" "23 of control over how files of different types are displayed and acted upon.\n" "24 Additionally, over a hundred pixmap images are available for use in file\n" "25 type descriptions.\n" "26 .\n" "29 gentoo was written from scratch in ANSI C, and it utilises the GTK+ toolkit\n" "30 for its interface.\n" msgstr "" " 1 Source: gentoo\n" " 2 Section: x11\n" " 3 Priority: optional\n" " 4 Maintainer: Josip Rodin <joy-mg@debian.org>\n" " 5 Build-Depends: debhelper (>= 7.0.5), xlibs-dev, libgtk1.2-dev, libglib1.2-dev\n" " 6 Standards-Version: 3.8.4\n" " 7 Vcs-Git: git://git.debian.org/git/collab-maint/gentoo.git\n" " 8 Vcs-browser: http://git.debian.org/?p=collab-maint/gentoo.git\n" " 9 Homepage: &gentoo;\n" "10\n" "11 Package: gentoo\n" "12 Architecture: any\n" "13 Depends: ${shlibs:Depends}, ${misc:Depends}\n" "14 Suggests: file\n" "15 Description: fully GUI-configurable, two-pane X file manager\n" "16 gentoo is a two-pane file manager for the X Window System. gentoo lets the\n" "17 user do (almost) all of the configuration and customizing from within the\n" "18 program itself. If you still prefer to hand-edit configuration files,\n" "19 they're fairly easy to work with since they are written in an XML format.\n" "20 .\n" "21 gentoo features a fairly complex and powerful file identification system,\n" "22 coupled to a object-oriented style system, which together give you a lot\n" "23 of control over how files of different types are displayed and acted upon.\n" "24 Additionally, over a hundred pixmap images are available for use in file\n" "25 type descriptions.\n" "26 .\n" "29 gentoo was written from scratch in ANSI C, and it utilises the GTK+ toolkit\n" "30 for its interface.\n" #. type: Content of: <book><chapter><section><title> msgid "<filename>copyright</filename> file" msgstr "<filename>copyright</filename> 檔案" #. type: Content of: <book><chapter><section><para> #, fuzzy #| msgid "" #| "This file contains the information about package upstream resources, " #| "copyright and license information. Its format is not dictated by the " #| "Debian Policy Manual, but the content is (<ulink url=\"&policy-copyright;" #| "\">Debian Policy Manual, 12.5 'Copyright information'</ulink>). You may " #| "also consult <ulink url=\"&dep5;\">DEP-5: Machine-parseable debian/" #| "copyright</ulink>." msgid "" "This file contains the information about package upstream resources, " "copyright and license information. <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." msgstr "" "這個檔案包含了上游軟體的資源、版權以及許可證訊息。它的形式沒有在 Debian " "Policy 中詳述,但其內容爲 (<ulink url=\"&policy-copyright;\">Debian Policy " "Manual, 12.5 'Copyright information'</ulink>)。你還可以査看 <ulink url=" "\"&dep5;\">DEP-5: Machine-parseable debian/copyright</ulink>。" #. type: Content of: <book><chapter><section><para> msgid "" "<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." msgstr "" "<command>dh_make</command> 可以給出一個 <filename>copyright</filename> 檔案的" "模板。在這裏我們使用 <literal>--copyright gpl2</literal> 參數來獲得一個模板寫" "明 <systemitem role=\"package\">gentoo</systemitem> 套件是發佈於 GPL-2 許可證" "下。" #. type: Content of: <book><chapter><section><para> msgid "" "You must fill in missing information such as the place you got the package " "from, the actual copyright notice and their license to complete this file. " "For the common free software licenses such as 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 or the " "Artistic license, you can just refer to the appropriate file in <filename>/" "usr/share/common-licenses/</filename> directory that exists on every Debian " "system. Otherwise, you must include the complete license." msgstr "" "你必須填寫上其餘的訊息,如你從何處獲得此軟體,實際的版權聲明和它們的許可證。" "對於常見的自由軟體許可證,如 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 或 Artistic 許可證,你" "可以直接將其指向存在於所有 Debian 系統的 <filename>/usr/share/common-" "licenses/</filename> 目錄下的相關檔案。其他的許可證則必須包含完整的許可證文" "本。" #. type: Content of: <book><chapter><section><para> msgid "" "In short, here's how <systemitem role=\"package\">gentoo</systemitem>'s " "<filename>copyright</filename> file should look like:" msgstr "" "簡言之,<systemitem role=\"package\">gentoo</systemitem> 的 " "<filename>copyright</filename> 檔案如下所示:" #. type: Content of: <book><chapter><section><screen> #, no-wrap msgid "" " 1 Format-Specification: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=135\n" " 2 Name: gentoo\n" " 3 Maintainer: Josip Rodin <joy-mg@debian.org>\n" " 4 Source: http://sourceforge.net/projects/gentoo/files/\n" " 5\n" " 6 Copyright: 1998-2010 Emil Brink <emil@obsession.se>\n" " 7 License: GPL-2+\n" " 8\n" " 9 Files: icons/*\n" "10 Copyright: 1998 Johan Hanson <johan@tiq.com>\n" "11 License: GPL-2+\n" "12\n" "13 Files: debian/*\n" "14 Copyright: 1998-2010 Josip Rodin <joy-mg@debian.org>\n" "15 License: GPL-2+\n" "16\n" "17 License: GPL-2+\n" "18 This program is free software; you can redistribute it and/or modify\n" "19 it under the terms of the GNU General Public License as published by\n" "20 the Free Software Foundation; either version 2 of the License, or\n" "21 (at your option) any later version. \n" "22 .\n" "23 This program is distributed in the hope that it will be useful,\n" "24 but WITHOUT ANY WARRANTY; without even the implied warranty of\n" "25 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" "26 GNU General Public License for more details.\n" "27 .\n" "28 You should have received a copy of the GNU General Public License along\n" "29 with this program; if not, write to the Free Software Foundation, Inc.,\n" "30 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\n" "31 .\n" "32 On Debian systems, the full text of the GNU General Public\n" "33 License version 2 can be found in the file\n" "34 `/usr/share/common-licenses/GPL-2'.\n" msgstr "" " 1 Format-Specification: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=135\n" " 2 Name: gentoo\n" " 3 Maintainer: Josip Rodin <joy-mg@debian.org>\n" " 4 Source: http://sourceforge.net/projects/gentoo/files/\n" " 5\n" " 6 Copyright: 1998-2010 Emil Brink <emil@obsession.se>\n" " 7 License: GPL-2+\n" " 8\n" " 9 Files: icons/*\n" "10 Copyright: 1998 Johan Hanson <johan@tiq.com>\n" "11 License: GPL-2+\n" "12\n" "13 Files: debian/*\n" "14 Copyright: 1998-2010 Josip Rodin <joy-mg@debian.org>\n" "15 License: GPL-2+\n" "16\n" "17 License: GPL-2+\n" "18 This program is free software; you can redistribute it and/or modify\n" "19 it under the terms of the GNU General Public License as published by\n" "20 the Free Software Foundation; either version 2 of the License, or\n" "21 (at your option) any later version. \n" "22 .\n" "23 This program is distributed in the hope that it will be useful,\n" "24 but WITHOUT ANY WARRANTY; without even the implied warranty of\n" "25 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" "26 GNU General Public License for more details.\n" "27 .\n" "28 You should have received a copy of the GNU General Public License along\n" "29 with this program; if not, write to the Free Software Foundation, Inc.,\n" "30 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\n" "31 .\n" "32 On Debian systems, the full text of the GNU General Public\n" "33 License version 2 can be found in the file\n" "34 `/usr/share/common-licenses/GPL-2'.\n" #. type: Content of: <book><chapter><section><para> #, fuzzy #| msgid "" #| "Please follow the HOWTO provided by ftpmasters and sent to debian-devel-" #| "announce: <ulink url=\"&debian-devel-announce-ldo;2006/03/msg00023.html" #| "\">&debian-devel-announce-ldo;2006/03/msg00023.html</ulink>." msgid "" "Please follow the HOWTO provided by ftpmasters and sent to debian-devel-" "announce: <ulink url=\"&howto-copyright;\"/>." msgstr "" "另外還可以參考 ftpmasters 發送到 debian-devel-announce 的 HOWTO: <ulink url=" "\"&debian-devel-announce-ldo;2006/03/msg00023.html\">&debian-devel-announce-" "ldo;2006/03/msg00023.html</ulink>" #. type: Content of: <book><chapter><section><title> msgid "<filename>changelog</filename> file" msgstr "<filename>changelog</filename> 檔案" #. type: Content of: <book><chapter><section><para> msgid "" "This is a required file, which has a special format described in the <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." msgstr "" "這是一個必須的檔案,它的格式在 <ulink url=\"&policy-dpkgchangelog;\">Debian " "Policy Manual, 4.4 'debian/changelog'</ulink> 中有詳細的描述。這種格式被 " "<command>dpkg</command> 和其他程式用以獲得版本號訊息、適應的發行版和緊急程" "度。" #. type: Content of: <book><chapter><section><para> msgid "" "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." msgstr "" "對於你而言,詳細描述你所做出的更改也是很好且很重要的。它將幫助下載你的套件的" "人瞭解這個套件中是否有他們需要知道的事情。它會被作爲 <filename>/usr/share/" "doc/gentoo/changelog.Debian.gz</filename> 保存在二進位套件中。" #. type: Content of: <book><chapter><section><para> msgid "" "<command>dh_make</command> created a default one, and this is how it looks " "like:" msgstr "<command>dh_make</command> 創建了一個默認的檔案,這是它的樣子:" #. type: Content of: <book><chapter><section><screen> #, no-wrap msgid "" "1 gentoo (0.9.12-1) unstable; urgency=low\n" "2\n" "3 * Initial release (Closes: #<replaceable>nnnn</replaceable>) <<replaceable>nnnn</replaceable> is the bug number of your ITP>\n" "4\n" "5 -- Josip Rodin <joy-mg@debian.org> Mon, 22 Mar 2010 00:37:31 +0100\n" "6\n" msgstr "" "1 gentoo (0.9.12-1) unstable; urgency=low\n" "2\n" "3 * Initial release (Closes: #<replaceable>nnnn</replaceable>) <<replaceable>nnnn</replaceable> is the bug number of your ITP>\n" "4\n" "5 -- Josip Rodin <joy-mg@debian.org> Mon, 22 Mar 2010 00:37:31 +0100\n" "6\n" #. type: Content of: <book><chapter><section><para><footnote><para> msgid "" "Some people use invalid distribution values such as <literal>UNRELEASED</" "literal> to prevent a package to be accidentally uploaded when updating a " "package in a shared VCS." msgstr "" "有些人使用無效的發行版名稱,如 <literal>UNRELEASED</literal> 以防止某些套件在" "共享的 VCS 中修改時被意外上傳。" #. type: Content of: <book><chapter><section><para> msgid "" "Line 1 is the package name, version, distribution, and urgency. The name " "must match the source package name, distribution should be either " "<literal>unstable</literal> (or even <literal>experimental</literal>) " "<placeholder type=\"footnote\" id=\"0\"/>, and urgency shouldn't be changed " "to anything higher than <literal>low</literal>. :-)" msgstr "" "第 1 行是套件名、版本號、發行版和緊急程度。套件名必須與實際的原始碼套件名相" "同,發行版可以是 <literal>unstable</literal>(甚至 <literal>experimental</" "literal>)<placeholder type=\"footnote\" id=\"0\"/>,緊急程度則不要使用任何高" "於 <literal>low</literal> 的內容。 :-)" #. type: Content of: <book><chapter><section><para> msgid "" "Lines 3-5 are a log entry, where you document changes made in this package " "revision (not the upstream changes - there is 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 before the uppermost line that begins with " "<literal>*</literal> (asterisk). You can do it with <citerefentry> " "<refentrytitle>dch</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>, " "or manually with a text editor." msgstr "" "第 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> " "完成這個工作,也可以使用普通的文本編輯器手工完成。" #. type: Content of: <book><chapter><section><para> msgid "You will end up with something like this:" msgstr "最後它會成爲以下的樣子:" #. type: Content of: <book><chapter><section><screen> #, no-wrap msgid "" "1 gentoo (0.9.12-1) unstable; urgency=low\n" "2\n" "3 * Initial Release. Closes: #12345\n" "4 * This is my first Debian package.\n" "5 * Adjusted the Makefile to fix $(DESTDIR) problems.\n" "6\n" "7 -- Josip Rodin <joy-mg@debian.org> Mon, 22 Mar 2010 00:37:31 +0100\n" "8\n" msgstr "" "1 gentoo (0.9.12-1) unstable; urgency=low\n" "2\n" "3 * Initial Release. Closes: #12345\n" "4 * This is my first Debian package.\n" "5 * Adjusted the Makefile to fix $(DESTDIR) problems.\n" "6\n" "7 -- Josip Rodin <joy-mg@debian.org> Mon, 22 Mar 2010 00:37:31 +0100\n" "8\n" #. type: Content of: <book><chapter><section><para> msgid "" "You can read more about updating the <filename>changelog</filename> file " "later in <xref linkend=\"update\"/>." msgstr "" "你可以在關於更新的 <xref linkend=\"update\"/> 中瞭解更多關於 " "<filename>changelog</filename> 的內容。" #. type: Content of: <book><chapter><section><title> msgid "<filename>rules</filename> file" msgstr "<filename>rules</filename> 檔案" #. type: Content of: <book><chapter><section><para> msgid "" "Now we need to take a look at the exact rules which <citerefentry> " "<refentrytitle>dpkg-buildpackage</refentrytitle> <manvolnum>1</manvolnum> </" "citerefentry> will use to actually create the package. This file is " "actually 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." msgstr "" "現在我們需要看看 <citerefentry> <refentrytitle>dpkg-buildpackage</" "refentrytitle> <manvolnum>1</manvolnum> </citerefentry> 用於實際創建套件的 " "rules 檔案。這個檔案是一個 <filename>Makefile</filename>,但不同於上游原始碼" "中的那個。和 <filename>debian</filename> 目錄中的其他檔案不同,這個檔案被標記" "爲可執行。" #. type: Content of: <book><chapter><section><section><title> msgid "Targets of <filename>rules</filename> file" msgstr "<filename>rules</filename> 檔案中的 target" #. type: Content of: <book><chapter><section><section><para> msgid "" "Every <filename>rules</filename> file, as any other <filename>Makefile</" "filename>, consists of several targets and their rules specifying how to " "handle the source. <ulink url=\"&policy-debianrules;\">Debian Policy " "Manual, 4.9 'Main building script: debian/rules'</ulink> explains its " "details." msgstr "" "每個 <filename>rules</filename> 檔案都和其他的 <filename>Makefile</filename> " "一樣包含多個 target 和其中指定如何處理原始碼的規則。<ulink url=\"&policy-" "debianrules;\">Debian Policy Manual, 4.9 'Main building script: debian/" "rules'</ulink> 中對此做出了詳細解釋。" #. type: Content of: <book><chapter><section><section><para> msgid "The simplified explanation of targets are the following." msgstr "以下是對各 target 的簡單解釋:" #. type: Content of: <book><chapter><section><section><itemizedlist><listitem><para> msgid "" "<literal>clean</literal> target: to clean all compiled, generated, and " "useless files in the build-tree. (required)" msgstr "" "<literal>clean</literal>:清理所有編譯的、生成的或編譯樹中無用的檔案。(必須)" #. type: Content of: <book><chapter><section><section><itemizedlist><listitem><para> msgid "" "<literal>build</literal> target: to build the source into compiled programs " "and formatted documents in the build-tree. (required)" msgstr "" "<literal>build</literal>:在編譯樹中將程式碼編譯爲程式並生成格式化的文件。(必" "須)" #. type: Content of: <book><chapter><section><section><itemizedlist><listitem><para> msgid "" "<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)" msgstr "" "<literal>install</literal>:把檔案安裝到 <filename>debian</filename> 目錄內爲" "各個二進位套件構建的檔案樹。如果有定義,<literal>binary*</literal> target 則" "會依賴於此 target。(可選)" #. type: Content of: <book><chapter><section><section><itemizedlist><listitem><para><footnote><para> msgid "" "This target is used by <literal>dpkg-buildpackage</literal> as in <xref " "linkend=\"completebuild\"/>." msgstr "" "此 target 被 <literal>dpkg-buildpackage</literal> 用於 <xref linkend=" "\"completebuild\"/> 描述的過程中。" #. type: Content of: <book><chapter><section><section><itemizedlist><listitem><para> msgid "" "<literal>binary</literal> target: to create all binary packages (effectively " "combination of <literal>binary-arch</literal> and <literal>binary-indep</" "literal> targets). (required)<placeholder type=\"footnote\" id=\"0\"/>" msgstr "" "<literal>binary</literal>:創建所有二進位套件(是 <literal>binary-arch</" "literal> 和 <literal>binary-indep</literal> 的合併)。(必須)<placeholder type=" "\"footnote\" id=\"0\"/>" #. type: Content of: <book><chapter><section><section><itemizedlist><listitem><para><footnote><para> msgid "" "This target is used by <literal>dpkg-buildpackage -B</literal> as in <xref " "linkend=\"autobuilder\"/>." msgstr "" "此 target 被 <literal>dpkg-buildpackage -B</literal> 用於<xref linkend=" "\"autobuilder\"/> 描述的過程中。" #. type: Content of: <book><chapter><section><section><itemizedlist><listitem><para> msgid "" "<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\"/>" msgstr "" "<literal>binary-arch</literal>:在父目錄中創建平臺依賴" "(<literal>Architecture: any</literal>)的二進位套件。(必須)<placeholder type=" "\"footnote\" id=\"0\"/>" #. type: Content of: <book><chapter><section><section><itemizedlist><listitem><para><footnote><para> msgid "This target is used by <literal>dpkg-buildpackage -A</literal>." msgstr "此 target 被 <literal>dpkg-buildpackage -A</literal> 使用。" #. type: Content of: <book><chapter><section><section><itemizedlist><listitem><para> msgid "" "<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\"/>" msgstr "" "<literal>binary-indep</literal>:在父目錄中創建平臺獨立" "(<literal>Architecture: all</literal>)的二進位套件。(必須)<placeholder type=" "\"footnote\" id=\"0\"/>" #. type: Content of: <book><chapter><section><section><itemizedlist><listitem><para> msgid "" "<literal>get-orig-source</literal> target: to obtain the most recent version " "of the original source package from upstream archive site. (optional)" msgstr "" "<literal>get-orig-source</literal>:從上游站點獲得最新的原始原始碼套件。(可" "選)" #. type: Content of: <book><chapter><section><section><para> msgid "" "Rules that you want to execute are invoked as command line arguments (for " "example, <literal>./debian/rules build</literal> or <literal>fakeroot make -" "f debian/rules binary</literal>). After the target name, you can name the " "dependency, program or file that the rule depends on. After that, there can " "be any number of commands, indented with <literal><replaceable>TAB</" "replaceable></literal>. A new rule begins with the target declaration in " "the first column. Empty lines and lines beginning with <literal>#</literal> " "(hash) are treated as comments and ignored." msgstr "" "你希望執行的 target 規則可以通過命令行參數的方式觸發(例如 <literal>./debian/" "rules build</literal> 或 <literal>fakeroot make -f debian/rules binary</" "literal>)。target 名稱後你可以添加其依賴的 target 或檔案。此後是以 " "<literal><replaceable>TAB</replaceable></literal> 開頭的任意數量的名錄,每行" "一個。一個新的 target 則在行首頂格開始。空行和以 <literal>#</literal> 開頭的" "行將被視爲註釋而忽略。" #. type: Content of: <book><chapter><section><section><para> msgid "" "You are probably confused now, but it will all be clear upon examination of " "the <filename>rules</filename> file that <command>dh_make</command> gives us " "as a default. You should also read <literal>info make</literal> for more " "information." msgstr "" "可能你現在感到有些迷惑,在接下來講解 <command>dh_make</command> 給出的默認的 " "<filename>rules</filename> 檔案時會進行詳細的講解。你還應該閱讀 " "<literal>info make</literal> 來了解更多訊息。" #. type: Content of: <book><chapter><section><section><title> msgid "Default <filename>rules</filename> file" msgstr "默認的 <filename>rules</filename> 檔案" #. type: Content of: <book><chapter><section><section><para> msgid "" "Newer <command>dh_make</command> generates a very simple but powerful " "default <filename>rules</filename> file using the <command>dh</command> " "command:" msgstr "" "新版本的 <command>dh_make</command> 會生成一個使用 <command>dh</command> 命令" "的非常簡單但非常強大的默認的 <filename>rules</filename> 檔案:" #. type: Content of: <book><chapter><section><section><screen> #, no-wrap msgid "" " 1 #!/usr/bin/make -f\n" " 2 # -*- makefile -*-\n" " 3 # Sample debian/rules that uses debhelper.\n" " 4 # This file was originally written by Joey Hess and Craig Small.\n" " 5 # As a special exception, when this file is copied by dh-make into a\n" " 6 # dh-make output file, you may use that output file without restriction.\n" " 7 # This special exception was added by Craig Small in version 0.37 of dh-make.\n" " 8\n" " 9 # Uncomment this to turn on verbose mode.\n" "10 #export DH_VERBOSE=1\n" "11\n" "12 %:\n" "13 dh $@\n" msgstr "" " 1 #!/usr/bin/make -f\n" " 2 # -*- makefile -*-\n" " 3 # Sample debian/rules that uses debhelper.\n" " 4 # This file was originally written by Joey Hess and Craig Small.\n" " 5 # As a special exception, when this file is copied by dh-make into a\n" " 6 # dh-make output file, you may use that output file without restriction.\n" " 7 # This special exception was added by Craig Small in version 0.37 of dh-make.\n" " 8\n" " 9 # Uncomment this to turn on verbose mode.\n" "10 #export DH_VERBOSE=1\n" "11\n" "12 %:\n" "13 dh $@\n" #. type: Content of: <book><chapter><section><section><para> msgid "" "(I've added the line numbers. In the actual <filename>rules</filename> " "file, the leading white spaces are TAB codes.)" msgstr "" "(注:我添加了行號。實際的 <filename>rules</filename> 檔案裏開頭的空格是 TAB " "填充的。)" #. type: Content of: <book><chapter><section><section><para> msgid "" "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>." msgstr "" "可能在 shell 或 Perl 腳本中你已經對第一行的形式很熟悉了,它告訴作業系統這個檔" "案應使用 <filename>/usr/bin/make</filename> 處理。" #. type: Content of: <book><chapter><section><section><para> msgid "" "Line 11 can be uncommented to set <literal>DH_VERBOSE</literal> variable to " "1. Then, the <command>dh</command> command will output which <command>dh_*</" "command> commands are executed by the <command>dh</command> command. You " "can also add <literal>export DH_OPTIONS=-v</literal> line here. Then each " "<command>dh_*</command> command will output which commands are executed by " "each <command>dh_*</command> command. This helps you to understand what " "exactly is going on behind this simple <filename>rules</filename> file and " "to debug its problems. This new <command>dh</command> is a core part of the " "<systemitem role=\"package\">debhelper</systemitem> tools and does not hide " "anything from you." msgstr "" #. type: Content of: <book><chapter><section><section><para><footnote><para> msgid "" "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 many <command>dh_*</" "command> scripts listed for each required explicit targets and frozen them " "to the state when it was initially packaged. This new <command>dh</command> " "command is simpler and frees us from this constrain. You still have full " "power to customize this 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 like the <systemitem role=\"package\">cdbs</" "systemitem> package." msgstr "" #. type: Content of: <book><chapter><section><section><para><footnote><para> msgid "" "You can verify actual sequences of <command>dh_*</command> programs invoked " "for a given <literal><replaceable>target</replaceable></literal> as " "<literal>dh --no-act <replaceable>target</replaceable></literal> or " "<literal>debian/rules -- '--no-act <replaceable>target</replaceable>'</" "literal> without really running them." msgstr "" #. type: Content of: <book><chapter><section><section><para> msgid "" "Lines 12 and 13 are where all the work is done. 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 which runs appropriate sequences of " "<command>dh_*</command> programs depending on its argument. <placeholder " "type=\"footnote\" id=\"1\"/>" msgstr "" #. type: Content of: <book><chapter><section><section><itemizedlist><listitem><para> msgid "" "<literal>debian/rules clean</literal> runs <literal>dh clean</literal>; " "which in turn runs the following:" msgstr "" "<literal>debian/rules clean</literal> 運行了 <literal>dh clean</literal>,實" "際執行的命令爲:" #. type: Content of: <book><chapter><section><section><itemizedlist><listitem><screen> #, no-wrap msgid "" "dh_testdir\n" "dh_auto_clean\n" "dh_clean\n" msgstr "" "dh_testdir\n" "dh_auto_clean\n" "dh_clean\n" #. type: Content of: <book><chapter><section><section><itemizedlist><listitem><para> msgid "" "<literal>debian/rules build</literal> runs <literal>dh build</literal>; " "which in turn runs the following:" msgstr "" "<literal>debian/rules build</literal> 運行了 <literal>dh build</literal>,實" "際執行的命令爲:" #. type: Content of: <book><chapter><section><section><itemizedlist><listitem><screen> #, no-wrap msgid "" "dh_testdir\n" "dh_auto_configure\n" "dh_auto_build\n" "dh_auto_test\n" msgstr "" "dh_testdir\n" "dh_auto_configure\n" "dh_auto_build\n" "dh_auto_test\n" #. type: Content of: <book><chapter><section><section><itemizedlist><listitem><para><footnote><para> msgid "" "This assumes that the <systemitem role=\"package\">python-support</" "systemitem> package is installed on the system." msgstr "" "此處默認 <systemitem role=\"package\">python-support</systemitem> 套件已經安" "裝在系統中。" #. type: Content of: <book><chapter><section><section><itemizedlist><listitem><para> msgid "" "<literal>fakeroot debian/rules binary</literal> runs <literal>fakeroot dh " "binary</literal>; which in turn runs the following<placeholder type=" "\"footnote\" id=\"0\"/>:" msgstr "" "<literal>fakeroot debian/rules binary</literal> 執行了 <literal>fakeroot dh " "binary</literal>; 實際執行的命令爲<placeholder type=\"footnote\" id=\"0\"/>:" #. type: Content of: <book><chapter><section><section><itemizedlist><listitem><screen> #, no-wrap msgid "" "dh_testroot\n" "dh_prep\n" "dh_installdirs\n" "dh_auto_install\n" "dh_install\n" "dh_installdocs\n" "dh_installchangelogs\n" "dh_installexamples\n" "dh_installman\n" "dh_installcatalogs\n" "dh_installcron\n" "dh_installdebconf\n" "dh_installemacsen\n" "dh_installifupdown\n" "dh_installinfo\n" "dh_pysupport\n" "dh_installinit\n" "dh_installmenu\n" "dh_installmime\n" "dh_installmodules\n" "dh_installlogcheck\n" "dh_installlogrotate\n" "dh_installpam\n" "dh_installppp\n" "dh_installudev\n" "dh_installwm\n" "dh_installxfonts\n" "dh_bugfiles\n" "dh_lintian\n" "dh_gconf\n" "dh_icons\n" "dh_perl\n" "dh_usrlocal\n" "dh_link\n" "dh_compress\n" "dh_fixperms\n" "dh_strip\n" "dh_makeshlibs\n" "dh_shlibdeps\n" "dh_installdeb\n" "dh_gencontrol\n" "dh_md5sums\n" "dh_builddeb\n" msgstr "" "dh_testroot\n" "dh_prep\n" "dh_installdirs\n" "dh_auto_install\n" "dh_install\n" "dh_installdocs\n" "dh_installchangelogs\n" "dh_installexamples\n" "dh_installman\n" "dh_installcatalogs\n" "dh_installcron\n" "dh_installdebconf\n" "dh_installemacsen\n" "dh_installifupdown\n" "dh_installinfo\n" "dh_pysupport\n" "dh_installinit\n" "dh_installmenu\n" "dh_installmime\n" "dh_installmodules\n" "dh_installlogcheck\n" "dh_installlogrotate\n" "dh_installpam\n" "dh_installppp\n" "dh_installudev\n" "dh_installwm\n" "dh_installxfonts\n" "dh_bugfiles\n" "dh_lintian\n" "dh_gconf\n" "dh_icons\n" "dh_perl\n" "dh_usrlocal\n" "dh_link\n" "dh_compress\n" "dh_fixperms\n" "dh_strip\n" "dh_makeshlibs\n" "dh_shlibdeps\n" "dh_installdeb\n" "dh_gencontrol\n" "dh_md5sums\n" "dh_builddeb\n" #. type: Content of: <book><chapter><section><section><itemizedlist><listitem><para> msgid "" "<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." msgstr "" "<literal>fakeroot debian/rules binary-arch</literal> 執行了 " "<literal>fakeroot dh binary-arch</literal>,其效果等同於 <literal>fakeroot " "dh binary</literal> 並附加 <literal>-a</literal> 參數於每個命令。" #. type: Content of: <book><chapter><section><section><itemizedlist><listitem><para> msgid "" "<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." msgstr "" "<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> 選項。" #. type: Content of: <book><chapter><section><section><para><footnote><para> msgid "" "For complete information on what do all these <command>dh_*</command> " "scripts exactly do, and what their other options are, please read their " "respective manual pages and the <systemitem role=\"package\">debhelper</" "systemitem> documentation." msgstr "" #. type: Content of: <book><chapter><section><section><para><footnote><para> msgid "" "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." msgstr "" #. type: Content of: <book><chapter><section><section><para> msgid "" "The function of <command>dh_*</command> commands are almost self-evident " "from their names. <placeholder type=\"footnote\" id=\"0\"/> There are few " "notable ones worth making (over)simplified explanation here assuming typical " "build environment based on <filename>Makefile</filename>. <placeholder type=" "\"footnote\" id=\"1\"/>" msgstr "" #. type: Content of: <book><chapter><section><section><itemizedlist><listitem><para><footnote><para> msgid "" "It actually looks for the first available target of <literal>distclean</" "literal>, <literal>realclean</literal> or <literal>clean</literal> in " "<filename>Makefile</filename> and execute it." msgstr "" #. type: Content of: <book><chapter><section><section><itemizedlist><listitem><para> msgid "" "<command>dh_auto_clean</command> usually executes the following if " "<filename>Makefile</filename> exists with the <literal>distclean</literal> " "target. <placeholder type=\"footnote\" id=\"0\"/>" msgstr "" #. type: Content of: <book><chapter><section><section><itemizedlist><listitem><screen> #, no-wrap msgid "make distclean\n" msgstr "make distclean\n" #. type: Content of: <book><chapter><section><section><itemizedlist><listitem><para> msgid "" "<command>dh_auto_configure</command> usually executes the following if " "<filename>./configure</filename> exists (arguments abbreviated for " "readability)." msgstr "" "<command>dh_auto_configure</command> 在 <filename>./configure</filename> 存在" "時通常執行以下命令(省略了部分參數以方便此處閱讀)。" #. type: Content of: <book><chapter><section><section><itemizedlist><listitem><screen> #, no-wrap msgid "./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var ...\n" msgstr "./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var ...\n" #. type: Content of: <book><chapter><section><section><itemizedlist><listitem><para> msgid "" "<command>dh_auto_build</command> usually executes the following to execute " "the first target of <filename>Makefile</filename> if it exists." msgstr "" "<command>dh_auto_build</command> 通常使用以下命令執行 <filename>Makefile</" "filename> 中的第一個 target。" #. type: Content of: <book><chapter><section><section><itemizedlist><listitem><screen> #, no-wrap msgid "make\n" msgstr "make\n" #. type: Content of: <book><chapter><section><section><itemizedlist><listitem><para><footnote><para> msgid "" "It actually looks for the first available target of <literal>test</literal> " "or <literal>check</literal> in <filename>Makefile</filename> and execute it." msgstr "" #. type: Content of: <book><chapter><section><section><itemizedlist><listitem><para> msgid "" "<command>dh_auto_test</command> usually executes the following if " "<filename>Makefile</filename> exists with the <literal>test</literal> " "target. <placeholder type=\"footnote\" id=\"0\"/>" msgstr "" #. type: Content of: <book><chapter><section><section><itemizedlist><listitem><screen> #, no-wrap msgid "make test\n" msgstr "make test\n" #. type: Content of: <book><chapter><section><section><itemizedlist><listitem><para> msgid "" "<command>dh_auto_install</command> usually executes the following if " "<filename>Makefile</filename> exists with the <literal>install</literal> " "target (line folded for readability)." msgstr "" "<command>dh_auto_install</command> 通常在 <filename>Makefile</filename> 存在" "且有 <literal>install</literal> target 時執行以下命令(進行了換行以便閱讀)。" #. type: Content of: <book><chapter><section><section><itemizedlist><listitem><screen> #, no-wrap msgid "" "make install \\\n" " DESTDIR=<replaceable>/path/to</replaceable>/<replaceable>package</replaceable>_<replaceable>version</replaceable>-<replaceable>revision</replaceable>/debian/<replaceable>package</replaceable>\n" msgstr "" "make install \\\n" " DESTDIR=<replaceable>/path/to</replaceable>/<replaceable>package</replaceable>_<replaceable>version</replaceable>-<replaceable>revision</replaceable>/debian/<replaceable>package</replaceable>\n" #. type: Content of: <book><chapter><section><section><para> msgid "" "Targets which require the <command>fakeroot</command> command contain " "<command>dh_testroot</command>. If you are not pretending to be root using " "this command, it exits with an error." msgstr "" "需要 <command>fakeroot</command> 命令的都包含了 <command>dh_testroot</" "command>。如果你沒有假裝爲 root,將會報錯並退出。" #. type: Content of: <book><chapter><section><section><para> msgid "" "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. Only things that you must not change are " "the names of the rules, because all the tools use these names, as mandated " "by the Debian Policy." msgstr "" "關於 <command>dh_make</command> 生成的 <filename>rules</filename> 檔案,你應" "該知道的最重要的事是,它僅僅是一個建議。它對多數簡單的套件有效,但對於更復雜" "的則要大膽對其進行定製以滿足需要。只有一件事不應改變,就是它們的名字,這些名" "稱由 Debian Policy 定義且被所有工具使用。" #. type: Content of: <book><chapter><section><section><para> msgid "" "Although <literal>install</literal> is not required target, it is " "supported. <literal>fakeroot dh install</literal> behaves like " "<literal>fakeroot dh binary</literal> but stops after <command>dh_fixperms</" "command>." msgstr "" "儘管 <literal>install</literal> target 不是必須的,但也被支持。" "<literal>fakeroot dh install</literal> 的操作就像 <literal>fakeroot dh " "binary</literal>一樣,但停止於 <command>dh_fixperms</command>。" #. type: Content of: <book><chapter><section><section><title> msgid "Customization of <filename>rules</filename> file" msgstr "定製 <filename>rules</filename> 檔案" #. type: Content of: <book><chapter><section><section><para> msgid "" "There are many ways to customize the <filename>rules</filename> file created " "with the new <command>dh</command> command." msgstr "" "有很多方法來定製使用新的 <command>dh</command> 命令創建的 <filename>rules</" "filename> 檔案。" #. type: Content of: <book><chapter><section><section><para><footnote><para> msgid "" "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>." msgstr "" "如果一個套件安裝了 <filename>/usr/share/perl5/Debian/Debhelper/Sequence/" "<replaceable>custom_name</replaceable>.pm</filename> 檔案,你應當使用 " "<literal>dh --with <replaceable>custom-name</replaceable> $@</literal> 命令激" "活其功能。" #. type: Content of: <book><chapter><section><section><para> msgid "" "The <literal>dh $@</literal> command can be customized as follows. " "<placeholder type=\"footnote\" id=\"0\"/>" msgstr "" "<literal>dh $@</literal> 命令可以按以下方式定製。<placeholder type=\"footnote" "\" id=\"0\"/>" #. type: Content of: <book><chapter><section><section><itemizedlist><listitem><para><footnote><para> msgid "" "Use of the <command>dh_pysupport</command> command is preferred over use of " "the <command>dh_pycentral</command> command. Do not use the " "<command>dh_python</command> command." msgstr "" "在 <command>dh_pysupport</command> 和 <command>dh_pycentral</command> 命令之" "間更推薦使用前者,不要使用 <command>dh_python</command> 命令。" #. type: Content of: <book><chapter><section><section><itemizedlist><listitem><para> msgid "" "Add support of the <command>dh_pysupport</command> command. (The best " "choice for Python.) <placeholder type=\"footnote\" id=\"0\"/>" msgstr "" "添加 <command>dh_pysupport</command> 命令支持。(對於 Python 的最佳選擇。)" "<placeholder type=\"footnote\" id=\"0\"/>" #. type: Content of: <book><chapter><section><section><itemizedlist><listitem><itemizedlist><listitem><para> msgid "" "Install the <systemitem role=\"package\">python-support</systemitem> package " "in <literal>Build-Depends</literal>." msgstr "" "在 <literal>Build-Depends</literal> 中添加 <systemitem role=\"package" "\">python-support</systemitem> 套件。" #. type: Content of: <book><chapter><section><section><itemizedlist><listitem><itemizedlist><listitem><para> msgid "Use <literal>dh $@</literal> as usual. (This is enabled by default)" msgstr "照常使用 <literal>dh $@</literal>。(它被默認啓用)" #. type: Content of: <book><chapter><section><section><itemizedlist><listitem><itemizedlist><listitem><para> msgid "" "This handles Python modules using the <systemitem role=\"package\">python-" "support</systemitem> framework." msgstr "" "這會使用 <systemitem role=\"package\">python-support</systemitem> 框架處理 " "Python 模塊。" #. type: Content of: <book><chapter><section><section><itemizedlist><listitem><para> msgid "Add support of the <command>dh_pycentral</command> command." msgstr "添加 <command>dh_pycentral</command> 命令支持。" #. type: Content of: <book><chapter><section><section><itemizedlist><listitem><itemizedlist><listitem><para> msgid "" "Install the <systemitem role=\"package\">python-central</systemitem> package " "in <literal>Build-Depends</literal>." msgstr "" "在 <literal>Build-Depends</literal> 中添加 <systemitem role=\"package" "\">python-central</systemitem> 套件。" #. type: Content of: <book><chapter><section><section><itemizedlist><listitem><itemizedlist><listitem><para> msgid "Use <literal>dh --with python-central $@</literal> instead." msgstr "使用 <literal>dh --with python-central $@</literal>" #. type: Content of: <book><chapter><section><section><itemizedlist><listitem><itemizedlist><listitem><para> msgid "This also deactivates the <command>dh_pysupport</command> command." msgstr "這樣會同時停用 <command>dh_pysupport</command> 命令。" #. type: Content of: <book><chapter><section><section><itemizedlist><listitem><itemizedlist><listitem><para> msgid "" "This handles Python modules using the <systemitem role=\"package\">python-" "central</systemitem> framework." msgstr "" "這會使用 <systemitem role=\"package\">python-central</systemitem> 框架處理 " "Python 模塊。" #. type: Content of: <book><chapter><section><section><itemizedlist><listitem><para> msgid "Add support of the <command>dh_installtex</command> command." msgstr "添加 <command>dh_installtex</command> 命令支持。" #. type: Content of: <book><chapter><section><section><itemizedlist><listitem><itemizedlist><listitem><para> msgid "" "Install the <systemitem role=\"package\">tex-common</systemitem> package in " "<literal>Build-Depends</literal>." msgstr "" "在 <literal>Build-Depends</literal> 中添加 <systemitem role=\"package\">tex-" "common</systemitem> 套件。" #. type: Content of: <book><chapter><section><section><itemizedlist><listitem><itemizedlist><listitem><para> msgid "Use <literal>dh --with tex $@</literal> instead." msgstr "使用 <literal>dh --with tex $@</literal>" #. type: Content of: <book><chapter><section><section><itemizedlist><listitem><itemizedlist><listitem><para> msgid "This registers Type 1 fonts, hyphenation patterns, or formats with TeX." msgstr "這樣會註冊 Type 1 字體、斷句樣式或其他使用 TeX 的格式。" #. type: Content of: <book><chapter><section><section><itemizedlist><listitem><para> msgid "" "Add support of the <command>dh_quilt_patch</command> and " "<command>dh_quilt_unpatch</command> commands." msgstr "" "添加 <command>dh_quilt_patch</command> 和 <command>dh_quilt_unpatch</" "command> 命令支持。" #. type: Content of: <book><chapter><section><section><itemizedlist><listitem><itemizedlist><listitem><para> msgid "" "Install the <systemitem role=\"package\">quilt</systemitem> package in " "<literal>Build-Depends</literal>." msgstr "" "在 <literal>Build-Depends</literal> 中添加 <systemitem role=\"package" "\">quilt</systemitem> 套件。" #. type: Content of: <book><chapter><section><section><itemizedlist><listitem><itemizedlist><listitem><para> msgid "Use <literal>dh --with quilt $@</literal> instead." msgstr "使用 <literal>dh --with quilt $@</literal>" #. type: Content of: <book><chapter><section><section><itemizedlist><listitem><itemizedlist><listitem><para> msgid "" "This applies and un-applies patches to the upstream source from files in the " "<filename>debian/patches</filename> directory for the <literal>1.0</literal> " "source package." msgstr "" "這會在你使用 <literal>1.0</literal> 格式的原始碼套件時自動應用或解除 " "<filename>debian/patches</filename> 目錄中的補丁。" #. type: Content of: <book><chapter><section><section><itemizedlist><listitem><itemizedlist><listitem><para> msgid "" "This is not needed if you use the new <literal>3.0 (quilt)</literal> source " "package." msgstr "" "如果你使用新的 <literal>3.0 (quilt)</literal> 原始碼套件格式時不需要這些。" #. type: Content of: <book><chapter><section><section><itemizedlist><listitem><para> msgid "Add support of the <command>dh_dkms</command> command." msgstr "添加 <command>dh_dkms</command> 命令支持。" #. type: Content of: <book><chapter><section><section><itemizedlist><listitem><itemizedlist><listitem><para> msgid "" "Install the <systemitem role=\"package\">dkms</systemitem> package in " "<literal>Build-Depends</literal>." msgstr "" "在 <literal>Build-Depends</literal> 中添加 <systemitem role=\"package" "\">dkms</systemitem> 套件。" #. type: Content of: <book><chapter><section><section><itemizedlist><listitem><itemizedlist><listitem><para> msgid "Use <literal>dh --with dkms $@</literal> instead." msgstr "使用 <literal>dh --with dkms $@</literal>" #. type: Content of: <book><chapter><section><section><itemizedlist><listitem><itemizedlist><listitem><para> msgid "This correctly handles DKMS usage by the kernel module package." msgstr "這會使核心模組套件正確使用 DKMS。" #. type: Content of: <book><chapter><section><section><itemizedlist><listitem><para> msgid "" "Add support of the <command>dh_autotools-dev_updateconfig</command> and " "<command>dh_autotools-dev_restoreconfig</command> commands." msgstr "" "添加 <command>dh_autotools-dev_updateconfig</command> 和 " "<command>dh_autotools-dev_restoreconfig</command> 命令支持。" #. type: Content of: <book><chapter><section><section><itemizedlist><listitem><itemizedlist><listitem><para> msgid "" "Install the <systemitem role=\"package\">autotools-dev</systemitem> package " "in <literal>Build-Depends</literal>." msgstr "" "在 <literal>Build-Depends</literal> 中添加 <systemitem role=\"package" "\">autotools-dev</systemitem> 套件。" #. type: Content of: <book><chapter><section><section><itemizedlist><listitem><itemizedlist><listitem><para> msgid "Use <literal>dh --with autotools-dev $@</literal> instead." msgstr "使用 <literal>dh --with autotools-dev $@</literal>" #. type: Content of: <book><chapter><section><section><itemizedlist><listitem><itemizedlist><listitem><para> msgid "" "This updates and restores <filename>config.sub</filename> and " "<filename>config.guess</filename>." msgstr "" "這會自動更新或還原 <filename>config.sub</filename> 和 <filename>config." "guess</filename> 檔案。" #. type: Content of: <book><chapter><section><section><itemizedlist><listitem><para> msgid "" "Add support of the <command>dh_autoreconf</command> and " "<command>dh_autoreconf_clean</command> commands." msgstr "" "添加 <command>dh_autoreconf</command> 和 <command>dh_autoreconf_clean</" "command> 命令支持。" #. type: Content of: <book><chapter><section><section><itemizedlist><listitem><itemizedlist><listitem><para> msgid "" "Install the <systemitem role=\"package\">dh-autoreconf</systemitem> package " "in <literal>Build-Depends</literal>." msgstr "" "在 <literal>Build-Depends</literal> 中添加 <systemitem role=\"package\">dh-" "autoreconf</systemitem> 套件。" #. type: Content of: <book><chapter><section><section><itemizedlist><listitem><itemizedlist><listitem><para> msgid "Use <literal>dh --with autoreconf $@</literal> instead." msgstr "使用 <literal>dh --with autoreconf $@</literal>" #. type: Content of: <book><chapter><section><section><itemizedlist><listitem><itemizedlist><listitem><para> msgid "" "This updates the GNU Build System files and restores them after the build." msgstr "這樣會在編譯時更新 GNU 編譯系統檔案並在編譯後對其進行恢復。" #. type: Content of: <book><chapter><section><section><itemizedlist><listitem><para> msgid "Add support to the <command>bash</command> completion feature." msgstr "添加 <command>bash</command> 補全特性支持。" #. type: Content of: <book><chapter><section><section><itemizedlist><listitem><itemizedlist><listitem><para> msgid "" "Install the <systemitem role=\"package\">bash-completion</systemitem> " "package in <literal>Build-Depends</literal>." msgstr "" "在 <literal>Build-Depends</literal> 中添加 <systemitem role=\"package\">bash-" "completion</systemitem> 套件。" #. type: Content of: <book><chapter><section><section><itemizedlist><listitem><itemizedlist><listitem><para> msgid "Use <literal>dh --with bash-completion $@</literal> instead." msgstr "使用 <literal>dh --with bash-completion $@</literal>" #. type: Content of: <book><chapter><section><section><itemizedlist><listitem><itemizedlist><listitem><para> msgid "" "This installs <command>bash</command> completions using configuration file " "at <filename>debian/<replaceable>package</replaceable>.bash-completion</" "filename>." msgstr "" "這會使用 <filename>debian/<replaceable>package</replaceable>.bash-" "completion</filename> 中的設定檔案安裝 <command>bash</command> 補全。" #. type: Content of: <book><chapter><section><section><para> msgid "" "For sources using Autotools, use combination of above as <literal>dh --with " "autotools-dev --with autoreconf $@</literal> to be most current with the GNU " "Build System." msgstr "" "對於使用 Autotools 的原始碼,使用 <literal>dh --with autotools-dev --with " "autoreconf $@</literal> 讓其使用最新的 GNU 編譯系統。" #. type: Content of: <book><chapter><section><section><para> msgid "" "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." msgstr "" "很多由新的 <command>dh</command> 命令觸發的 <command>dh_*</command> 都可以通" "過修改 <filename>debian</filename> 目錄中的設定檔案來對其行爲進行定製。參考 " "<xref linkend=\"dother\"/> 和每個命令的 man 手冊頁。" #. type: Content of: <book><chapter><section><section><para><footnote><para> msgid "" "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." msgstr "" "在 <literal>lenny</literal> 下,如果你希望更改某個 <command>dh_*</command> 腳" "本的行爲,你需要在 <filename>rules</filename> 中找到相應的行然後進行調整。" #. type: Content of: <book><chapter><section><section><para> msgid "" "Some <command>dh_*</command> commands invoked by the new <command>dh</" "command> command may require you to run it with some 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 only for the " "<command>dh_<replaceable>foo</replaceable></command> command you want to " "change. It basically say <emphasis>run me instead</emphasis>. <placeholder " "type=\"footnote\" id=\"0\"/>" msgstr "" "某些由新的 <command>dh</command> 命令所觸發的 <command>dh_*</command> 命令可" "能需要額外的參數使其一同執行或者跳過執行。對於這類情況,你可以在 " "<filename>rules</filename> 檔案中創建一個 " "<literal>override_dh_<replaceable>foo</replaceable></literal> target 來使其完" "成你想要的 <command>dh_<replaceable>foo</replaceable></command> 命令。它的作" "用簡單說就是 <emphasis>把運行的命令換成我</emphasis>。<placeholder type=" "\"footnote\" id=\"0\"/>" #. type: Content of: <book><chapter><section><section><para> msgid "" "Please note that the <command>dh_auto_*</command> commands tend to do more " "than what has been discussed as (over)simplified explanation to take care " "all the corner cases. Use of simplified equivalent command instead of these " "in <literal>override_dh_*</literal> targets except the " "<literal>override_dh_auto_clean</literal> target is a bad idea since it may " "kill such <systemitem role=\"package\">debhelper</systemitem>'s smart " "features." msgstr "" "請注意 <command>dh_auto_*</command> 命令所做的比上述簡化的步驟中介紹的內容更" "多。除了 <literal>override_dh_auto_clean</literal> 外把上面的簡化命令寫成 " "<literal>override_dh_*</literal> 中是不明智的,這樣會使得 <systemitem role=" "\"package\">debhelper</systemitem> 的許多智能特性無法體現。" #. type: Content of: <book><chapter><section><section><para> #, fuzzy #| msgid "" #| "If you want to store the system configuration data for the <systemitem " #| "role=\"package\">gentoo</systemitem> package in the <filename>/etc/" #| "gentoo</filename> directory instead of the usual <filename>/etc</" #| "filename> directory, 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. " #| "<placeholder type=\"footnote\" id=\"0\"/>" msgid "" "If you want to store the 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." msgstr "" "如果你希望把 <systemitem role=\"package\">gentoo</systemitem> 套件的設定檔案" "安裝到 <filename>/etc/gentoo</filename> 而非默認的 <filename>/etc</filename> " "目錄,你可以覆蓋 <command>dh_auto_configure</command> 默認的使用的 " "<literal>--sysconfig=/etc</literal> 參數,改爲向 <command>./configure</" "command> 命令傳遞以下參數:<placeholder type=\"footnote\" id=\"0\"/>" #. type: Content of: <book><chapter><section><section><screen> #, no-wrap msgid "" "override_dh_auto_configure:\n" " dh_auto_configure -- --sysconfig=/etc/gentoo\n" msgstr "" "override_dh_auto_configure:\n" " dh_auto_configure -- --sysconfig=/etc/gentoo\n" #. type: Content of: <book><chapter><section><section><para> msgid "" "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 the <command>./" "configure</command> command here since it will only override the <literal>--" "sysconfig</literal> argument and keeps well intended other arguments to the " "<command>./configure</command> command." msgstr "" #. type: Content of: <book><chapter><section><section><para><footnote><para> msgid "" "<command>dh_auto_build</command> without any arguments will execute the " "first target in the <filename>Makefile</filename> file." msgstr "" "沒有參數的 <command>dh_auto_build</command>命令將執行 <filename>Makefile</" "filename> 中的第一個 target。" #. type: Content of: <book><chapter><section><section><para> msgid "" "If <filename>Makefile</filename> of a 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 it." msgstr "" "如果 <systemitem role=\"package\">gentoo</systemitem> 的 <filename>Makefile</" "filename> 需要指定 <literal>build</literal> 作爲其編譯用的 " "target<placeholder type=\"footnote\" id=\"0\"/>,你可以創建一個 " "<literal>override_dh_auto_build</literal> target 來啓用它。" #. type: Content of: <book><chapter><section><section><screen> #, no-wrap msgid "" "override_dh_auto_build:\n" " dh_auto_build -- build\n" msgstr "" "override_dh_auto_build:\n" " dh_auto_build -- build\n" #. type: Content of: <book><chapter><section><section><para> msgid "" "This ensures to run $(MAKE) with all the default arguments given by the " "<command>dh_auto_build</command> command and <literal>build</literal> " "argument." msgstr "" "這保證了 $(MAKE) 會使用 <command>dh_auto_build</command> 傳遞的所有參數並編譯" "處理 <literal>build</literal> 這個 target。" #. type: Content of: <book><chapter><section><section><para> msgid "" "If <filename>Makefile</filename> of a source for <systemitem role=\"package" "\">gentoo</systemitem> requires you to specify the <literal>packageclean</" "literal> target to clean it for Debian package instead of the " "<literal>distclean</literal> or <literal>clean</literal> targets in the " "<filename>Makefile</filename> file, you create an " "<literal>override_dh_auto_clean</literal> target to enable it." msgstr "" #. type: Content of: <book><chapter><section><section><screen> #, no-wrap msgid "" "override_dh_auto_clean:\n" " $(MAKE) packageclean\n" msgstr "" "override_dh_auto_clean:\n" " $(MAKE) packageclean\n" #. type: Content of: <book><chapter><section><section><para> msgid "" "If <filename>Makefile</filename> of a source for <systemitem role=\"package" "\">gentoo</systemitem> contains <literal>test</literal> target which you do " "not want to run for the Debian package building process, you can use empty " "<literal>override_dh_auto_test</literal> target to skip it." msgstr "" "如果 <systemitem role=\"package\">gentoo</systemitem> 的 <filename>Makefile</" "filename> 包含了一個 <literal>test</literal> target 但你不想在 Debian 套件編" "譯過程中運行它,可以使用空的 <literal>override_dh_auto_test</literal> target " "來跳過它。" #. type: Content of: <book><chapter><section><section><screen> #, no-wrap msgid "override_dh_auto_test:\n" msgstr "override_dh_auto_test:\n" #. type: Content of: <book><chapter><section><section><para><footnote><para> msgid "" "The <filename>debian/changelog</filename> and <filename>debian/NEWS</" "filename> files are always automatically installed. The upstream changelog " "is searched by converting filenames to the lower case and matching them with " "the <filename>changelog</filename>, <filename>changes</filename>, " "<filename>changelog.txt</filename>, and <filename>changes.txt</filename>." msgstr "" "<filename>debian/changelog</filename> 和 <filename>debian/NEWS</filename> 總" "是會被自動安裝。程式會不分大小寫地搜索以下檔案名來檢測上游 changelog:" "<filename>changelog</filename>、<filename>changes</filename>、" "<filename>changelog.txt</filename>和<filename>changes.txt</filename>。" #. type: Content of: <book><chapter><section><section><para> msgid "" "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\"/>" msgstr "" "如果 <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\"/>" #. type: Content of: <book><chapter><section><section><screen> #, no-wrap msgid "" "override_dh_installchangelogs:\n" " dh_installchangelogs FIXES\n" msgstr "" "override_dh_installchangelogs:\n" " dh_installchangelogs FIXES\n" #. type: Content of: <book><chapter><section><section><para> msgid "" "When you use the new <command>dh</command> command, use of explicit targets " "such as the ones listed in <xref linkend=\"targets\"/> except <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." msgstr "" "如果你使用新的 <command>dh</command> 命令時,還使用 <xref linkend=\"targets" "\"/> 中除 <literal>get-orig-source</literal> 的 target ,會使得其效果難以預" "料。請儘量避免使用獨立的或預設的 target,如果必須修改默認設置則酌情使用 " "<literal>override_dh_*</literal>。" #. type: Content of: <book><chapter><title> msgid "Other files under the <filename>debian</filename> directory" msgstr "<filename>debian</filename> 目錄下的其他檔案" #. type: Content of: <book><chapter><para> msgid "" "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 make an " "overview of what each of these does and its format. Please read <ulink url=" "\"&debian-policy;\">Debian Policy Manual</ulink> and <ulink url=" "\"&developers-reference;\">Debian Developer's Reference</ulink> for " "guidelines for the packaging." msgstr "" "要控制 <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> 來了解更多內容。" #. type: Content of: <book><chapter><para> #, fuzzy #| msgid "" #| "The <command>dh_make</command> command will create some template " #| "configuration files under the <filename>debian</filename> directory. " #| "Most of them come with filenames suffixed by <literal>.ex</literal>. " #| "Some of them come with filenames prefixed by the binary package name such " #| "as <literal><replaceable>package</replaceable></literal>. Take a look at " #| "all of them." msgid "" "The <command>dh_make</command> command will create some template " "configuration files under the <filename>debian</filename> directory. Most " "of them come with filenames suffixed by <literal>.ex</literal>. Some of " "them come with filenames prefixed by the binary package name such as " "<literal><replaceable>package</replaceable></literal>. Take a look at all " "of them. <placeholder type=\"footnote\" id=\"0\"/>" msgstr "" "<command>dh_make</command> 命令會在 <filename>debian</filename> 目錄中創建一" "些設定檔案模板,它們的檔案名多帶有 <literal>.ex</literal> 的後綴。其中的一些" "可能以套件名作爲前綴,如 <literal><replaceable>package</replaceable></" "literal>。現在對它們進行一個大致的瞭解。" #. type: Content of: <book><chapter><para> msgid "" "The <command>dh_make</command> command may not create some template " "configuration files for <systemitem role=\"package\">debhelper</" "systemitem>. In such cases, you need to create them with the editor." msgstr "" "還有一些 <systemitem role=\"package\">debhelper</systemitem> 的設定檔案模板 " "<command>dh_make</command> 命令沒有直接創建。在這種情況下如果你需要它們,則要" "使用文本編輯器手工創建。" #. type: Content of: <book><chapter><para> msgid "If you wish or need to activate any of those, please do the following." msgstr "如果你希望或需要激活它們中的任意一個或多個,請按照下面的方法做。" #. type: Content of: <book><chapter><itemizedlist><listitem><para> msgid "" "rename template files by removing the <literal>.ex</literal> or <literal>." "EX</literal> suffix if the template files have one." msgstr "" "如果模板檔案帶有 <literal>.ex</literal> 或 <literal>.EX</literal> 後綴,則重" "命名它去掉後綴。" #. type: Content of: <book><chapter><itemizedlist><listitem><para> msgid "" "rename the name of these configuration files using the actual binary package " "name in place of <literal><replaceable>package</replaceable></literal>." msgstr "" "按照需要,把帶有套件名的設定檔案的前綴改爲實際的二進位套件名,例如 " "<literal><replaceable>package</replaceable></literal>。" #. type: Content of: <book><chapter><itemizedlist><listitem><para> msgid "modify template file contents to suit your needs." msgstr "修改模板檔案來滿足你的需要。" #. type: Content of: <book><chapter><itemizedlist><listitem><para> msgid "remove template files which you do not need." msgstr "刪除不需要的模板檔案。" #. type: Content of: <book><chapter><itemizedlist><listitem><para> msgid "" "modify the <filename>control</filename> file (see <xref linkend=\"control\"/" ">), if necessary." msgstr "" "如果需要,修改 <filename>control</filename> 檔案(參考 <xref linkend=\"control" "\"/>)。" #. type: Content of: <book><chapter><itemizedlist><listitem><para> msgid "" "modify the <filename>rules</filename> file (see <xref linkend=\"rules\"/>), " "if necessary." msgstr "" "如果需要,修改 <filename>rules</filename> 檔案(參考 <xref linkend=\"rules\"/" ">)。" #. type: Content of: <book><chapter><para> msgid "" "Those <systemitem role=\"package\">debhelper</systemitem> configuration " "files without <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." msgstr "" #. type: Content of: <book><chapter><section><title> msgid "<filename>README.Debian</filename> file" msgstr "<filename>README.Debian</filename> 檔案" #. type: Content of: <book><chapter><section><para> msgid "" "Any extra details or discrepancies between the original package and your " "Debian version should be documented here." msgstr "所有關於你的 Debian 版本與原始版本間的額外訊息或差別都應在這裏記錄。" #. type: Content of: <book><chapter><section><para> msgid "" "<command>dh_make</command> created a default one, this is what it looks like:" msgstr "<command>dh_make</command> 創建了一個默認的檔案,以下是它的樣子:" #. type: Content of: <book><chapter><section><screen> #, no-wrap msgid "" "gentoo for Debian\n" "-----------------\n" "<possible notes regarding this package - if none, delete this file>\n" " -- Josip Rodin <joy-mg@debian.org>, Wed, 11 Nov 1998 21:02:14 +0100\n" msgstr "" "gentoo for Debian\n" "-----------------\n" "<possible notes regarding this package - if none, delete this file>\n" " -- Josip Rodin <joy-mg@debian.org>, Wed, 11 Nov 1998 21:02:14 +0100\n" #. type: Content of: <book><chapter><section><para> msgid "" "If you have nothing to be documented, remove this file. See <citerefentry> " "<refentrytitle>dh_installdocs</refentrytitle> <manvolnum>1</manvolnum> </" "citerefentry>." msgstr "" "如果你沒有需要寫在這裏的東西,則刪除這個檔案。參考 <citerefentry> " "<refentrytitle>dh_installdocs</refentrytitle> <manvolnum>1</manvolnum> </" "citerefentry>" #. type: Content of: <book><chapter><section><title> msgid "<filename>compat</filename> file" msgstr "<filename>compat</filename> 檔案" #. type: Content of: <book><chapter><section><para> msgid "" "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> V7 by the " "following." msgstr "" "<filename>compat</filename> 檔案定義了 <systemitem role=\"package" "\">debhelper</systemitem> 的兼容級別。目前你應當使用以下命令將其設置爲 " "<systemitem role=\"package\">debhelper</systemitem> V7。" #. type: Content of: <book><chapter><section><screen> #, no-wrap msgid "$ echo 7 > debian/compat\n" msgstr "$ echo 7 > debian/compat\n" #. type: Content of: <book><chapter><section><title> msgid "<filename>conffiles</filename> file" msgstr "<filename>conffiles</filename> 檔案" #. type: Content of: <book><chapter><section><para><footnote><para> #, fuzzy #| msgid "" #| "The <citerefentry> <refentrytitle>dh_installdocs</refentrytitle> " #| "<manvolnum>1</manvolnum> </citerefentry> command installs this." msgid "" "See <citerefentry> <refentrytitle>dpkg</refentrytitle> <manvolnum>1</" "manvolnum> </citerefentry> and <ulink url=\"&policy-conffiles;\">Debian " "Policy Manual 'D.2.5 Conffiles'</ulink>." msgstr "" "<citerefentry> <refentrytitle>dh_installdocs</refentrytitle> <manvolnum>1</" "manvolnum> </citerefentry> 命令會安裝這個檔案。" #. type: Content of: <book><chapter><section><para> #, fuzzy #| msgid "" #| "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 " #| "configuration files so that when you upgrade a package, you'll be " #| "prompted whether you want to keep your old configuration or not." msgid "" "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 prompted whether you want to keep your " "old configuration files or not." msgstr "" "系統管理中有件很惱人的事,就是當你付出了很多時間和經歷來自定義一個程式,但是" "升級後所有的修改都被覆蓋掉了。Debian 通過將設定檔案單獨標記來解決這個問題,當" "套件升級的時候,你將會被詢問是否要保留你的舊設定檔案。" #. type: Content of: <book><chapter><section><para> msgid "" "Since <systemitem role=\"package\">debhelper</systemitem> V3, <citerefentry> " "<refentrytitle>dh_installdeb</refentrytitle> <manvolnum>1</manvolnum> </" "citerefentry> will <emphasis>automatically</emphasis> flag 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 there is (and should be conffiles) is " "under <filename>/etc</filename> and so this file doesn't need to exist." msgstr "" #. type: Content of: <book><chapter><section><para> msgid "" "If your program uses configuration files but also rewrites them on its own, " "it's best not to make them as conffiles because <command>dpkg</command> will " "then prompt users to verify the changes all the time." msgstr "" "如果你的程式使用設定檔案,但程式會自動對設定進行改寫,則最好也將其標記爲設定" "檔案,這樣 <command>dpkg</command> 總是會要求用戶校驗發生了的變更。" #. type: Content of: <book><chapter><section><para> msgid "" "If the program you're packaging requires every user to modify the " "configuration files in the <filename>/etc</filename> directory, there are 2 " "popular ways to make them not as conffiles to keep <command>dpkg</command> " "quiet." msgstr "" "如果你正在打包的程式需要所有用戶都爲自己修改 <filename>/etc</filename> 目錄中" "的設定,有兩種常見的方法讓 <command>dpkg</command> 不將其記錄爲設定檔案。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "You make a symlink under the <filename>/etc</filename> directory pointing to " "a file under the <filename>/var</filename> directory generated by the " "<emphasis>maintainer scripts</emphasis>." msgstr "" "用 <emphasis>maintainer scripts</emphasis> 在 <filename>/etc</filename> 目錄" "中創建指向 <filename>/var</filename> 相關目錄的符號鏈接。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "You make a file generated by the <emphasis>maintainer scripts</emphasis> " "under the <filename>/etc</filename> directory." msgstr "" "用 <emphasis>maintainer scripts</emphasis> 在 <filename>/etc</filename> 目錄" "中生成一個檔案。" #. type: Content of: <book><chapter><section><para> msgid "" "For more information on the <emphasis>maintainer scripts</emphasis>, see " "<xref linkend=\"maintscripts\"/>." msgstr "" "更多關於 <emphasis>maintainer scripts</emphasis> 的訊息,參考 <xref linkend=" "\"maintscripts\"/>" #. type: Content of: <book><chapter><section><title> msgid "<filename><replaceable>package</replaceable>.cron.*</filename> files" msgstr "<filename><replaceable>package</replaceable>.cron.*</filename> 檔案" #. type: Content of: <book><chapter><section><para> msgid "" "If your package requires regularly scheduled tasks to operate properly, you " "can use this file to set it up. You can either setup regular tasks that " "happen hourly, daily, weekly or monthly or alternatively happen any other " "time that you wish. The filenames are:" msgstr "" "如果你的套件需要有計劃運行的操作以保證正常工作,可以使用這個檔案進行設置。既" "可以設置常規的任務使其在每小時、每天、每星期、每月或其他情況或時間下運行。相" "應的檔案名是:" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "<filename>cron.hourly</filename> - Installed as <filename>/etc/cron.hourly/" "<replaceable>package</replaceable></filename>: run once an hour every hour." msgstr "" "<filename>cron.hourly</filename> - 安裝爲 <filename>/etc/cron.hourly/" "<replaceable>package</replaceable></filename>:每小時運行一次。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "<filename>cron.daily</filename> - Installed as <filename>/etc/cron.daily/" "<replaceable>package</replaceable></filename>: run once a day, usually early " "morning." msgstr "" "<filename>cron.daily</filename> - 安裝爲 <filename>/etc/cron.daily/" "<replaceable>package</replaceable></filename>:每天運行一次,通常在早晨。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "<filename>cron.weekly</filename> - Installed as <filename>/etc/cron.weekly/" "<replaceable>package</replaceable></filename>: run once a week, usually " "early Sunday morning." msgstr "" "<filename>cron.weekly</filename> - 安裝爲 <filename>/etc/cron.weekly/" "<replaceable>package</replaceable></filename>:每星期運行一次,通常在星期日早" "晨。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "<filename>cron.monthly</filename> - Installed as <filename>/etc/cron.monthly/" "<replaceable>package</replaceable></filename>: run once a month, usually " "early morning on the first of the month." msgstr "" "<filename>cron.monthly</filename> - 安裝爲 <filename>/etc/cron.monthly/" "<replaceable>package</replaceable></filename>:每月運行一次,通常在該月第一天" "的早晨。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "<filename>cron.d</filename> - Installed as <filename>/etc/cron.d/" "<replaceable>package</replaceable></filename>: for any other time" msgstr "" "<filename>cron.d</filename> - 安裝爲 <filename>/etc/cron.d/" "<replaceable>package</replaceable></filename> 指定的任意時間。" #. type: Content of: <book><chapter><section><para> msgid "" "For the named files, the format of them is the shell script. The different " "one is <filename><replaceable>package</replaceable>.cron.d</filename> which " "follows the format of <citerefentry> <refentrytitle>crontab</refentrytitle> " "<manvolnum>5</manvolnum> </citerefentry>." msgstr "" "對於前幾個檔案,其格式爲 shell 腳本。唯一不同的是 " "<filename><replaceable>package</replaceable>.cron.d</filename>,它的格式需要" "參照 <citerefentry> <refentrytitle>crontab</refentrytitle> <manvolnum>5</" "manvolnum> </citerefentry>" #. type: Content of: <book><chapter><section><para> msgid "" "Note that this doesn't include log rotation; for that, see <citerefentry> " "<refentrytitle>dh_installlogrotate</refentrytitle> <manvolnum>1</manvolnum> " "</citerefentry> and <citerefentry> <refentrytitle>logrotate</refentrytitle> " "<manvolnum>8</manvolnum> </citerefentry>." msgstr "" "注意這裏的操作不包含日誌旋轉,如果需要日誌旋轉,參考 <citerefentry> " "<refentrytitle>dh_installlogrotate</refentrytitle> <manvolnum>1</manvolnum> " "</citerefentry> 和 <citerefentry> <refentrytitle>logrotate</refentrytitle> " "<manvolnum>8</manvolnum> </citerefentry>" #. type: Content of: <book><chapter><section><title> msgid "<filename>dirs</filename> file" msgstr "<filename>dirs</filename> 檔案" #. type: Content of: <book><chapter><section><para> msgid "" "This file specifies the directories which we need but the normal " "installation procedure (<literal>make install DESTDIR=...</literal> invoked " "by <literal>dh_auto_install</literal>) somehow doesn't create. This " "generally means there is a problem with the <filename>Makefile</filename>." msgstr "" "這個檔案指定了我們需要,但正常安裝過程(<literal>dh_auto_install</literal> 觸" "發 <literal>make install DESTDIR=...</literal>)裏沒有被安裝的目錄。通常這是由" "於 <filename>Makefile</filename> 中存在問題。" #. type: Content of: <book><chapter><section><para> msgid "" "Files listed in the <filename>install</filename> file doesn't need the " "directories created first. See <xref linkend=\"install\"/>." msgstr "" "<filename>install</filename> 檔案中列出的檔案不需要提前創建目錄,參考 <xref " "linkend=\"install\"/>" #. type: Content of: <book><chapter><section><para> #, fuzzy #| msgid "" #| "It is best to first try to run the installation first and only use this " #| "if you run into trouble. There is no preceding slash on the directory " #| "names." msgid "" "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." msgstr "" "最好是先嚐試安裝,如果遇到了相關的問題再使用這個檔案。目錄名中不應有前導的 / " "符號。" #. type: Content of: <book><chapter><section><title> msgid "<filename><replaceable>package</replaceable>.doc-base</filename> file" msgstr "<filename><replaceable>package</replaceable>.doc-base</filename> 檔案" #. type: Content of: <book><chapter><section><para> msgid "" "If your package has documentation other than manual pages and info docs, 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>." msgstr "" "如果你的套件在 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> 的工具找到它們。" #. type: Content of: <book><chapter><section><para> msgid "" "This usually includes HTML, PS and PDF files, shipped in <filename>/usr/" "share/doc/<replaceable>packagename</replaceable>/</filename>." msgstr "" "這通常包括 HTML、PS 和 PDF 檔案,放置在 <filename>/usr/share/doc/" "<replaceable>packagename</replaceable>/</filename>。" #. type: Content of: <book><chapter><section><para> msgid "" "This is how <systemitem role=\"package\">gentoo</systemitem>'s doc-base file " "<filename>gentoo.doc-base</filename> looks like:" msgstr "" "以下是 <systemitem role=\"package\">gentoo</systemitem> 的 doc-base 檔案 " "<filename>gentoo.doc-base</filename> 的樣子:" #. type: Content of: <book><chapter><section><screen> #, no-wrap msgid "" "Document: gentoo\n" "Title: Gentoo Manual\n" "Author: Emil Brink\n" "Abstract: This manual describes what Gentoo is, and how it can be used.\n" "Section: File Management\n" "Format: HTML\n" "Index: /usr/share/doc/gentoo/html/index.html\n" "Files: /usr/share/doc/gentoo/html/*.html\n" msgstr "" "Document: gentoo\n" "Title: Gentoo Manual\n" "Author: Emil Brink\n" "Abstract: This manual describes what Gentoo is, and how it can be used.\n" "Section: File Management\n" "Format: HTML\n" "Index: /usr/share/doc/gentoo/html/index.html\n" "Files: /usr/share/doc/gentoo/html/*.html\n" #. type: Content of: <book><chapter><section><para> #, fuzzy #| msgid "" #| "For information on the file format, see <citerefentry> " #| "<refentrytitle>install-docs</refentrytitle> <manvolnum>8</manvolnum> </" #| "citerefentry> and the <systemitem role=\"package\">doc-base</systemitem> " #| "manual, in <filename>/usr/share/doc/doc-base/doc-base.html/</filename>." msgid "" "For information on the file format, see <citerefentry> " "<refentrytitle>install-docs</refentrytitle> <manvolnum>8</manvolnum> </" "citerefentry> and the <systemitem role=\"package\">doc-base</systemitem> " "manual, in <ulink url=\"&doc-base;\">Debian doc-base Manual</ulink>." msgstr "" "關於檔案格式的更多訊息,參考 <citerefentry> <refentrytitle>install-docs</" "refentrytitle> <manvolnum>8</manvolnum> </citerefentry> 和 <filename>/usr/" "share/doc/doc-base/doc-base.html/</filename> 中的 <systemitem role=\"package" "\">doc-base</systemitem> 手冊。" #. type: Content of: <book><chapter><section><para> msgid "" "For more details on installing additional documentation, look in <xref " "linkend=\"destdir\"/>." msgstr "關於安裝附加文件的更多訊息,査看 <xref linkend=\"destdir\"/>。" #. type: Content of: <book><chapter><section><title> msgid "<filename>docs</filename> file" msgstr "<filename>docs</filename> 檔案" #. type: Content of: <book><chapter><section><para> msgid "" "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." msgstr "" "這個檔案制定了我們使用 <citerefentry> <refentrytitle>dh_installdocs</" "refentrytitle> <manvolnum>1</manvolnum> </citerefentry> 安裝到臨時目錄的檔案" "名。" #. type: Content of: <book><chapter><section><para> msgid "" "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." msgstr "" "默認情況下它會加入程式碼目錄頂層的所有名爲 <filename>BUGS</filename>、" "<filename>README*</filename>、<filename>TODO</filename> 等的檔案。" #. type: Content of: <book><chapter><section><para> msgid "" "For <systemitem role=\"package\">gentoo</systemitem>, I also included some " "other files:" msgstr "" "對於 <systemitem role=\"package\">gentoo</systemitem>,我還加入了一些其他檔" "案:" #. type: Content of: <book><chapter><section><screen> #, no-wrap msgid "" "BUGS\n" "CONFIG-CHANGES\n" "CREDITS\n" "NEWS\n" "README\n" "README.gtkrc\n" "TODO\n" msgstr "" "BUGS\n" "CONFIG-CHANGES\n" "CREDITS\n" "NEWS\n" "README\n" "README.gtkrc\n" "TODO\n" #. type: Content of: <book><chapter><section><title> msgid "<filename>emacsen-*</filename> file" msgstr "<filename>emacsen-*</filename> 檔案" #. type: Content of: <book><chapter><section><para> msgid "" "If your package supplies Emacs files that can be bytecompiled at package " "installation time, you can use these files to set it up." msgstr "" "如果你的套件提供可以在安裝時編譯爲字節碼的 Emacs 檔案,你可以使用這些檔案設" "置。" #. type: Content of: <book><chapter><section><para> msgid "" "They are installed into the temporary directory by <citerefentry> " "<refentrytitle>dh_installemacsen</refentrytitle> <manvolnum>1</manvolnum> </" "citerefentry>." msgstr "" "它們會被 <citerefentry> <refentrytitle>dh_installemacsen</refentrytitle> " "<manvolnum>1</manvolnum> </citerefentry> 安裝到臨時目錄。" #. type: Content of: <book><chapter><section><para> msgid "If you don't need these, remove them." msgstr "如果你不需要這些,就刪除它們。" #. type: Content of: <book><chapter><section><title> msgid "<filename><replaceable>package</replaceable>.examples</filename> file" msgstr "<filename><replaceable>package</replaceable>.examples</filename> 檔案" #. type: Content of: <book><chapter><section><para> msgid "" "The <citerefentry> <refentrytitle>dh_installexamples</refentrytitle> " "<manvolnum>1</manvolnum> </citerefentry> command installs files and " "directories listed in this file as example files." msgstr "" "<citerefentry> <refentrytitle>dh_installexamples</refentrytitle> " "<manvolnum>1</manvolnum> </citerefentry> 會將列出的檔案和目錄作爲範例檔案安" "裝。" #. type: Content of: <book><chapter><section><title> msgid "" "<filename><replaceable>package</replaceable>.init</filename> and " "<filename><replaceable>package</replaceable>.default</filename> files" msgstr "" "<filename><replaceable>package</replaceable>.init</filename> 和 " "<filename><replaceable>package</replaceable>.default</filename> 檔案" #. type: Content of: <book><chapter><section><para> msgid "" "If your package is a daemon that needs to be run at the system start-up, " "you've obviously disregarded my initial recommendation, haven't you? :-)" msgstr "" "如果你的套件需要在系統啓動時運行一個守護進程,那麼你顯然沒有按照我最初的建議" "做事,不是嗎? :-)" #. type: Content of: <book><chapter><section><para> #, fuzzy #| msgid "" #| "The <filename><replaceable>package</replaceable>.init</filename> file is " #| "installed as the <filename>/etc/init.d/<replaceable>package</" #| "replaceable></filename> script. Its fairly generic skeleton template is " #| "provided by the <command>dh_make</command> command as <filename>init.d." #| "ex</filename>. You'll likely have to rename and edit it, a lot, while " #| "making sure to provide Filesystem Hierarchy Standard (see <filename>/usr/" #| "share/doc/debian-policy/fhs/</filename>) compliant headers. It gets " #| "installed into the temporary directory by <citerefentry> " #| "<refentrytitle>dh_installinit</refentrytitle> <manvolnum>1</manvolnum> </" #| "citerefentry>." msgid "" "The <filename><replaceable>package</replaceable>.init</filename> file is " "installed as the <filename>/etc/init.d/<replaceable>package</replaceable></" "filename> script for the <emphasis>init script</emphasis> which starts and " "stops a daemon. Its fairly generic skeleton template is provided by the " "<command>dh_make</command> command as <filename>init.d.ex</filename>. " "You'll likely have to rename and edit it, a lot, while making sure to " "provide <ulink url=\"&lsb;\">Linux Standard Base</ulink> (LSB) compliant " "headers. It gets installed into the temporary directory by <citerefentry> " "<refentrytitle>dh_installinit</refentrytitle> <manvolnum>1</manvolnum> </" "citerefentry>." msgstr "" "<filename><replaceable>package</replaceable>.init</filename> 檔案會被安裝爲 " "<filename>/etc/init.d/<replaceable>package</replaceable></filename> 腳本。" "<command>dh_make</command> 創建的 <filename>init.d.ex</filename> 是一個很好的" "骨架檔案。你可能要對其改名並做很多修改,同時還要提供檔案系統層級標準(FHS,參" "考 <filename>/usr/share/doc/debian-policy/fhs/</filename>)所要求的檔案頭。它" "們會被 <citerefentry> <refentrytitle>dh_installinit</refentrytitle> " "<manvolnum>1</manvolnum> </citerefentry> 安裝到臨時目錄。" #. type: Content of: <book><chapter><section><para> msgid "" "The <filename><replaceable>package</replaceable>.default</filename> file " "will be installed into <filename>/etc/default/<replaceable>package</" "replaceable></filename>. This file sets defaults that are sourced by the " "<emphasis>init script</emphasis>. Most times this " "<filename><replaceable>package</replaceable>.default</filename> file is used " "to disable running a daemon, set some default flags or timeouts. If your " "<emphasis>init script</emphasis> has certain <emphasis>settable</emphasis> " "features you want to install these into the <filename><replaceable>package</" "replaceable>.default</filename> file, not the <emphasis>init script</" "emphasis>." msgstr "" #. type: Content of: <book><chapter><section><para> #, fuzzy #| msgid "" #| "If your upstream program has an init file you can either use it or not. " #| "If you don't use their init.d script then create a new one in " #| "<filename>debian/<replaceable>package</replaceable>.init</filename>. " #| "However if the upstream init script looks fine and installs in the right " #| "place you still need to setup 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:" msgid "" "If your upstream program provides a file for the <emphasis>init script</" "emphasis>, you can either use it or not. If you don't use their " "<emphasis>init script</emphasis> then create a new one in " "<filename><replaceable>package</replaceable>.init</filename>. However if " "the upstream <emphasis>init script</emphasis> looks fine and installs in the " "right place you still need to setup 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:" msgstr "" "如果你的上游程式中包含了 init 檔案,你可以選擇是否使用它。如果不使用,則創建" "相應的 <filename>debian/<replaceable>package</replaceable>.init</filename> 檔" "案;如果上游的 init 腳本很好且被安裝到正確的位置,你仍然需要設置 " "<filename>rc*</filename> 符號鏈接。你需要按照以下的方法在 <filename>rules</" "filename> 檔案中覆蓋 <command>dh_installinit</command>:" #. type: Content of: <book><chapter><section><screen> #, no-wrap msgid "" "override_dh_installinit:\n" " dh_installinit --onlyscripts\n" msgstr "" "override_dh_installinit:\n" " dh_installinit --onlyscripts\n" #. type: Content of: <book><chapter><section><para> msgid "If you don't need this, remove the files." msgstr "如果你不需要這些,就刪除它們。" #. type: Content of: <book><chapter><section><title> msgid "<filename>install</filename> file" msgstr "<filename>install</filename> 檔案" #. type: Content of: <book><chapter><section><para><footnote><para> msgid "" "This replaces the deprecated <citerefentry> <refentrytitle>dh_movefiles</" "refentrytitle> <manvolnum>1</manvolnum> </citerefentry> command which is " "configured by the <filename>files</filename> file." msgstr "" "這取代了已經廢棄的 <citerefentry> <refentrytitle>dh_movefiles</" "refentrytitle> <manvolnum>1</manvolnum> </citerefentry> 命令,它本是用 " "<filename>files</filename> 檔案所設定的。" #. type: Content of: <book><chapter><section><para> msgid "" "If there are files that need to be installed into your package but your " "standard <literal>make install</literal> won't do it, you 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 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." msgstr "" "如果你的套件需要標準的 <literal>make install</literal> 沒有安裝的檔案,可以把" "檔案名和目標路徑寫入 <filename>install</filename> 檔案,它們將被 " "<citerefentry> <refentrytitle>dh_install</refentrytitle> <manvolnum>1</" "manvolnum> </citerefentry> 安裝。<placeholder type=\"footnote\" id=\"0\"/> 你" "需要首先檢査要安裝的檔案是否有更有針對性的特定工具會對其進行安裝,例如範例、" "文件應寫在 <filename>docs</filename> 檔案中安裝。" #. type: Content of: <book><chapter><section><para> msgid "" "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 where a binary is forgotten to be installed, the " "<filename>install</filename> file would look like:" msgstr "" "這個 <filename>install</filename> 檔案每行安裝一份檔案,格式上先是相對於編譯" "目錄的源目錄,然後是一個空格,接下來是相對於安裝目錄的目標目錄。假設某個二進" "位檔案沒有被默認安裝,則應在 <filename>install</filename> 檔案添加如下內容:" #. type: Content of: <book><chapter><section><screen> #, no-wrap msgid "src/foo/mybin usr/bin\n" msgstr "src/foo/mybin usr/bin\n" #. type: Content of: <book><chapter><section><para> msgid "" "This will mean when this package is installed, there will be a binary file " "<filename>/usr/bin/mybin</filename>." msgstr "" "這意味着安裝這個套件時將有一個二進位檔案 <filename>/usr/bin/mybin</filename>" #. type: Content of: <book><chapter><section><para> msgid "" "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 build result into multiple binary packages using " "<filename><replaceable>package-1</replaceable>.install</filename>, " "<filename><replaceable>package-2</replaceable>.install</filename>, etc." msgstr "" "當然 <filename>install</filename> 檔案也可以只包含相對的源路徑而不帶目標位" "置。這樣的格式通常用於使用 <filename><replaceable>package-1</replaceable>." "install</filename>、<filename><replaceable>package-2</replaceable>.install</" "filename> 等將大套件分割爲多個二進位套件的情況。" #. type: Content of: <book><chapter><section><para> msgid "" "The <command>dh_install</command> command will fall back to look 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>)." msgstr "" "如果 <command>dh_install</command> 命令沒有在當前目錄(或者你可能使用 " "<literal>--sourcedir</literal> 參數指定的位置)找到檔案,它會回滾至使用 " "<filename>debian/tmp</filename> 目錄。" #. type: Content of: <book><chapter><section><title> msgid "<filename><replaceable>package</replaceable>.info</filename> file" msgstr "<filename><replaceable>package</replaceable>.info</filename> 檔案" #. type: Content of: <book><chapter><section><para> msgid "" "If your package has info pages, you should install them using <citerefentry> " "<refentrytitle>dh_installinfo</refentrytitle> <manvolnum>1</manvolnum> </" "citerefentry> by listing them in the <filename><replaceable>package</" "replaceable>.info</filename> files." msgstr "" "如果你的套件有 info 訊息頁,應該使用 <citerefentry> " "<refentrytitle>dh_installinfo</refentrytitle> <manvolnum>1</manvolnum> </" "citerefentry> 安裝,要安裝的檔案列於 <filename><replaceable>package</" "replaceable>.info</filename> 檔案中。" #. type: Content of: <book><chapter><section><title> msgid "" "<filename>{<replaceable>package</replaceable>.|source/}lintian-overrides</" "filename> files" msgstr "" "<filename>{<replaceable>package</replaceable>.|source/}lintian-overrides</" "filename> 檔案" #. type: Content of: <book><chapter><section><para> #, fuzzy #| msgid "" #| "If <systemitem role=\"package\">lintian</systemitem> reports an erroneous " #| "diagnostics for a case when the policy allows exceptions to some rule, " #| "you can use <filename><replaceable>package</replaceable>.lintian-" #| "overrides</filename> or <filename>source/lintian-overrides</filename> to " #| "quiet it. Please read <filename>/usr/share/doc/lintian/lintian.html/" #| "index.html</filename> and refrain from abusing this." msgid "" "If <systemitem role=\"package\">lintian</systemitem> reports an erroneous " "diagnostics for a case when the policy allows exceptions to some rule, you " "can use <filename><replaceable>package</replaceable>.lintian-overrides</" "filename> or <filename>source/lintian-overrides</filename> to quiet it. " "Please read <ulink url=\"&lintian-doc;\">Lintian User's Manual</ulink> and " "refrain from abusing this." msgstr "" "如果 <systemitem role=\"package\">lintian</systemitem> 報告了一個 Debian " "Policy 允許的例外的錯誤診斷,你可以使用 <filename><replaceable>package</" "replaceable>.lintian-overrides</filename> 或 <filename>source/lintian-" "overrides</filename> 使其不再警告。請閱讀 <filename>/usr/share/doc/lintian/" "lintian.html/index.html</filename> 並應嚴格避免濫用。" #. type: Content of: <book><chapter><section><para> msgid "" "<filename><replaceable>package</replaceable>.lintian-overrides</filename> is " "for the binary package named as <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." msgstr "" "<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>" #. type: Content of: <book><chapter><section><para> msgid "" "<filename>source/lintian-overrides</filename> is for the source package. " "This is not installed." msgstr "" "<filename>source/lintian-overrides</filename> 是針對原始碼套件的,不會安裝。" #. type: Content of: <book><chapter><section><title> msgid "<filename>manpage.*</filename> files" msgstr "<filename>manpage.*</filename> 檔案" #. type: Content of: <book><chapter><section><para> msgid "" "Your program(s) should have a manual page. If they don't, you should create " "them. The <command>dh_make</command> command creates few template files for " "a manual page. These need to be copied and edited for each command without " "its manual page. Please make sure to remove unused templates." msgstr "" "你的程式應該有 man 手冊頁,如果它們沒有自帶則需要由你來創建。" "<command>dh_make</command> 命令創建了幾個 man 手冊頁的模板。它們需要被妥善地" "編輯,並且要刪除未使用的模板。" #. type: Content of: <book><chapter><section><section><title> msgid "<filename>manpage.1.ex</filename> file" msgstr "<filename>manpage.1.ex</filename> 檔案" #. type: Content of: <book><chapter><section><section><para> msgid "" "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." msgstr "" "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> 手冊頁來簡要了解如何編輯這個檔案。" #. type: Content of: <book><chapter><section><section><para> msgid "" "The final manual page file name should include 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:" msgstr "" #. type: Content of: <book><chapter><section><section><table><title> msgid "manual page sections" msgstr "" #. type: Content of: <book><chapter><section><section><table><tgroup><thead><row><entry> msgid "Section" msgstr "" #. type: Content of: <book><chapter><section><section><table><tgroup><thead><row><entry> msgid "Description" msgstr "" #. type: Content of: <book><chapter><section><section><table><tgroup><thead><row><entry> msgid "Notes" msgstr "" #. type: Content of: <book><chapter><section><section><table><tgroup><tbody><row><entry> msgid "1" msgstr "" #. type: Content of: <book><chapter><section><section><table><tgroup><tbody><row><entry> msgid "User command" msgstr "" #. type: Content of: <book><chapter><section><section><table><tgroup><tbody><row><entry> msgid "Executable commands or scripts" msgstr "" #. type: Content of: <book><chapter><section><section><table><tgroup><tbody><row><entry> msgid "2" msgstr "" #. type: Content of: <book><chapter><section><section><table><tgroup><tbody><row><entry> msgid "System calls" msgstr "" #. type: Content of: <book><chapter><section><section><table><tgroup><tbody><row><entry> msgid "Functions provided by the kernel" msgstr "" #. type: Content of: <book><chapter><section><section><table><tgroup><tbody><row><entry> msgid "3" msgstr "" #. type: Content of: <book><chapter><section><section><table><tgroup><tbody><row><entry> #, fuzzy #| msgid "library packages," msgid "Library calls" msgstr "函式庫套件;" #. type: Content of: <book><chapter><section><section><table><tgroup><tbody><row><entry> msgid "Functions within system libraries" msgstr "" #. type: Content of: <book><chapter><section><section><table><tgroup><tbody><row><entry> msgid "4" msgstr "" #. type: Content of: <book><chapter><section><section><table><tgroup><tbody><row><entry> msgid "Special files" msgstr "" #. type: Content of: <book><chapter><section><section><table><tgroup><tbody><row><entry> #, fuzzy #| msgid "Other files under the <filename>debian</filename> directory" msgid "Usually found in <filename>/dev</filename>" msgstr "<filename>debian</filename> 目錄下的其他檔案" #. type: Content of: <book><chapter><section><section><table><tgroup><tbody><row><entry> msgid "5" msgstr "" #. type: Content of: <book><chapter><section><section><table><tgroup><tbody><row><entry> msgid "File formats" msgstr "" #. type: Content of: <book><chapter><section><section><table><tgroup><tbody><row><entry> #, fuzzy #| msgid "<filename>compat</filename> file" msgid "E.g. <filename>/etc/passwd</filename>'s format" msgstr "<filename>compat</filename> 檔案" #. type: Content of: <book><chapter><section><section><table><tgroup><tbody><row><entry> msgid "6" msgstr "" #. type: Content of: <book><chapter><section><section><table><tgroup><tbody><row><entry> msgid "Games" msgstr "" #. type: Content of: <book><chapter><section><section><table><tgroup><tbody><row><entry> msgid "Games or other frivolous programs" msgstr "" #. type: Content of: <book><chapter><section><section><table><tgroup><tbody><row><entry> msgid "7" msgstr "" #. type: Content of: <book><chapter><section><section><table><tgroup><tbody><row><entry> #, fuzzy #| msgid "library packages," msgid "Macro packages" msgstr "函式庫套件;" #. type: Content of: <book><chapter><section><section><table><tgroup><tbody><row><entry> #, fuzzy #| msgid "<command>mc</command> command" msgid "Such as <command>man</command> macros" msgstr "<command>mc</command> 命令" #. type: Content of: <book><chapter><section><section><table><tgroup><tbody><row><entry> msgid "8" msgstr "" #. type: Content of: <book><chapter><section><section><table><tgroup><tbody><row><entry> msgid "System administration" msgstr "" #. type: Content of: <book><chapter><section><section><table><tgroup><tbody><row><entry> msgid "Programs typically only run by root" msgstr "" #. type: Content of: <book><chapter><section><section><table><tgroup><tbody><row><entry> msgid "9" msgstr "" #. type: Content of: <book><chapter><section><section><table><tgroup><tbody><row><entry> msgid "Kernel routines" msgstr "" #. type: Content of: <book><chapter><section><section><table><tgroup><tbody><row><entry> msgid "Non-standard calls and internals" msgstr "" #. type: Content of: <book><chapter><section><section><para> msgid "" "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 edit it by using information from the example and from " "upstream docs." msgstr "" "所以 <systemitem role=\"package\">gentoo</systemitem> 的 man 手冊頁應叫 " "<filename>gentoo.1</filename>。如果原始程式碼中沒有 <filename>gentoo.1</" "filename> man 手冊頁,你需要重命名 <filename>manpage.1.ex</filename> 模板爲 " "<filename>gentoo.1</filename> 並按照範例和上游文件編輯它。" #. type: Content of: <book><chapter><section><section><para><footnote><para> msgid "" "If the command is missing <command>info</command> page but have " "documentation files in the <filename>/usr/share/<replaceable>package</" "replaceable></filename> directory, you should manually edit generated the " "man page created by the <command>help2man</command> command." msgstr "" "如果命令沒有 <command>info</command> 訊息頁但在 <filename>/usr/share/" "<replaceable>package</replaceable></filename> 目錄中有其他文件,你應該手工編" "輯 <command>help2man</command> 命令所創建的 man 手冊頁。" #. type: Content of: <book><chapter><section><section><para> msgid "" "You can use the <command>help2man</command> command to generate a man page " "out of <literal>--help</literal> and <literal>--version</literal> output of " "each program, too. <placeholder type=\"footnote\" id=\"0\"/>" msgstr "" "你也可以使用 <command>help2man</command> 命令來通過程式的 <literal>--help</" "literal> 和 <literal>--version</literal> 參數的輸出創建 man 手冊頁。" "<placeholder type=\"footnote\" id=\"0\"/>" #. type: Content of: <book><chapter><section><section><title> msgid "<filename>manpage.sgml.ex</filename> file" msgstr "<filename>manpage.sgml.ex</filename> 檔案" #. type: Content of: <book><chapter><section><section><para> msgid "" "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:" msgstr "" "如果你希望使用 SGML 而非 <command>nroff</command> 格式編寫 man 手冊頁,可以使" "用 <filename>manpage.sgml.ex</filename> 模板。如果你要這樣,需要進行以下步" "驟:" #. type: Content of: <book><chapter><section><section><itemizedlist><listitem><para> msgid "rename the file to something like <filename>gentoo.sgml</filename>." msgstr "重命名檔案爲類似 <filename>gentoo.sgml</filename> 的名稱。" #. type: Content of: <book><chapter><section><section><itemizedlist><listitem><para> msgid "" "install the <systemitem role=\"package\">docbook-to-man</systemitem> package" msgstr "安裝 <systemitem role=\"package\">docbook-to-man</systemitem> 套件。" #. type: Content of: <book><chapter><section><section><itemizedlist><listitem><para> msgid "" "add <literal>docbook-to-man</literal> to the <literal>Build-Depends</" "literal> line in the <filename>control</filename> file" msgstr "" #. type: Content of: <book><chapter><section><section><itemizedlist><listitem><para> msgid "" "add a <literal>override_dh_auto_build</literal> target to your " "<filename>rules</filename> file:" msgstr "" "在 <filename>rules</filename> 檔案裏添加 <literal>override_dh_auto_build</" "literal> target:" #. type: Content of: <book><chapter><section><section><itemizedlist><listitem><screen> #, no-wrap msgid "" "override_dh_auto_build:\n" " docbook-to-man debian/gentoo.sgml > debian/gentoo.1\n" " dh_auto_build\n" msgstr "" "override_dh_auto_build:\n" " docbook-to-man debian/gentoo.sgml > debian/gentoo.1\n" " dh_auto_build\n" #. type: Content of: <book><chapter><section><section><title> msgid "<filename>manpage.xml.ex</filename> file" msgstr "<filename>manpage.xml.ex</filename> 檔案" #. type: Content of: <book><chapter><section><section><para> msgid "" "If you prefer XML over SGML, you can use the <literal>manpage.xml.ex</" "literal> template. If you do this, you have to:" msgstr "" "如果你希望使用XML 而非 SGML,可以使用 <literal>manpage.xml.ex</literal> 模" "板。如果你要這樣,需要進行以下步驟:" #. type: Content of: <book><chapter><section><section><itemizedlist><listitem><para> msgid "" "rename the source file to something like <literal>gentoo.1.xml</literal>" msgstr "重命名源檔案爲類似 <literal>gentoo.1.xml</literal> 的名稱。" #. type: Content of: <book><chapter><section><section><itemizedlist><listitem><para> msgid "" "install the <systemitem role=\"package\">docbook-xsl</systemitem> package " "and an XSLT processor like <systemitem role=\"package\">xsltproc</" "systemitem> (recommended)" msgstr "" "安裝 <systemitem role=\"package\">docbook-xsl</systemitem> 套件和一個 XSLT 處" "理器,例如 <systemitem role=\"package\">xsltproc</systemitem> (推薦)。" #. type: Content of: <book><chapter><section><section><itemizedlist><listitem><para> msgid "" "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" msgstr "" #. type: Content of: <book><chapter><section><section><itemizedlist><listitem><screen> #, no-wrap msgid "" "override_dh_auto_build:\n" " xsltproc --nonet \\\n" " --param make.year.ranges 1 \\\n" " --param make.single.year.ranges 1 \\\n" " --param man.charmap.use.subset 0 \\\n" " -o debian/ \\\n" " http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl\\\n" " debian/gentoo.1.xml\n" " dh_auto_build\n" msgstr "" "override_dh_auto_build:\n" " xsltproc --nonet \\\n" " --param make.year.ranges 1 \\\n" " --param make.single.year.ranges 1 \\\n" " --param man.charmap.use.subset 0 \\\n" " -o debian/ \\\n" " http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl\\\n" " debian/gentoo.1.xml\n" " dh_auto_build\n" #. type: Content of: <book><chapter><section><title> msgid "<filename><replaceable>package</replaceable>.manpages</filename> file" msgstr "<filename><replaceable>package</replaceable>.manpages</filename> 檔案" #. type: Content of: <book><chapter><section><para> msgid "" "If your package has manual pages, you should install them using " "<citerefentry> <refentrytitle>dh_installman</refentrytitle> <manvolnum>1</" "manvolnum> </citerefentry> by listing them in the " "<filename><replaceable>package</replaceable>.manpages</filename> files." msgstr "" "如果你的套件有 man 手冊頁,你應該將它們列在 <filename><replaceable>package</" "replaceable>.manpages</filename> 檔案中以便 <citerefentry> " "<refentrytitle>dh_installman</refentrytitle> <manvolnum>1</manvolnum> </" "citerefentry> 安裝。" #. type: Content of: <book><chapter><section><para> #, fuzzy #| msgid "" #| "To install <filename>doc/gentoo.1</filename> for the <systemitem role=" #| "\"package\">gentoo</systemitem> package as its manpage, you create a " #| "<filename>gentoo.manpages</filename> file as:" msgid "" "To install <filename>docs/gentoo.1</filename> for the <systemitem role=" "\"package\">gentoo</systemitem> package as its manpage, you create a " "<filename>gentoo.manpages</filename> file as the following." msgstr "" "要將 <filename>doc/gentoo.1</filename> 安裝爲 <systemitem role=\"package" "\">gentoo</systemitem> 的 man 手冊頁,創建一個 <filename>gentoo.manpages</" "filename>,內容如下:" #. type: Content of: <book><chapter><section><screen> #, no-wrap msgid "docs/gentoo.1\n" msgstr "docs/gentoo.1\n" #. type: Content of: <book><chapter><section><title> msgid "<filename>menu</filename> file" msgstr "<filename>menu</filename> 檔案" #. type: Content of: <book><chapter><section><para> msgid "" "X Window System users usually have a window manager with a menu that can be " "customized to launch programs. If they have installed the Debian " "<systemitem role=\"package\">menu</systemitem> package, a set of menus for " "every program on the system will be created for them." msgstr "" "X Windows 系統用戶通常有窗口管理器,並且帶有可定製的菜單用於啓動程式。如果他" "們安裝了 Debian 的 <systemitem role=\"package\">menu</systemitem> 套件,整個" "系統中所有已安裝軟體的一系列菜單將會被自動創建。" #. type: Content of: <book><chapter><section><para> #, fuzzy #| msgid "" #| "Here's the default <filename>menu.ex</filename> file that " #| "<command>dh_make</command> created:" msgid "" "Here's the default <filename>menu.ex</filename> file that <command>dh_make</" "command> created." msgstr "" "以下是 <command>dh_make</command> 創建的默認的 <filename>menu.ex</filename> " "檔案:" #. type: Content of: <book><chapter><section><screen> #, no-wrap msgid "" "?package(gentoo):needs=X11|text|vc|wm \\\n" " section=Applications/see-menu-manual\\\n" " title=gentoo command=/usr/bin/gentoo\n" msgstr "" "?package(gentoo):needs=X11|text|vc|wm \\\n" " section=Applications/see-menu-manual\\\n" " title=gentoo command=/usr/bin/gentoo\n" #. type: Content of: <book><chapter><section><para> msgid "" "The first field after the colon character is <literal>needs</literal>, and " "it specifies what kind of interface the program needs. Change this to one " "of the listed alternatives, e.g. <literal>text</literal> or <literal>X11</" "literal>." msgstr "" "冒號後的第一個欄位是 <literal>needs</literal>,它指定了程式需要何種界面。修改" "此處爲列出的選項之一,例如 <literal>text</literal> 或 <literal>X11</" "literal>。" #. type: Content of: <book><chapter><section><para><footnote><para> msgid "" "The current list of sections is at <ulink url=\"&menu-structure;\">The " "Debian Menu sub-policy 2.1 'Preferred menu structure'</ulink>. There were a " "major reorganization of menu structure for <literal>squeeze</literal>." msgstr "" #. type: Content of: <book><chapter><section><para> #, fuzzy #| msgid "" #| "The next is <literal>section</literal>, where the menu and submenu the " #| "entry should appear in. The current list of sections <placeholder type=" #| "\"footnote\" id=\"0\"/> is at: <filename>/usr/share/doc/debian-policy/" #| "menu-policy.html/ch2.html#s2.1</filename>" msgid "" "The next is <literal>section</literal>, where the menu and submenu entry " "should appear in. <placeholder type=\"footnote\" id=\"0\"/>" msgstr "" "接下來是 <literal>section</literal>,包含菜單和子菜單項。當前可用的章節列表" "<placeholder type=\"footnote\" id=\"0\"/>位於:<filename>/usr/share/doc/" "debian-policy/menu-policy.html/ch2.html#s2.1</filename>" #. type: Content of: <book><chapter><section><para> msgid "" "The <literal>title</literal> field is the name of the program. You can " "start this one in uppercase if you like. Just keep it short." msgstr "" "<literal>title</literal> 欄位是程式的名稱,它可以用大寫字母開頭,只需保證它不" "要很長。" #. type: Content of: <book><chapter><section><para> msgid "" "Finally, the <literal>command</literal> field is the command that runs the " "program." msgstr "最後的 <literal>command</literal> 欄位是運行此程式時使用的命令。" #. type: Content of: <book><chapter><section><para> msgid "" "Let's change the file name to <filename>menu</filename> and change the menu " "entry to this:" msgstr "我們把檔案名修改爲 <filename>menu</filename>,並修改其內容爲:" #. type: Content of: <book><chapter><section><screen> #, no-wrap msgid "" "?package(gentoo): needs=X11 \\\n" " section=Applications/Tools \\\n" " title=Gentoo command=gentoo\n" msgstr "" "?package(gentoo): needs=X11 \\\n" " section=Applications/Tools \\\n" " title=Gentoo command=gentoo\n" #. type: Content of: <book><chapter><section><para> #, fuzzy #| msgid "" #| "You can also add other fields like <literal>longtitle</literal>, " #| "<literal>icon</literal>, <literal>hints</literal> etc. See " #| "<citerefentry> <refentrytitle>dh_installmenu</refentrytitle> " #| "<manvolnum>1</manvolnum> </citerefentry>, <citerefentry> " #| "<refentrytitle>menufile</refentrytitle> <manvolnum>5</manvolnum> </" #| "citerefentry>, <citerefentry> <refentrytitle>update-menus</refentrytitle> " #| "<manvolnum>1</manvolnum> </citerefentry> and <filename>/usr/share/doc/" #| "debian-policy/menu-policy.html/</filename> for more information." msgid "" "You can also add other fields like <literal>longtitle</literal>, " "<literal>icon</literal>, <literal>hints</literal> etc. See <citerefentry> " "<refentrytitle>dh_installmenu</refentrytitle> <manvolnum>1</manvolnum> </" "citerefentry>, <citerefentry> <refentrytitle>menufile</refentrytitle> " "<manvolnum>5</manvolnum> </citerefentry>, <citerefentry> " "<refentrytitle>update-menus</refentrytitle> <manvolnum>1</manvolnum> </" "citerefentry> and <ulink url=\"&menu-policy;\">The Debian Menu sub-policy</" "ulink> for more information." msgstr "" "你還可以添加諸如 <literal>longtitle</literal>、<literal>icon</literal>、" "<literal>hints</literal> 等欄位。參考 <citerefentry> " "<refentrytitle>dh_installmenu</refentrytitle> <manvolnum>1</manvolnum> </" "citerefentry>、<citerefentry> <refentrytitle>menufile</refentrytitle> " "<manvolnum>5</manvolnum> </citerefentry>、<citerefentry> " "<refentrytitle>update-menus</refentrytitle> <manvolnum>1</manvolnum> </" "citerefentry> 和 <filename>/usr/share/doc/debian-policy/menu-policy.html/</" "filename> 瞭解更多訊息。" #. type: Content of: <book><chapter><section><title> msgid "<filename>NEWS</filename> file" msgstr "<filename>NEWS</filename> 檔案" #. type: Content of: <book><chapter><section><para> msgid "" "The <citerefentry> <refentrytitle>dh_installchangelogs</refentrytitle> " "<manvolnum>1</manvolnum> </citerefentry> command installs this." msgstr "" "<citerefentry> <refentrytitle>dh_installchangelogs</refentrytitle> " "<manvolnum>1</manvolnum> </citerefentry> 命令會安裝這個檔案。" #. type: Content of: <book><chapter><section><title> msgid "<filename>{post|pre}{inst|rm}</filename> files" msgstr "<filename>{post|pre}{inst|rm}</filename> 檔案" #. type: Content of: <book><chapter><section><para><footnote><para> msgid "" "Although I used Bash short hand expression to indicate these files as " "<filename>{post|pre}{inst|rm}</filename> here, I recommend you to use pure " "POSIX (non-Bash) shell for these <emphasis>maintainer scripts</emphasis> as " "much as possible for the better compatibility." msgstr "" "儘管我使用了 Bash 短表達式在此處指出這些檔案是 <filename>{post|pre}{inst|rm}" "</filename>,但仍然建議你在這些 <emphasis>maintainer scripts</emphasis> 中儘" "可能地使用純粹的 POSIX (非 Bash)腳本來提供最佳的兼容性。" #. type: Content of: <book><chapter><section><para> msgid "" "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." msgstr "" "<filename>postinst</filename>、<filename>preinst</filename>、" "<filename>postrm</filename> 和 <filename>prerm</filename> 檔案 <placeholder " "type=\"footnote\" id=\"0\"/> 被稱爲 <emphasis>maintainer scripts</emphasis>。" "它們是放置於套件控制訊息區域,並由 <command>dpkg</command> 在套件安裝、升級或" "反安裝時執行的腳本。" #. type: Content of: <book><chapter><section><para> msgid "" "As a novice maintainer, you should avoid any manual editing of " "<emphasis>maintainer scripts</emphasis> because they are problematic. For " "more information look in the <ulink url=\"&policy-mantainerscripts;\">Debian " "Policy Manual, 6 'Package maintainer scripts and installation procedure'</" "ulink>, and take a look at these example files provided by <command>dh_make</" "command>." msgstr "" "作爲一個新維護人員,你應當避免手工編輯 <emphasis>maintainer scripts</" "emphasis>,因爲它們常存在各種問題。更多訊息請閱讀 <ulink url=\"&policy-" "mantainerscripts;\">Debian Policy Manual, 6 'Package maintainer scripts and " "installation procedure'</ulink> 並査看 <command>dh_make</command> 給出的範" "例。" #. type: Content of: <book><chapter><section><para> msgid "" "If you did not listen to me and made your custom <emphasis>maintainer " "scripts</emphasis> 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>." msgstr "" "如果你不聽我的勸告,自己爲一個套件創建了 <emphasis>maintainer scripts</" "emphasis>,你必須保證不僅測試 <emphasis role=\"strong\">install</emphasis> " "和 <emphasis role=\"strong\">upgrade</emphasis>,還應測試 <emphasis role=" "\"strong\">remove</emphasis> 和 <emphasis role=\"strong\">purge</emphasis>。" #. type: Content of: <book><chapter><section><para> msgid "" "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 there perhaps are new features)." msgstr "" "升級到新版本應當是靜默的(已有用戶應當只在發現舊的 Bug 被修復或有新特性時注意" "到升級的變化)。" #. type: Content of: <book><chapter><section><para> msgid "" "When the upgrade is necessarily intrusive (eg., config files scattered " "through various home directories with totally different structure), you may " "consider to set package to the safe default (e.g., disabled service) and " "provide proper documentations required by the policy (<filename>README." "Debian</filename> and <filename>NEWS.Debian</filename>) as the last resort. " "Don't bother user with the <command>debconf</command> note invoked from " "these <emphasis>maintainer scripts</emphasis> for upgrades." msgstr "" "當更新必須以非靜默模式進行時(例如多個主目錄中的設定檔案都要改爲完全不同的結構" "時),你應該考慮將套件設置到安全的默認設定(例如禁用服務)並按照 Debian Policy " "提供相應的文件(<filename>README.Debian</filename> 和 <filename>NEWS.Debian</" "filename>)。不要在升級時使用 <emphasis>maintainer scripts</emphasis> 觸發 " "<command>debconf</command> 來打擾用戶。" #. type: Content of: <book><chapter><section><para> msgid "" "The <systemitem role=\"package\">ucf</systemitem> package provides " "<emphasis>conffile-like</emphasis> handling infrastructure to preserve user " "changes for files that may not be labeled <emphasis>conffiles</emphasis> " "such as ones managed by the <emphasis>maintainer scripts</emphasis>. This " "should minimize issues associated with them." msgstr "" "<systemitem role=\"package\">ucf</systemitem> 套件提供了 <emphasis>類似 " "conffile</emphasis> 的對不應標記爲 <emphasis>conffiles</emphasis> 的檔案的保" "留機制。這可以將與 <emphasis>maintainer scripts</emphasis> 相關的問題減少到最" "低。" #. type: Content of: <book><chapter><section><para> msgid "" "These <emphasis>maintainer scripts</emphasis> are the Debian enhancements " "that explain <emphasis role=\"strong\">why people choose Debian</emphasis>. " "You must be very careful not to annoy them with these." msgstr "" "這些 <emphasis>maintainer scripts</emphasis> 是 Debian 對於軟體系統的增強特" "性,它們解釋了 <emphasis role=\"strong\">人們爲什麼選擇 Debian</emphasis>。你" "必須非常小心,保證人們不因此產生煩惱。" #. type: Content of: <book><chapter><section><title> msgid "<filename>TODO</filename> file" msgstr "<filename>TODO</filename> 檔案" #. type: Content of: <book><chapter><section><para> msgid "" "The <citerefentry> <refentrytitle>dh_installdocs</refentrytitle> " "<manvolnum>1</manvolnum> </citerefentry> command installs this." msgstr "" "<citerefentry> <refentrytitle>dh_installdocs</refentrytitle> <manvolnum>1</" "manvolnum> </citerefentry> 命令會安裝這個檔案。" #. type: Content of: <book><chapter><section><title> msgid "<filename>watch</filename> file" msgstr "<filename>watch</filename> 檔案" #. type: Content of: <book><chapter><section><para> msgid "" "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 from. This is also used by <ulink url=\"&dehs;\">Debian " "External Health Status (DEHS)</ulink>." msgstr "" "<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=\"&dehs;" "\">Debian External Health Status (DEHS)</ulink>。" #. type: Content of: <book><chapter><section><para> msgid "Here's what I put in it:" msgstr "以下是我寫入的內容:" #. type: Content of: <book><chapter><section><screen> #, no-wrap msgid "" "# watch control file for uscan\n" "version=3\n" "&sf-net;/gentoo/gentoo-(.+)\\.tar\\.gz debian uupdate\n" msgstr "" "# watch control file for uscan\n" "version=3\n" "&sf-net;/gentoo/gentoo-(.+)\\.tar\\.gz debian uupdate\n" #. type: Content of: <book><chapter><section><para> #, fuzzy #| msgid "" #| "Normally with this <filename>watch</filename> file, the URL at " #| "<literal>&sf-net;/gentoo</literal> is downloaded and searched for links " #| "of the form <literal><a href=...></literal>. The base name (just " #| "the part after the final <literal>/</literal>) of these linked URLs are " #| "matched against Perl regexp (see <citerefentry> <refentrytitle>perlre</" #| "refentrytitle> <manvolnum>1</manvolnum> </citerefentry>) pattern " #| "<literal>gentoo-(.+)\\.tar\\.gz</literal>. Out of matched files, the " #| "file with the greatest version number is downloaded and the " #| "<command>uupdate</command> program is run to create the updated source " #| "tree from them." msgid "" "Normally with this <filename>watch</filename> file, the URL at <literal>&sf-" "net;/gentoo</literal> is downloaded and searched for links of the form " "<literal><a href=...></literal>. The base name (just the part after " "the final <literal>/</literal>) of these linked URLs are matched against " "Perl regular expression (see <citerefentry> <refentrytitle>perlre</" "refentrytitle> <manvolnum>1</manvolnum> </citerefentry>) pattern " "<literal>gentoo-(.+)\\.tar\\.gz</literal>. Out of matched files, the file " "with the greatest version number is downloaded and the <command>uupdate</" "command> program is run to create the updated source tree from them." msgstr "" "通常,在按照這個 <filename>watch</filename> 檔案執行時,URL <literal>&sf-" "net;/gentoo</literal> 會被下載,程式在其中搜搜 <literal><a href=...></" "literal>。<literal>/</literal> 後的基本名稱會按照 Perl 正則表達式匹配(參考 " "<citerefentry> <refentrytitle>perlre</refentrytitle> <manvolnum>1</" "manvolnum> </citerefentry>) <literal>gentoo-(.+)\\.tar\\.gz</literal>。在所" "有匹配的檔案裏,將會下載帶有最大版本號的,此後由 <command>uupdate</command> " "程式創建更新的原始碼樹。" #. type: Content of: <book><chapter><section><para> #, fuzzy #| msgid "" #| "Although this is true for other sites, the SourceForge download service " #| "at <ulink url=\"&sf-net;\">&sf-net;</ulink> is an exception. When the " #| "<filename>watch</filename> file has an URL matching with the Perl regexp " #| "<literal>^http://sf\\.net/</literal>, the <command>uscan</command> " #| "program substitutes it with <literal>&qa-do;watch/sf.php/</literal> and " #| "then applies this rule. The URL redirector service at this <ulink url=" #| "\"&qa-do;\">&qa-do;</ulink> is designed to offer a stable redirect " #| "service to the desired file for the <filename>watch</filename> file " #| "having <literal>&sf-net;/<replaceable>project</replaceable>/" #| "<replaceable>tar-name</replaceable>-(.+)\\.tar\\.gz</literal>. This " #| "solves issues related to the periodically changing URL there." msgid "" "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 an URL matching with the Perl regexp <literal>^http://sf" "\\.net/</literal>, the <command>uscan</command> program substitutes it with " "<literal>&qa-do;watch/sf.php/</literal> and then applies this rule. The URL " "redirector service at this <ulink url=\"&qa-do;\"/> is designed to offer a " "stable redirect service to the desired file for the <filename>watch</" "filename> file having <literal>&sf-net;/<replaceable>project</replaceable>/" "<replaceable>tar-name</replaceable>-(.+)\\.tar\\.gz</literal>. This solves " "issues related to the periodically changing URL there." msgstr "" "儘管上述內容對於所有站點都適用,但 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> 形式,這樣解決了關於經常性 URL " "變更導致的問題。" #. type: Content of: <book><chapter><section><title> msgid "<filename>source/format</filename> file" msgstr "<filename>source/format</filename> 檔案" #. type: Content of: <book><chapter><section><para> msgid "" "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:" msgstr "" "在 <filename>debian/source/format</filename> 中只包含一行,寫明瞭此原始碼套件" "的格式(査看 <citerefentry> <refentrytitle>dpkg-source</refentrytitle> " "<manvolnum>1</manvolnum> </citerefentry> 獲得完整列表)。在 <literal>squeeze</" "literal> 後,它應該是以下二者之一:" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "<literal>3.0 (native)</literal> for Debian native packages or" msgstr "<literal>3.0 (native)</literal> - Debian native 軟體" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "<literal>3.0 (quilt)</literal> for everything else." msgstr "<literal>3.0 (quilt)</literal> - 其他所有軟體" #. type: Content of: <book><chapter><section><para><footnote><para> msgid "" "See <ulink url=\"&debsrc3;\">DebSrc3.0</ulink> for the summary information " "concerning the switch to the new <literal>3.0 (quilt)</literal> and " "<literal>3.0 (native)</literal> source formats." msgstr "" "參考 <ulink url=\"&debsrc3;\">DebSrc3.0</ulink> 瞭解轉換到新的 <literal>3.0 " "(quilt)</literal> 和 <literal>3.0 (native)</literal> 原始碼格式時的總結考慮。" #. type: Content of: <book><chapter><section><para><footnote><para> msgid "" "Actually, this new format also supports multiple upstream tarballs and more " "compression methods. These are beyond the scope of this document." msgstr "" "實際上新格式還支持多個上游 tarball 和更多的壓縮方法,但這已超出本文件講述的範" "圍。" #. type: Content of: <book><chapter><section><para> msgid "" "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\"/>" msgstr "" "全新的 <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\"/>" #. type: Content of: <book><chapter><section><para> msgid "" "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." msgstr "" "<command>dpkg-source</command> 解壓 <literal>3.0 (quilt)</literal> 格式的源碼" "包時會自動應用所有列於 <filename>debian/patches/series</filename> 的補丁。你" "可以使用 <literal>--skip-patches</literal> 選項避免在解壓後自動應用補丁。" #. type: Content of: <book><chapter><section><title> msgid "<filename>source/local-options</filename> file" msgstr "<filename>source/local-options</filename> 檔案" #. type: Content of: <book><chapter><section><para> msgid "" "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." msgstr "" "如果你希望使用版本控制系統(VCS)時,你可以創建一個分支(例如叫做 " "<literal>upstream</literal>) 來跟蹤上游程式碼(對於 Git 而言典型的是 " "<literal>master</literal> 分支),和另一個分支來跟蹤你的 Debian 套件。對於後" "者,通常會將未應用補丁的上游程式碼和你的 <filename>debian/*</filename> 檔案放" "在一起以便容易合併上游的新程式碼。" #. type: Content of: <book><chapter><section><para> #, fuzzy #| msgid "" #| "After you build a package, the source is normally left patched. You need " #| "to unpatch it manually by running <literal>quilt 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>)." msgid "" "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>)." msgstr "" "在編譯套件之後,原始碼通常會被保持在應用補丁後的狀態。你需要手工執行 " "<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>)。" #. type: Content of: <book><chapter><section><screen> #, no-wrap msgid "" "unapply-patches\n" "abort-on-upstream-changes\n" msgstr "" #. type: Content of: <book><chapter><section><title> #, fuzzy #| msgid "<filename>source/local-options</filename> file" msgid "<filename>source/options</filename> file" msgstr "<filename>source/local-options</filename> 檔案" #. type: Content of: <book><chapter><section><para> msgid "" "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\"/>." msgstr "" #. type: Content of: <book><chapter><section><para> #, fuzzy #| msgid "" #| "You must test your package if it installs without problem. The " #| "<citerefentry> <refentrytitle>debi</refentrytitle> <manvolnum>1</" #| "manvolnum> </citerefentry> command helps you to test to install all the " #| "generated binary packages." msgid "" "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." msgstr "" "你必須測試你的套件看是否存在安裝問題。<citerefentry> <refentrytitle>debi</" "refentrytitle> <manvolnum>1</manvolnum> </citerefentry> 命令可以幫助你測試生" "成的二進位套件。" #. type: Content of: <book><chapter><section><para> msgid "" "You can store such <command>dpkg-source</command> option argument in the " "<filename>source/options</filename> file of the source package as the " "generic solution to address this problem of the autogenerated files. The " "following will skip creating patch files for <filename>config.sub</" "filename>, <filename>config.guess</filename> and <filename>Makefile</" "filename>." msgstr "" #. type: Content of: <book><chapter><section><screen> #, no-wrap msgid "extend-diff-ignore = \"(^|/)(config\\.sub|config\\.guess|Makefile)$\"\n" msgstr "" #. type: Content of: <book><chapter><section><title> msgid "<filename>patches/*</filename> files" msgstr "<filename>patches/*</filename> 檔案" #. type: Content of: <book><chapter><section><para> msgid "" "The old <literal>1.0</literal> source format created a single large " "<filename>diff.gz</filename> file which contains package maintenance files " "in <filename>debian</filename> and patch files to the source. Such a " "package is a bit cumbersome to inspect and understand for each source tree " "modification later. This is not so nice." msgstr "" "舊的 <literal>1.0</literal> 原始碼套件格式使用單一的大 <filename>diff.gz</" "filename> 檔案保存 <filename>debian</filename> 檔案夾和補丁。這樣的套件比較難" "於在事後檢査和分析。這不是很好。" #. type: Content of: <book><chapter><section><para><footnote><para> msgid "" "Several methods for the patch set maintenance have been proposed and are in " "use with Debian packages. The <command>quilt</command> system is the " "preferred maintenance system in use. Other ones are <command>dpatch</" "command>, <command>dbs</command>, <command>cdbs</command>, etc. Many of " "these keep such patches as <filename>debian/patches/*</filename> files." msgstr "" #. type: Content of: <book><chapter><section><para> msgid "" "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 " "constrained 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 to " "<literal>Build-Depends</literal> on the <systemitem role=\"package\">quilt</" "systemitem> package. <placeholder type=\"footnote\" id=\"0\"/>" msgstr "" #. type: Content of: <book><chapter><section><para><footnote><para> msgid "" "If you are asking a sponsor to upload your package, this kind of clear " "separation and documentation of your changes are very important to expedite " "the package review by your sponsor." msgstr "" "如果你需要一個 sponsor 上傳你的套件,這種情況下,清晰的套件分解和對你做出的更" "改的描述對於套件的審査都非常重要。" #. type: Content of: <book><chapter><section><para> msgid "" "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 are " "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\"/>" msgstr "" "<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\"/>" #. type: Content of: <book><chapter><section><para> msgid "" "For <xref linkend=\"modify\"/>, we created 3 patches in <filename>debian/" "patches</filename>." msgstr "" "在 <xref linkend=\"modify\"/> 中,我們在 <filename>debian/patches</filename> " "創建了三個補丁。" #. type: Content of: <book><chapter><section><para> #, fuzzy #| msgid "" #| "Since Debian patches are located in <filename>debian/patches</filename>, " #| "please make sure to setup the <command>quilt</command> command properly " #| "as described in <xref linkend=\"quiltrc\"/>." msgid "" "Since Debian patches are located in <filename>debian/patches</filename>, " "please make sure to setup the <command>dquilt</command> command properly as " "described in <xref linkend=\"quiltrc\"/>." msgstr "" "因爲 Debian 補丁位於 <filename>debian/patches</filename>,請確定按照 <xref " "linkend=\"quiltrc\"/> 中的方法正確設定 <command>quilt</command>。" #. type: Content of: <book><chapter><section><para> msgid "" "When someone (including yourself) provides you with a patch " "<filename><replaceable>foo</replaceable>.patch</filename> to the source " "later, then the modification of a <literal>3.0 (quilt)</literal> source " "package is quite simple:" msgstr "" "如果在之後有人提供了一個補丁 <filename><replaceable>foo</replaceable>.patch</" "filename>,對於 <literal>3.0 (quilt)</literal> 原始碼套件格式可以很容易修改:" #. type: Content of: <book><chapter><section><screen> #, fuzzy, no-wrap #| msgid "" #| "$ dpkg-source -x gentoo_0.9.12.dsc\n" #| "$ cd gentoo-0.9.12\n" #| "$ quilt import ../<replaceable>foo</replaceable>.patch\n" #| "$ quilt push\n" #| "$ quilt refresh\n" #| "$ quilt header -e\n" #| "... describe patch\n" msgid "" "$ dpkg-source -x gentoo_0.9.12.dsc\n" "$ cd gentoo-0.9.12\n" "$ dquilt import ../<replaceable>foo</replaceable>.patch\n" "$ dquilt push\n" "$ dquilt refresh\n" "$ dquilt header -e\n" "... describe patch\n" msgstr "" "$ dpkg-source -x gentoo_0.9.12.dsc\n" "$ cd gentoo-0.9.12\n" "$ quilt import ../<replaceable>foo</replaceable>.patch\n" "$ quilt push\n" "$ quilt refresh\n" "$ quilt header -e\n" "... describe patch\n" #. type: Content of: <book><chapter><section><para> #, fuzzy #| msgid "" #| "The patches stored in the newer <literal>3.0 (quilt)</literal> source " #| "format must be <emphasis>fuzz</emphasis> free. You should ensure it as " #| "<literal>quilt pop -a; while quilt push; do quilt refresh; done</literal>." msgid "" "The patches stored in the newer <literal>3.0 (quilt)</literal> source format " "must be <emphasis>fuzz</emphasis> free. You should ensure it as " "<literal>dquilt pop -a; while dquilt push; do dquilt refresh; done</literal>." msgstr "" "存儲於新的 <literal>3.0 (quilt)</literal> 原始碼套件格式的補丁必須有 " "<emphasis>清晰的邊界</emphasis>。你應該通過 <literal>quilt pop -a; while " "quilt push; do quilt refresh; done</literal> 來驗證這點。" #. type: Content of: <book><chapter><title> msgid "Building the package" msgstr "構建套件" #. type: Content of: <book><chapter><para> msgid "We should now be ready to build the package." msgstr "現在我們已經爲構建套件做好了準備。" #. type: Content of: <book><chapter><section><title> msgid "Complete (re)build" msgstr "完整的(重)構建" #. type: Content of: <book><chapter><section><para> msgid "" "In order to properly make complete (re)build of a package, you have to " "ensure to install" msgstr "爲保證完整的套件(重)構建能順利進行,你必須保證系統中已經安裝:" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "the <systemitem role=\"package\">build-essential</systemitem> package," msgstr "<systemitem role=\"package\">build-essential</systemitem> 套件;" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "packages listed in the <literal>Build-Depends</literal> field (see <xref " "linkend=\"control\"/>), and" msgstr "" "列於 <literal>Build-Depends</literal> 欄位的套件(參考 <xref linkend=\"control" "\"/>);" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "packages listed in the <literal>Build-Depends-indep</literal> field (see " "<xref linkend=\"control\"/>)." msgstr "" "列於 <literal>Build-Depends-indep</literal> 欄位的套件(參考 <xref linkend=" "\"control\"/>)。" #. type: Content of: <book><chapter><section><para> msgid "Then you issue the following command in the source directory:" msgstr "然後在原始碼目錄中執行以下命令:" #. type: Content of: <book><chapter><section><screen> #, no-wrap msgid "$ dpkg-buildpackage\n" msgstr "$ dpkg-buildpackage\n" #. type: Content of: <book><chapter><section><para> msgid "" "This will do everything to make full binary and source packages for you. It " "will:" msgstr "這樣會自動完成所有從原始碼套件構建二進位套件的工作,包括:" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "clean the source tree (<literal>debian/rules clean</literal>)" msgstr "清理原始碼樹(<literal>debian/rules clean</literal>)" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "build the source package (<literal>dpkg-source -b</literal>)" msgstr "構建原始碼套件(<literal>dpkg-source -b</literal>)" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "build the program (<literal>debian/rules build</literal>)" msgstr "構建程式(<literal>debian/rules build</literal>)" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "build binary packages (<literal>fakeroot debian/rules binary</literal>)" msgstr "構建二進位套件(<literal>fakeroot debian/rules binary</literal>)" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "sign the source <filename>.dsc</filename> file, using <command>gpg</command>" msgstr "使用 <command>gpg</command> 簽署 <filename>.dsc</filename> 檔案" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "create and sign the upload <filename>.changes</filename> file, using " "<command>dpkg-genchanges</command> and <command>gpg</command>" msgstr "" "使用 <command>dpkg-genchanges</command> 和 <command>gpg</command> 創建並簽署" "上傳用的 <filename>.changes</filename> 檔案" #. type: Content of: <book><chapter><section><para><footnote><para> msgid "" "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>." msgstr "" #. type: Content of: <book><chapter><section><para> #, fuzzy #| msgid "" #| "The only input that will be required of you is your GPG secret pass " #| "phrase, twice." msgid "" "The only input that will be required of you is your GPG secret pass phrase, " "twice. <placeholder type=\"footnote\" id=\"0\"/>" msgstr "這個過程中你需要做的就是輸入兩次你的 GPG 私鑰密碼。" #. type: Content of: <book><chapter><section><para> msgid "" "After all this is done, you will see the following files in the directory " "above (<filename>~/gentoo</filename>):" msgstr "之後査看上級目錄(<filename>~/gentoo</filename>):" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "<filename>gentoo_0.9.12.orig.tar.gz</filename>" msgstr "<filename>gentoo_0.9.12.orig.tar.gz</filename>" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "This is the original source code tarball, merely renamed to the above so " "that it adheres to the Debian standard. Note that this was created " "initially by the <literal>dh_make -f ../gentoo-0.9.12.tar.gz</literal>." msgstr "" "這是原始的原始碼 tarball,由 <literal>dh_make -f ../gentoo-0.9.12.tar.gz</" "literal> 命令重命名以符合 Debian 的標準。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "<filename>gentoo_0.9.12-1.dsc</filename>" msgstr "<filename>gentoo_0.9.12-1.dsc</filename>" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "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>. This file is GPG signed, so that " "people can be sure that it's really yours." msgstr "" "這是一個從 <filename>control</filename> 檔案生成的原始碼概要,可用於 " "<citerefentry> <refentrytitle>dpkg-source</refentrytitle> <manvolnum>1</" "manvolnum> </citerefentry> 程式。這個檔案是使用 GPG 簽署過的,以便別人可以確" "信它確實是你所提供的。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "<filename>gentoo_0.9.12-1.debian.tar.gz</filename>" msgstr "<filename>gentoo_0.9.12-1.debian.tar.gz</filename>" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "This compressed tarball contains your <filename>debian</filename> directory " "contents. Each and every addition you made to the original source code are " "stored as <command>quilt</command> patches in <filename>debian/patches</" "filename>." msgstr "" "這個壓縮的 Tar 歸檔包含你的 <filename>debian</filename> 目錄。其他對於原始碼" "的修改都由 <command>quilt</command> 補丁存儲於 <filename>debian/patches</" "filename> 中。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para><footnote><para> #, fuzzy #| msgid "" #| "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>quilt pop -a</literal> after normal operation." msgid "" "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." msgstr "" "你可以使用 <literal>--skip-patches</literal> 選項來在正常的是否操作後避免應" "用 <literal>3.0 (quilt)</literal> 原始碼套件格式中的 <command>quilt</" "command> 補丁。你也可以在正常解壓後使用 <literal>quilt pop -a</literal> 恢復" "這些補丁對源碼的修改。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "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\"/>" msgstr "" "如果其他人想要重新構建你的套件,他們可以使用以上三個檔案很容易地完成。只需複" "製三個檔案,再運行 <literal>dpkg-source -x gentoo_0.9.12-1.dsc</literal>。 " "<placeholder type=\"footnote\" id=\"0\"/>" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "<filename>gentoo_0.9.12-1_i386.deb</filename>" msgstr "<filename>gentoo_0.9.12-1_i386.deb</filename>" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "This is your completed binary package. You can use <command>dpkg</command> " "to install and remove this just like any other package." msgstr "" "這是你的二進位套件,可以使用 <command>dpkg</command> 程式安裝或反安裝它,就像" "其他套件一樣。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "<filename>gentoo_0.9.12-1_i386.changes</filename>" msgstr "<filename>gentoo_0.9.12-1_i386.changes</filename>" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "This file describes all the changes made in the current package revision, " "and it is used by the Debian FTP archive maintenance programs to install the " "binary and source packages in it. It is partly generated from the " "<filename>changelog</filename> file and the <filename>.dsc</filename> file. " "This file is GPG signed, so that people can be sure that it's really yours." msgstr "" "這個檔案描述了當前版本的套件中的全部變更,它被 Debian FTP 倉庫維護程式用於安" "裝二進位和原始碼套件。它的是部分從 <filename>changelog</filename> 和 " "<filename>.dsc</filename> 檔案生成的,並使用 GPG 簽名以便別人可以確信它確實是" "你提供的。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "As you keep working on the package, 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-announce-" "ldo;\">debian-devel-announce@lists.debian.org</ulink> mailing list." msgstr "" "隨着你不斷完善這個套件,程式的行爲會發生變化,也會有更多新特性添加進來。下載" "你套件的人可以査看這個檔案來快速找到有那些變化,Debian 倉庫維護程式還會把它的" "內容發表至 <ulink url=\"&debian-devel-announce-ldo;\">debian-devel-" "announce@lists.debian.org</ulink> 郵件列表。" #. type: Content of: <book><chapter><section><para> msgid "" "The long strings of numbers in the <filename>.dsc</filename> and <filename>." "changes</filename> files are MD5/SHA1/SHA256 checksums for the files " "mentioned. A person downloading your files can test them with " "<citerefentry> <refentrytitle>md5sum</refentrytitle> <manvolnum>1</" "manvolnum> </citerefentry>, <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." msgstr "" "<filename>.dsc</filename> 和 <filename>.changes</filename> 檔案中很長的數字串" "是其中提及檔案的 MD5/SHA1/SHA256 校驗和。下載你套件的人可以使用 " "<citerefentry> <refentrytitle>md5sum</refentrytitle> <manvolnum>1</" "manvolnum> </citerefentry>、<citerefentry> <refentrytitle>sha1sum</" "refentrytitle> <manvolnum>1</manvolnum> </citerefentry> 或 <citerefentry> " "<refentrytitle>sha256sum</refentrytitle> <manvolnum>1</manvolnum> </" "citerefentry> 來進行覈對。如果校驗和不符,則說明檔案已被損壞或偷換。" #. type: Content of: <book><chapter><section><title> msgid "Autobuilder" msgstr "自動編譯系統" #. type: Content of: <book><chapter><section><para><footnote><para> msgid "" "The actual autobuilder system involves much more complicated schemes than " "the one documented here. Such details are beyond the scope of this document." msgstr "" #. type: Content of: <book><chapter><section><para> msgid "" "Debian supports many <ulink url=\"&ports;\">ports</ulink> with the <ulink " "url=\"&buildd;\">autobuilder network</ulink> running <command>buildd</" "command> daemons on many different architecture computers. Although you do " "not need to do this by yourself, you should be aware of what will happen on " "your packages. Let's look into roughly how your packages are rebuild for " "many different architectures by them. <placeholder type=\"footnote\" id=" "\"0\"/>" msgstr "" #. type: Content of: <book><chapter><section><para> msgid "" "For <literal>Architecture: any</literal> packages, the autobuilder system " "rebuild them. It ensures to install" msgstr "" "對於 <literal>Architecture: any</literal> 的套件,自動編譯系統重構建它們,它" "確保系統中已經安裝:" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "the <systemitem role=\"package\">build-essential</systemitem> package, and" msgstr "<systemitem role=\"package\">build-essential</systemitem> 套件;" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "packages listed in the <literal>Build-Depends</literal> field (see <xref " "linkend=\"control\"/>)." msgstr "" "列於 <literal>Build-Depends</literal> 欄位的套件(參考 <xref linkend=\"control" "\"/>)。" #. type: Content of: <book><chapter><section><para> msgid "Then it issues the following command in the source directory:" msgstr "然後在原始碼目錄中執行以下命令:" #. type: Content of: <book><chapter><section><screen> #, no-wrap msgid "$ dpkg-buildpackage -B\n" msgstr "$ dpkg-buildpackage -B\n" #. type: Content of: <book><chapter><section><para> msgid "" "This will do everything to make architecture dependent binary packages on " "another architecture. It will:" msgstr "這樣會自動完成從原始碼套件構建平臺依賴二進位套件的工作,包括:" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "build architecture dependent binary packages (<literal>fakeroot debian/rules " "binary-arch</literal>)" msgstr "" "構建平臺依賴二進位套件(<literal>fakeroot debian/rules binary-arch</literal>)" #. type: Content of: <book><chapter><section><para> msgid "This is why you see your package for other architectures." msgstr "這就是你看到你的套件在其他平臺上可用的原因。" #. type: Content of: <book><chapter><section><para><footnote><para> msgid "" "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 force the minimal system and may leave many packages installed." msgstr "" "和在 <systemitem role=\"package\">pbuilder</systemitem> 中不同,自動編譯系統" "使用的 <systemitem role=\"package\">sbuild</systemitem> 所維護的 " "<command>chroot</command> 不強制要求最小化的編譯系統,並可能保持很多套件始終" "安裝在其中。" #. type: Content of: <book><chapter><section><para> msgid "" "Although packages listed in the <literal>Build-Depends-indep</literal> field " "are required to be installed for the normal packaging by us (see <xref " "linkend=\"completebuild\"/>), they are not required to be installed for the " "autobuilder system since it build only architecture dependent binary " "packages. <placeholder type=\"footnote\" id=\"0\"/> This difference between " "normal packaging and autobuilder situation dictates whether you 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\"/>)." msgstr "" "儘管通常的打包工作中 <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" "\"/>)。" #. type: Content of: <book><chapter><section><title> msgid "Including <filename>orig.tar.gz</filename> for upload" msgstr "在上傳時包含 <filename>orig.tar.gz</filename> 檔案" #. type: Content of: <book><chapter><section><para> #, fuzzy #| msgid "" #| "When you first upload the package to the archive, you need to include the " #| "original <filename>orig.tar.gz</filename> source. If the last changelog " #| "entry is not the first one for the given upstream version, you must " #| "provide <command>dpkg-buildpackage</command> command with the <literal>-" #| "sa</literal> option. On the other hand, the <literal>-sd</literal> " #| "option will force to exclude the original <filename>orig.tar.gz</" #| "filename> source." msgid "" "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 such package is neither <literal>1</literal> nor " "<literal>0</literal>, you must provide <command>dpkg-buildpackage</command> " "command with the <literal>-sa</literal> option. On the other hand, the " "<literal>-sd</literal> option will force to exclude the original " "<filename>orig.tar.gz</filename> source." msgstr "" "第一次向倉庫上傳套件時要包含 <filename>orig.tar.gz</filename> 原始碼歸檔。如" "果 changelog 中的最後一個條目是這個上游版本的第一次上傳,那麼應爲 " "<command>dpkg-buildpackage</command> 命令傳遞 <literal>-sa</literal> 選項。相" "反,<literal>-sd</literal> 選項會強制將原始的 <filename>orig.tar.gz</" "filename> 原始碼歸檔排除在外。" #. type: Content of: <book><chapter><section><title> msgid "<command>debuild</command> command" msgstr "<command>debuild</command> 命令" #. type: Content of: <book><chapter><section><para> msgid "" "You can automate package build process of the <command>dpkg-buildpackage</" "command> command further with the <command>debuild</command> command. See " "<citerefentry> <refentrytitle>debuild</refentrytitle> <manvolnum>1</" "manvolnum> </citerefentry>." msgstr "" "你可以使用 <command>debuild</command> 命令來進一步自動化 <command>dpkg-" "buildpackage</command> 的構建過程。參考 <citerefentry> " "<refentrytitle>debuild</refentrytitle> <manvolnum>1</manvolnum> </" "citerefentry>" #. type: Content of: <book><chapter><section><para> msgid "" "Customization of the <command>debuild</command> command can be done through " "<filename>/etc/devscripts.conf</filename> or <filename>~/.devscripts</" "filename>. I would suggest at least following items:" msgstr "" "對 <command>debuild</command> 命令的自定義可以通過 <filename>/etc/devscripts." "conf</filename> 或 <filename>~/.devscripts</filename> 實現。我建議至少添加以" "下幾項:" #. type: Content of: <book><chapter><section><screen> #, no-wrap msgid "" "DEBSIGN_KEYID=Your_GPG_keyID\n" "DEBUILD_LINTIAN=yes\n" "DEBUILD_LINTIAN_OPTS=-i -I --show-overrides\n" msgstr "" "DEBSIGN_KEYID=Your_GPG_keyID\n" "DEBUILD_LINTIAN=yes\n" "DEBUILD_LINTIAN_OPTS=-i -I --show-overrides\n" #. type: Content of: <book><chapter><section><para> msgid "" "With these, packages are signed by your specified GPG key ID (good for " "sponsoring packages) and checked by the <command>lintian</command> command " "in details." msgstr "" "這樣套件會使用指定的 ID 的 GPG 私鑰簽署(對於 sponsor 套件有好處),並使用 " "<command>lintian</command> 命令對套件做最大程度的檢査。" #. type: Content of: <book><chapter><section><para> msgid "" "Cleaning source and rebuilding package from a user account is as simple as:" msgstr "在普通用戶帳號中可以使用以下這樣簡單的命令清理原始碼並重構建套件:" #. type: Content of: <book><chapter><section><screen> #, no-wrap msgid "$ debuild\n" msgstr "$ debuild\n" #. type: Content of: <book><chapter><section><para> msgid "" "Please note that the <command>dpkg-buildpackage</command> option <literal>-" "sa</literal> to include the original <filename>orig.tar.gz</filename> source " "can be specified as:" msgstr "" "請注意用於包含 <filename>orig.tar.gz</filename> 原始碼歸檔的 <command>dpkg-" "buildpackage</command> 參數 <literal>-sa</literal> 可以這樣傳遞:" #. type: Content of: <book><chapter><section><screen> #, no-wrap msgid "$ debuild -sa\n" msgstr "$ debuild -sa\n" #. type: Content of: <book><chapter><section><para> msgid "You can clean source tree as simple as:" msgstr "還可以簡單地清理原始碼樹:" #. type: Content of: <book><chapter><section><screen> #, no-wrap msgid "$ debuild clean\n" msgstr "$ debuild clean\n" #. type: Content of: <book><chapter><section><title> msgid "<systemitem role=\"package\">pbuilder</systemitem> package" msgstr "<systemitem role=\"package\">pbuilder</systemitem> 套件" #. type: Content of: <book><chapter><section><para><footnote><para> msgid "" "Since the <systemitem role=\"package\">pbuilder</systemitem> package is " "still evolving, you have to check the actual configuration situation by " "consulting the latest official documentation." msgstr "" "<systemitem role=\"package\">pbuilder</systemitem> 套件仍然在改進中,你可以査" "看最新的官方文件來檢査實際的設定狀況。" #. type: Content of: <book><chapter><section><para><footnote><para> msgid "" "See <ulink url=\"&buildd-do;\"/> for more on the auto-builder of the Debian " "package." msgstr "" #. type: Content of: <book><chapter><section><para> #, fuzzy #| msgid "" #| "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 the severity serious FTBFS (Fails To Build From Source) bug which " #| "is always in the RC (release critical) category. See <ulink url=" #| "\"&buildd-do;\">&buildd-do;</ulink> for more on the Debian package auto-" #| "builder." msgid "" "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 the severity serious FTBFS " "(Fails To Build From Source) bug which is always in the RC (release " "critical) category. <placeholder type=\"footnote\" id=\"1\"/>" msgstr "" "對於使用淨室(<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。參考 <ulink url=\"&buildd-do;\">&buildd-do;</ulink> 以" "更多瞭解 Debian 套件自動編譯系統。" #. type: Content of: <book><chapter><section><para> msgid "" "Let's customize the <systemitem role=\"package\">pbuilder</systemitem> " "package by the following." msgstr "" "我們通過以下操作來定製 <systemitem role=\"package\">pbuilder</systemitem> 套" "件。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "setting <filename>/var/cache/pbuilder/result</filename> directory writable " "by the user." msgstr "設置 <filename>/var/cache/pbuilder/result</filename> 對用戶可寫。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "creating a directory, e.g. <filename><replaceable>/var/cache/pbuilder/" "hooks</replaceable></filename>, writable by the user to place hook scripts." msgstr "" "創建一個對用戶可寫的目錄保存鉤子腳本,例如 <filename><replaceable>/var/cache/" "pbuilder/hooks</replaceable></filename>" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "setting <filename>~/.pbuilderrc</filename> or <filename>/etc/pbuilderrc</" "filename> to include as follows." msgstr "" "在 <filename>~/.pbuilderrc</filename> 或 <filename>/etc/pbuilderrc</" "filename> 中添加以下內容:" #. type: Content of: <book><chapter><section><itemizedlist><listitem><screen> #, no-wrap msgid "" "AUTO_DEBSIGN=yes\n" "HOOKDIR=<replaceable>/var/cache/pbuilder/hooks</replaceable>\n" msgstr "" "AUTO_DEBSIGN=yes\n" "HOOKDIR=<replaceable>/var/cache/pbuilder/hooks</replaceable>\n" #. type: Content of: <book><chapter><section><para> msgid "" "This will allow you to sign generated packages with your secret GPG key in " "the <filename>~/.gnupg/</filename> directory." msgstr "" "這使你可以使用 <filename>~/.gnupg/</filename> 目錄中的 GPG 私鑰簽署生成的套" "件。" #. type: Content of: <book><chapter><section><para> msgid "" "Let's then initialize the local <systemitem role=\"package\">pbuilder</" "systemitem> <command>chroot</command> system first as follows." msgstr "" "使用以下命令初始化 <systemitem role=\"package\">pbuilder</systemitem> " "<command>chroot</command> 系統:" #. type: Content of: <book><chapter><section><screen> #, no-wrap msgid "$ sudo pbuilder create\n" msgstr "$ sudo pbuilder create\n" #. type: Content of: <book><chapter><section><para> msgid "" "If you already have the completed source packages, 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." msgstr "" "如果你已經創建了原始碼套件,在包含 <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> 系統以便執行構建。" #. type: Content of: <book><chapter><section><screen> #, no-wrap msgid "" "$ sudo pbuilder --update\n" "$ sudo pbuilder --build <replaceable>foo</replaceable>.dsc\n" msgstr "" "$ sudo pbuilder --update\n" "$ sudo pbuilder --build <replaceable>foo</replaceable>.dsc\n" #. type: Content of: <book><chapter><section><screen> #, no-wrap msgid "$ sudo pbuilder --build --debbuildopts -sa <replaceable>foo</replaceable>.dsc\n" msgstr "$ sudo pbuilder --build --debbuildopts -sa <replaceable>foo</replaceable>.dsc\n" #. type: Content of: <book><chapter><section><para> msgid "" "The newly built packages will be located in <filename>/var/cache/pbuilder/" "result/</filename> with non-root ownership." msgstr "" "新構建的套件將被放置於 <filename>/var/cache/pbuilder/result/</filename> 且屬" "主不是 root。" #. type: Content of: <book><chapter><section><para> msgid "" "If you already have the updated source tree without generating the matching " "source packages, issue the following commands in the source directory where " "the <filename>debian</filename> directory exists, instead." msgstr "" "如果你已經更新了原始碼樹但沒有生成對應的原始碼套件,在存放 <filename>debian</" "filename> 目錄的目錄裏執行:" #. type: Content of: <book><chapter><section><screen> #, no-wrap msgid "" "$ sudo pbuilder --update\n" "$ pdebuild\n" msgstr "" "$ sudo pbuilder --update\n" "$ pdebuild\n" #. type: Content of: <book><chapter><section><screen> #, no-wrap msgid "$ pdebuild --debbuildopts -sa\n" msgstr "$ pdebuild --debbuildopts -sa\n" #. type: Content of: <book><chapter><section><para> msgid "" "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)." msgstr "" "你可以使用 <literal>pbuilder --login --save-after-login</literal> 命令登錄到" "這個 <command>chroot</command> 環境中並按照需要對其進行設定。通過 " "<literal>^D</literal> (Control-D)離開這個 shell 時環境會被保存。" #. type: Content of: <book><chapter><section><para><footnote><para> msgid "" "This assumes <literal>HOOKDIR=/var/cache/pbuilder/hooks</literal>. You can " "find many examples of the hook script in the <filename>/usr/share/doc/" "pbuilder/examples</filename> directory." msgstr "" "此處默認 <literal>HOOKDIR=/var/cache/pbuilder/hooks</literal>。你可以在 " "<filename>/usr/share/doc/pbuilder/examples</filename> 目錄中找到很多鉤子腳本" "的例子。" #. type: Content of: <book><chapter><section><para> msgid "" "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\"/>" msgstr "" "最新版的 <command>lintian</command> 命令可以通過設置鉤子腳本 " "<filename><replaceable>/var/cache/pbuilder/hooks</replaceable>/B90lintian</" "filename> 在 <literal>chroot</literal> 環境中運行。腳本內容如下:" "<placeholder type=\"footnote\" id=\"0\"/>" #. type: Content of: <book><chapter><section><screen> #, no-wrap msgid "" "#!/bin/sh\n" "set -e\n" "install_packages() {\n" " apt-get -y --force-yes install $@\n" " }\n" "install_packages lintian\n" "echo +++ lintian output +++\n" "su -c lintian -i -I --show-overrides /tmp/buildd/*.changes - pbuilder\n" "# use this version if you don't want lintian to fail the build\n" "#su -c lintian -i -I --show-overrides /tmp/buildd/*.changes; : - pbuilder\n" "echo +++ end of lintian output +++\n" msgstr "" "#!/bin/sh\n" "set -e\n" "install_packages() {\n" " apt-get -y --force-yes install $@\n" " }\n" "install_packages lintian\n" "echo +++ lintian output +++\n" "su -c lintian -i -I --show-overrides /tmp/buildd/*.changes - pbuilder\n" "# use this version if you don't want lintian to fail the build\n" "#su -c lintian -i -I --show-overrides /tmp/buildd/*.changes; : - pbuilder\n" "echo +++ end of lintian output +++\n" #. type: Content of: <book><chapter><section><para> msgid "" "You need to have access to the latest <literal>sid</literal> environment to " "build packages properly for <literal>sid</literal>. In reality, " "<literal>sid</literal> may be experiencing issues which makes it not " "desirable for you to migrate your whole system. The <systemitem role=" "\"package\">pbuilder</systemitem> package can help you to cope with this " "kind of situation." msgstr "" "爲 <literal>sid</literal> 編譯套件需要使用 <literal>sid</literal> 環境。在現" "實中 <literal>sid</literal> 存在很多問題以至於你不願意將整個系統都遷移到其" "上。<systemitem role=\"package\">pbuilder</systemitem> 可以在這種情況下很好地" "解決問題。" #. type: Content of: <book><chapter><section><para><footnote><para> msgid "" "There are some restrictions for such updates of your <literal>stable</" "literal> package." msgstr "升級你的 <literal>stable</literal> 套件有規定限制。" #. type: Content of: <book><chapter><section><para> msgid "" "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, I am running <literal>sid</literal> system is not good enough " "excuse not to update them promptly. The <systemitem role=\"package" "\">pbuilder</systemitem> package can help you to access environments of " "almost any Debian derivative distributions of the same CPU architecture." msgstr "" "你可能需要通過 <literal>stable-proposed-updates</literal>、<literal>stable/" "updates</literal> 等升級你的 <literal>stable</literal> 套件。<placeholder " "type=\"footnote\" id=\"0\"/>對於這類情況,“我正在運行 <literal>sid</literal> " "系統” 並不是你不爲它們進行升級的充分理由。<systemitem role=\"package" "\">pbuilder</systemitem> 套件可以幫助你使用到相同 CPU 構架下幾乎所有 Debian " "和 Debian 衍生版系統。" #. type: Content of: <book><chapter><section><para> #, fuzzy #| msgid "" #| "See <ulink url=\"&pbuilder;\">&pbuilder;</ulink>, <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>." msgid "" "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>." msgstr "" "參考 <ulink url=\"&pbuilder;\">&pbuilder;</ulink>、<citerefentry> " "<refentrytitle>pdebuild</refentrytitle> <manvolnum>1</manvolnum> </" "citerefentry>、<citerefentry> <refentrytitle>pbuilderrc</refentrytitle> " "<manvolnum>5</manvolnum> </citerefentry> 和 <citerefentry> " "<refentrytitle>pbuilder</refentrytitle> <manvolnum>8</manvolnum> </" "citerefentry>" #. type: Content of: <book><chapter><section><title> msgid "<command>git-buildpackage</command> command and similars" msgstr "<command>git-buildpackage</command> 和相似命令" #. type: Content of: <book><chapter><section><para><footnote><para> msgid "" "See <ulink url=\"&debref-vcs;\">Version control systems</ulink> for more." msgstr "" #. type: Content of: <book><chapter><section><para> #, fuzzy #| msgid "" #| "If your upstream uses the source code management system (<ulink url=" #| "\"&debref-vcs;\">VCS</ulink>) to maintain their code, you should " #| "consider to use them. That makes merging and cherry-picking upstream " #| "patches much easier. There are several specialized wrapper script " #| "packages for the Debian package building for each VCS." msgid "" "If your upstream uses the source code management system (VCS) <placeholder " "type=\"footnote\" id=\"0\"/> to maintain their code, you should consider to " "use them. That makes merging and cherry-picking upstream patches much " "easier. There are several specialized wrapper script packages for the " "Debian package building for each VCS." msgstr "" "如果你的上游對原始碼使用版本控制系統(<ulink url=\"&debref-vcs;\">VCS</" "ulink>),你也應該考慮使用它們。這會使得合併和提取上游補丁更加簡單。在 Debian " "有多個爲不同 VCS 設計的腳本套件來協助 Debian 套件構建。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "<systemitem role=\"package\">git-buildpackage</systemitem>: Suite to help " "with Debian packages in Git repositories." msgstr "" "<systemitem role=\"package\">git-buildpackage</systemitem>:幫助維護 Git 倉庫" "中套件的套件。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "<systemitem role=\"package\">svn-buildpackage</systemitem>: helper programs " "to maintain Debian packages with Subversion." msgstr "" "<systemitem role=\"package\">svn-buildpackage</systemitem>:幫助維護 " "Subversion 倉庫中套件的程式。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "<systemitem role=\"package\">cvs-buildpackage</systemitem>: A set of Debian " "package scripts for CVS source trees." msgstr "" "<systemitem role=\"package\">cvs-buildpackage</systemitem>:爲 CVS 原始碼樹設" "計的 Debian 套件腳本集。" #. type: Content of: <book><chapter><section><para><footnote><para> msgid "Here are few web resources available for advanced audiences." msgstr "對於資深打包人員,有以下幾個可用的資源:" #. type: Content of: <book><chapter><section><para><footnote><itemizedlist><listitem><para> #, fuzzy #| msgid "" #| "<ulink url=\"&git-dpm;\">git-dpm: Debian packages in Git manager</ulink>" msgid "" "<ulink url=\"&git-buildpackage-doc;\">Building Debian Packages with git-" "buildpackage</ulink>" msgstr "" "<ulink url=\"&git-dpm;\">git-dpm: Debian packages in Git manager</ulink>" #. type: Content of: <book><chapter><section><para><footnote><itemizedlist><listitem><para> msgid "<ulink url=\"&debian-packages-git;\">debian packages in git</ulink>" msgstr "<ulink url=\"&debian-packages-git;\">debian packages in git</ulink>" #. type: Content of: <book><chapter><section><para><footnote><itemizedlist><listitem><para> msgid "" "<ulink url=\"&git-debian-packaging;\">Using Git for Debian Packaging</ulink>" msgstr "" "<ulink url=\"&git-debian-packaging;\">Using Git for Debian Packaging</ulink>" #. type: Content of: <book><chapter><section><para><footnote><itemizedlist><listitem><para> msgid "" "<ulink url=\"&git-dpm;\">git-dpm: Debian packages in Git manager</ulink>" msgstr "" "<ulink url=\"&git-dpm;\">git-dpm: Debian packages in Git manager</ulink>" #. type: Content of: <book><chapter><section><para><footnote><itemizedlist><listitem><para> #, fuzzy #| msgid "" #| "<ulink url=\"&git-debian-packaging;\">Using Git for Debian Packaging</" #| "ulink>" msgid "" "<ulink url=\"&topgit;\">Using TopGit to generate quilt series for Debian " "packaging</ulink>" msgstr "" "<ulink url=\"&git-debian-packaging;\">Using Git for Debian Packaging</ulink>" #. type: Content of: <book><chapter><section><para> #, fuzzy #| msgid "" #| "These packages offer more elegant working environment than manual use of " #| "the <command>quilt</command> commands for advanced audiences to " #| "<emphasis>automate</emphasis> building of packages. I will not explain " #| "them in this tutorial. <placeholder type=\"footnote\" id=\"0\"/>" msgid "" "There are packages which <emphasis>automate</emphasis> building of packages " "under VCS managed source tree for advanced audiences. I will not explain " "them in this tutorial. <placeholder type=\"footnote\" id=\"0\"/>" msgstr "" "這些套件爲需要 <emphasis>自動化</emphasis> 編譯套件的資深打包人員提供了相比於" "手工使用 <command>quilt</command> 命令更加整潔的工作環境,本文件裏不會對此進" "行更多敘述。<placeholder type=\"footnote\" id=\"0\"/>" #. type: Content of: <book><chapter><section><title> msgid "Quick rebuild" msgstr "快速重構建" #. type: Content of: <book><chapter><section><para><footnote><para> msgid "" "Environment variables which 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." msgstr "" "常規情形下被設定好的環境變量在此時不會被自動設置。永遠不要將使用這個 " "<emphasis role=\"strong\">快速</emphasis> 方法構建的套件上傳到任何地方。" #. type: Content of: <book><chapter><section><para> msgid "" "With a large package, you may not want to rebuild from scratch every time " "while you tune 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\"/>:" msgstr "" "對於很大的套件,在調試 <filename>debian/rules</filename> 的過程中你可能不想對" "整個套件進行重構建。僅用於測試目的,你可以不重新構建原始碼套件而使用以下的方" "法創建 <filename>.deb</filename> 檔案<placeholder type=\"footnote\" id=\"0\"/" ">:" #. type: Content of: <book><chapter><section><screen> #, no-wrap msgid "$ fakeroot debian/rules binary\n" msgstr "$ fakeroot debian/rules binary\n" #. type: Content of: <book><chapter><section><para> msgid "Or, simply as following to see if it build or not." msgstr "或者可以僅査看它是否能通過編譯:" #. type: Content of: <book><chapter><section><screen> #, no-wrap msgid "$ fakeroot debian/rules build\n" msgstr "$ fakeroot debian/rules build\n" #. type: Content of: <book><chapter><section><para> msgid "" "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." msgstr "" "一旦完成了調試,記住要按照前面所將的正常過程重構建你的套件。你可能無法正常上" "傳用此種方法構建的 <filename>.deb</filename> 檔案。" #. type: Content of: <book><chapter><title> msgid "Checking the package for errors" msgstr "檢査套件中的錯誤" #. type: Content of: <book><chapter><para> msgid "" "There are few chores you should know to check the package for errors by " "yourself before uploading packages to public archives." msgstr "在上傳套件到公共倉庫前,你還需要自己做一些檢査套件錯誤的例行工作。" #. type: Content of: <book><chapter><para> msgid "" "Testing on machine other than your own is also good idea. You must watch " "closely for any warnings or errors for all the test described here." msgstr "" "不僅在自己的機器上測試總是一個好主意。你必須謹慎地對待以下敘述的測試中顯示的" "任何一個警告或錯誤訊息。" #. type: Content of: <book><chapter><section><title> msgid "Verifying package for install" msgstr "檢驗套件安裝過程" #. type: Content of: <book><chapter><section><para> msgid "" "You must test your package if it installs without problem. The " "<citerefentry> <refentrytitle>debi</refentrytitle> <manvolnum>1</manvolnum> " "</citerefentry> command helps you to test to install all the generated " "binary packages." msgstr "" "你必須測試你的套件看是否存在安裝問題。<citerefentry> <refentrytitle>debi</" "refentrytitle> <manvolnum>1</manvolnum> </citerefentry> 命令可以幫助你測試生" "成的二進位套件。" #. type: Content of: <book><chapter><section><screen> #, no-wrap msgid "$ sudo debi gentoo_0.9.12-1_i386.changes\n" msgstr "$ sudo debi gentoo_0.9.12-1_i386.changes\n" #. type: Content of: <book><chapter><section><para> msgid "" "You have to make sure that there are no overlapped files with other existing " "packages using the <filename>Contents-<replaceable>i386</replaceable></" "filename> file downloaded from the Debian archive to prevent installation " "problem on different systems. The <command>apt-file</command> command may " "be handy for this task. If there are overlapped files, please take actions " "to avoid the real problem using the alternatives mechanism (see " "<citerefentry> <refentrytitle>update-alternatives</refentrytitle> " "<manvolnum>1</manvolnum> </citerefentry>) by coordinating with other " "affected packages or by setting the <literal>Conflicts</literal> entry in " "the <filename>debian/control</filename> file." msgstr "" "你必須使用從 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> 條目。" #. type: Content of: <book><chapter><section><title> msgid "Verifying package for <emphasis>maintainer scripts</emphasis>" msgstr "檢驗 <emphasis>maintainer scripts</emphasis>" #. type: Content of: <book><chapter><section><para> msgid "" "All <emphasis>maintainer scripts</emphasis>, i.e., <filename>preinst</" "filename>, <filename>prerm</filename>, <filename>postinst</filename>, and " "<filename>postrm</filename> files, are non-trivial 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\"/>)." msgstr "" "所有 <emphasis>maintainer scripts</emphasis>,包括 <filename>preinst</" "filename>、<filename>prerm</filename>、<filename>postinst</filename> 和 " "<filename>postrm</filename> 檔案,除非是由 <systemitem role=\"package" "\">debhelper</systemitem> 程式自動生成的,都是測試的重點。如果你是新維護人員" "則不要使用它們(參考 <xref linkend=\"maintscripts\"/>)。" #. type: Content of: <book><chapter><section><para> msgid "" "If the package makes use of these non-trivial <emphasis>maintainer scripts</" "emphasis>, be sure to test not only for install but also for remove, purge, " "and upgrade. Many <emphasis>maintainer script</emphasis> bugs show up when " "packages are removed or purged. Use the <command>dpkg</command> command as " "follows to test them." msgstr "" "如果套件使用了這些需要嚴格測試的 <emphasis>maintainer scripts</emphasis>,請" "確保不僅測試 install,還要測試 remove、purge 和 upgrade。很多 " "<emphasis>maintainer scripts</emphasis> 的 Bug 都顯現於反安裝或徹底刪除套件" "時。使用 <command>dpkg</command> 命令來測試它們。" #. type: Content of: <book><chapter><section><screen> #, no-wrap msgid "" "$ sudo dpkg -r gentoo\n" "$ sudo dpkg -P gentoo\n" "$ sudo dpkg -i gentoo_<replaceable>version</replaceable>-<replaceable>revision</replaceable>_<replaceable>i386</replaceable>.deb\n" msgstr "" "$ sudo dpkg -r gentoo\n" "$ sudo dpkg -P gentoo\n" "$ sudo dpkg -i gentoo_<replaceable>version</replaceable>-<replaceable>revision</replaceable>_<replaceable>i386</replaceable>.deb\n" #. type: Content of: <book><chapter><section><para> msgid "This should be done with sequences such as the following." msgstr "整個測試過程應按照以下序列操作:" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "install the previous version (if needed)." msgstr "如果可能,安裝前一個版本的套件;" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "upgrade it from the previous version." msgstr "從前一個版本升級套件;" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "downgrade it back to the previous version (optional)." msgstr "降級套件到前一個版本(可選);" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "purge it." msgstr "徹底刪除該套件;" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "install the new package." msgstr "全新安裝該套件;" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "remove it." msgstr "反安裝該套件;" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "install it again." msgstr "再次安裝該套件。" #. type: Content of: <book><chapter><section><para> msgid "" "If this is your first package, you should create dummy packages with " "different versions to test your package in advance to prevent future " "problems." msgstr "" "如果這是你的第一個套件,你應該使用其他版本號創建一個測試用的套件來完成升級測" "試,這樣可以避免將來的問題。" #. type: Content of: <book><chapter><section><para> msgid "" "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." msgstr "" "請牢記如果你的套件已經在以往版本的 Debian 中發佈,人們通常會從最近發佈的 " "Debian 發佈裏的版本升級,所以也要測試從那個版本升級到當前的版本。" #. type: Content of: <book><chapter><section><para> msgid "" "Although downgrade is not officially supported, it should be nice to support " "it." msgstr "儘管降級沒有被正式支持,支持它也總是不錯的。" #. type: Content of: <book><chapter><section><title> msgid "<systemitem role=\"package\">lintian</systemitem> package" msgstr "<systemitem role=\"package\">lintian</systemitem> 套件" #. type: Content of: <book><chapter><section><para><footnote><para> msgid "" "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\"/>." msgstr "" "如果你按照 <xref linkend=\"debuild\"/> 中的敘述定義了 <filename>/etc/" "devscripts.conf</filename> 或 <filename>~/.devscripts</filename> 檔案,就不需" "要再添加 <command>lintian</command> 選項 <literal>-i -I --show-overrides</" "literal>。" #. type: Content of: <book><chapter><section><para> msgid "" "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\"/>" msgstr "" "使用 <citerefentry> <refentrytitle>lintian</refentrytitle> <manvolnum>1</" "manvolnum> </citerefentry> 檢査你的 <filename>.changes</filename> 檔案。" "<command>lintian</command> 命令會運行很多測試腳本來檢査常見的打包錯誤。" "<placeholder type=\"footnote\" id=\"0\"/>" #. type: Content of: <book><chapter><section><screen> #, no-wrap msgid "$ lintian -i -I --show-overrides gentoo_0.9.12-1_i386.changes\n" msgstr "$ lintian -i -I --show-overrides gentoo_0.9.12-1_i386.changes\n" #. type: Content of: <book><chapter><section><para> msgid "" "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 are marked as follows." msgstr "" "當然,要使用你自己套件所生成的 <filename>.changes</filename> 檔案的檔案名。" "<command>lintian</command> 命令的輸出常帶有以下幾種標記:" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "<literal>E:</literal> for error; a sure policy violation or a packaging " "error." msgstr "" "<literal>E:</literal> 代表錯誤:確定違反了 Debian Policy 或是一個肯定的打包錯" "誤。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "<literal>W:</literal> for warning; a possible policy violation or a " "packaging error." msgstr "" "<literal>W:</literal> 代表警告:可能違反了 Debian Policy 或是一個可能的打包錯" "誤。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "<literal>I:</literal> for info; a information on certain packaging aspects." msgstr "<literal>I:</literal> 代表訊息:對於特定打包類別的訊息。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "<literal>N:</literal> for note; a detailed message to help your debugging." msgstr "<literal>N:</literal> 代表註釋:幫助你調試的詳細訊息。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "<literal>O:</literal> for overridden; a message overridden by the " "<filename>lintian-overrides</filename> files but displayed by the <literal>--" "show-overrides</literal> option." msgstr "" "<literal>O:</literal> 代表已覆蓋:一個被 <filename>lintian-overrides</" "filename> 檔案覆蓋的訊息,但由於使用 <literal>--show-overrides</literal> 選項" "而顯示。" #. type: Content of: <book><chapter><section><para> msgid "" "For warnings, tune the package to avoid them or verify that the warnings are " "spurious. If spurious, set the <filename>lintian-overrides</filename> files " "as described in <xref linkend=\"lintian\"/>." msgstr "" "對於警告,你應該改進套件或者檢査警告是否的確無意義。如果確定沒有意義,則按照 " "<xref linkend=\"lintian\"/> 中的敘述使用 <filename>lintian-overrides</" "filename> 檔案將其覆蓋。" #. type: Content of: <book><chapter><section><para> msgid "" "Note that you can build the package with <command>dpkg-buildpackage</" "command> and run <command>lintian</command> on it in one command with " "<citerefentry> <refentrytitle>debuild</refentrytitle> <manvolnum>1</" "manvolnum> </citerefentry> or with <citerefentry> <refentrytitle>pdebuild</" "refentrytitle> <manvolnum>1</manvolnum> </citerefentry>." msgstr "" "你可以使用 <citerefentry> <refentrytitle>debuild</refentrytitle> " "<manvolnum>1</manvolnum> </citerefentry> 或 <citerefentry> " "<refentrytitle>pdebuild</refentrytitle> <manvolnum>1</manvolnum> </" "citerefentry> 將 <command>dpkg-buildpackage</command> 與在其後運行 " "<command>lintian</command> 合併到一個命令裏。" #. type: Content of: <book><chapter><section><title> msgid "<command>debc</command> command" msgstr "<command>debc</command> 命令" #. type: Content of: <book><chapter><section><para> msgid "" "You can list files in the binary Debian package by <citerefentry> " "<refentrytitle>debc</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> " "command." msgstr "" "你可以使用 <citerefentry> <refentrytitle>debc</refentrytitle> <manvolnum>1</" "manvolnum> </citerefentry> 命令列出一個二進位 Debian 套件中的檔案。" #. type: Content of: <book><chapter><section><screen> #, no-wrap msgid "$ debc <replaceable>package</replaceable>.changes\n" msgstr "$ debc <replaceable>package</replaceable>.changes\n" #. type: Content of: <book><chapter><section><title> msgid "<command>debdiff</command> command" msgstr "<command>debdiff</command> 命令" #. type: Content of: <book><chapter><section><para> msgid "" "You can compare file contents in two source Debian packages with the " "<citerefentry> <refentrytitle>debdiff</refentrytitle> <manvolnum>1</" "manvolnum> </citerefentry> command." msgstr "" "你可以使用 <citerefentry> <refentrytitle>debdiff</refentrytitle> " "<manvolnum>1</manvolnum> </citerefentry> 命令比較兩個 Debian 原始碼套件的內" "容。" #. type: Content of: <book><chapter><section><screen> #, no-wrap msgid "$ debdiff <replaceable>old-package</replaceable>.dsc <replaceable>new-package</replaceable>.dsc\n" msgstr "$ debdiff <replaceable>old-package</replaceable>.dsc <replaceable>new-package</replaceable>.dsc\n" #. type: Content of: <book><chapter><section><para> msgid "" "You can also compare file lists in two sets of binary Debian packages with " "the <citerefentry> <refentrytitle>debdiff</refentrytitle> <manvolnum>1</" "manvolnum> </citerefentry> command." msgstr "" "你還可以使用 <citerefentry> <refentrytitle>debdiff</refentrytitle> " "<manvolnum>1</manvolnum> </citerefentry> 命令比較兩個 Debian 二進位套件的檔案" "列表。" #. type: Content of: <book><chapter><section><screen> #, no-wrap msgid "$ debdiff <replaceable>old-package</replaceable>.changes <replaceable>new-package</replaceable>.changes\n" msgstr "$ debdiff <replaceable>old-package</replaceable>.changes <replaceable>new-package</replaceable>.changes\n" #. type: Content of: <book><chapter><section><para> msgid "" "These are useful to identify what has been changed in the source packages, " "if no files have been unintentionally misplaced or removed in the binary " "packages, and if no other inadvertent changes were made when updating binary " "packages." msgstr "" "這個命令對於檢査原始碼套件中哪些檔案被修改了非常有用,還可以發現二進位套件中" "是否有檔案被意外替換或刪除,或在更新二進位套件時檢査是否有其他沒有被提及的變" "更。" #. type: Content of: <book><chapter><section><title> msgid "<command>interdiff</command> command" msgstr "<command>interdiff</command> 命令" #. type: Content of: <book><chapter><section><para> msgid "" "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." msgstr "" "你可以使用 <citerefentry> <refentrytitle>interdiff</refentrytitle> " "<manvolnum>1</manvolnum> </citerefentry> 命令比較兩個 <filename>diff.gz</" "filename> 檔案。這對於更新使用舊的 <literal>1.0</literal> 原始碼格式的套件" "時,檢査是否有意外的變更非常有用。" #. type: Content of: <book><chapter><section><screen> #, no-wrap msgid "$ interdiff -z <replaceable>old-package</replaceable>.diff.gz <replaceable>new-package</replaceable>.diff.gz\n" msgstr "$ interdiff -z <replaceable>old-package</replaceable>.diff.gz <replaceable>new-package</replaceable>.diff.gz\n" #. type: Content of: <book><chapter><section><para> msgid "" "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." msgstr "" #. type: Content of: <book><chapter><section><title> msgid "<command>mc</command> command" msgstr "<command>mc</command> 命令" #. type: Content of: <book><chapter><section><para> msgid "" "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." msgstr "" "很多檔案檢査操作可以通過使用類似 <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> 檔案。" #. type: Content of: <book><chapter><section><para> msgid "" "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 that." msgstr "" "還要檢査在二進位套件和原始碼套件中是否有不需要的檔案或者空檔案。這些檔案經常" "沒有被正確清理,如果存在這種情況,要調整 <filename>rules</filename> 檔案進行" "處理。" #. type: Content of: <book><chapter><title> msgid "Uploading the package" msgstr "上傳套件" #. type: Content of: <book><chapter><para> #, fuzzy #| msgid "" #| "Now that you have tested your new package thoroughly, you will be " #| "technically ready to start the Debian new maintainer application process, " #| "as described at <ulink url=\"&nm-join;\">&nm-join;</ulink>" msgid "" "Now that you have tested your new package thoroughly, you want to release it " "to a public archive to share it." msgstr "" "當你完成了對套件的徹底測試,在技術上你已經滿足了申請 Debian 新維護人員的要" "求,詳細的描述參考 <ulink url=\"&nm-join;\">&nm-join;</ulink>" #. type: Content of: <book><chapter><section><title> msgid "Uploading to the Debian archive" msgstr "上傳到 Debian 倉庫" #. type: Content of: <book><chapter><section><para><footnote><para> msgid "See <xref linkend=\"debiandeveloper\"/>." msgstr "" #. type: Content of: <book><chapter><section><para><footnote><para> msgid "" "There are publicly accessible archives such as <ulink url=\"&mentors-dn;\"/> " "which work almost the same way as Debian archive and provide upload area for " "the non-DD. You can set up an equivalent archive by yourself using tools " "listed at <ulink url=\"&deb-archive;\"/>. So this section is useful for the " "non-DD, too." msgstr "" #. type: Content of: <book><chapter><section><para><footnote><para> msgid "" "The <systemitem role=\"package\">dput</systemitem> package seems to come " "with more features and becoming more popular than the <systemitem role=" "\"package\">dupload</systemitem> package. It uses the <filename>/etc/dput</" "filename> file for the global configuration and the <filename>~/.dput.cf</" "filename> file for the per-user one. It supports Ubuntu related services " "out-of-box, too." msgstr "" "<systemitem role=\"package\">dput</systemitem> 套件提供了更多的特性,相比於 " "<systemitem role=\"package\">dupload</systemitem> 也越來越受歡迎。它使用 " "<filename>/etc/dput</filename> 檔案作爲全局設定檔案、<filename>~/.dput.cf</" "filename> 作爲用戶設定檔案。它也直接支持 Ubuntu 相關的服務。" #. type: Content of: <book><chapter><section><para> #, fuzzy #| msgid "" #| "Once you become an official developer, you'll need to upload the package " #| "to the Debian archive. You can do this manually, but it's easier to use " #| "the provided 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=\"0\"/>" msgid "" "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\"/>" msgstr "" "當你成爲正式的開發人員,你會需要把套件上傳到 Debian 倉庫。你可以手工進行這項" "工作,但使用例如 <citerefentry> <refentrytitle>dupload</refentrytitle> " "<manvolnum>1</manvolnum> </citerefentry> 或 <citerefentry> " "<refentrytitle>dput</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> " "的自動化工具可以幫你更好地完成這項操作。在此我們將敘述如何使用 " "<command>dupload</command> 操作。<placeholder type=\"footnote\" id=\"0\"/>" #. type: Content of: <book><chapter><section><para> msgid "" "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." msgstr "" "首先需要設置 <command>dupload</command> 的設定檔案。你既可以編輯系統級的 " "<filename>/etc/dupload.conf</filename> 檔案,也可以使用自己的 <filename>~/." "dupload.conf</filename> 檔案覆蓋一些需要修改的設置。" #. type: Content of: <book><chapter><section><para> msgid "" "You can read the <citerefentry> <refentrytitle>dupload.conf</refentrytitle> " "<manvolnum>5</manvolnum> </citerefentry> manual page to understand what each " "of these options means." msgstr "" "你可以閱讀 <citerefentry> <refentrytitle>dupload.conf</refentrytitle> " "<manvolnum>5</manvolnum> </citerefentry> man 手冊頁來了解各選項的含義。" #. type: Content of: <book><chapter><section><para><footnote><para> #, fuzzy #| msgid "" #| "For more help about these, check in <ulink url=\"&developers-reference;" #| "\">Debian Developer's Reference</ulink>." msgid "" "See <ulink url=\"&devref-upload;\">Debian Developer's Reference 5.6. " "'Uploading a package'</ulink>." msgstr "" "關於這些問題的更多幫助,査看 <ulink url=\"&developers-reference;\">Debian " "Developer's Reference</ulink>。" #. type: Content of: <book><chapter><section><para> #, fuzzy #| msgid "" #| "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." msgid "" "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\"/>" msgstr "" "<literal>$default_host</literal> 選項決定了默認使用哪個上傳隊列," "<literal>anonymous-ftp-master</literal> 是最基本的一個,但你很可能希望改用其" "他的。" #. type: Content of: <book><chapter><section><para> msgid "" "While connected to the Internet, you can upload your package by the " "following:" msgstr "連接到互聯網後,可以使用以下命令上傳你的套件:" #. type: Content of: <book><chapter><section><screen> #, no-wrap msgid "$ dupload gentoo_0.9.12-1_i386.changes\n" msgstr "$ dupload gentoo_0.9.12-1_i386.changes\n" #. type: Content of: <book><chapter><section><para> msgid "" "<command>dupload</command> checks that the MD5/SHA1/SHA256 checksums of the " "files match those from 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." msgstr "" "<command>dupload</command> 會檢査檔案的 MD5/SHA1/SHA256 校驗和是否與 " "<filename>.changes</filename> 檔案中的相匹配,如果不匹配它會做出警告。你應按" "照如 <xref linkend=\"completebuild\"/> 所述來重構建套件使得它可以被正常上傳。" #. type: Content of: <book><chapter><section><para><footnote><para> msgid "" "See <ulink url=\"&uploadqueue-readme;\"/>. Alternatively, you may use " "<command>dcut</command> command from the <systemitem role=\"package\">dput</" "systemitem> package." msgstr "" #. type: Content of: <book><chapter><section><para> msgid "" "If you encounter an upload problem at <ulink url=\"&uploadqueue;\"/>, you " "can fix this by manually uploading GPG signed <filename>*.commands</" "filename> file to there with <command>ftp</command>. <placeholder type=" "\"footnote\" id=\"0\"/> For example, use <filename>hello.commands</filename>:" msgstr "" #. type: Content of: <book><chapter><section><screen> #, no-wrap msgid "" "-----BEGIN PGP SIGNED MESSAGE-----\n" "Uploader: Foo Bar <Foo.Bar@example.org>\n" "Commands: \n" " rm hello_1.0-1_i386.deb\n" " mv hello_1.0-1.dsx hello_1.0-1.dsc\n" "-----BEGIN PGP SIGNATURE-----\n" "Version: 2.6.3ia\n" "iQCVAwUBNFiQSXVhJ0HiWnvJAQG58AP+IDJVeSWmDvzMUphScg1EK0mvChgnuD7h\n" "BRiVQubXkB2DphLJW5UUSRnjw1iuFcYwH/lFpNpl7XP95LkLX3iFza9qItw4k2/q\n" "tvylZkmIA9jxCyv/YB6zZCbHmbvUnL473eLRoxlnYZd3JFaCZMJ86B0Ph4GFNPAf\n" "Z4jxNrgh7Bc=\n" "=pH94\n" "-----END PGP SIGNATURE-----\n" msgstr "" "-----BEGIN PGP SIGNED MESSAGE-----\n" "Uploader: Foo Bar <Foo.Bar@example.org>\n" "Commands: \n" " rm hello_1.0-1_i386.deb\n" " mv hello_1.0-1.dsx hello_1.0-1.dsc\n" "-----BEGIN PGP SIGNATURE-----\n" "Version: 2.6.3ia\n" "iQCVAwUBNFiQSXVhJ0HiWnvJAQG58AP+IDJVeSWmDvzMUphScg1EK0mvChgnuD7h\n" "BRiVQubXkB2DphLJW5UUSRnjw1iuFcYwH/lFpNpl7XP95LkLX3iFza9qItw4k2/q\n" "tvylZkmIA9jxCyv/YB6zZCbHmbvUnL473eLRoxlnYZd3JFaCZMJ86B0Ph4GFNPAf\n" "Z4jxNrgh7Bc=\n" "=pH94\n" "-----END PGP SIGNATURE-----\n" #. type: Content of: <book><chapter><section><title> msgid "Skipped uploads" msgstr "跳過的上傳" #. type: Content of: <book><chapter><section><para> msgid "" "If you created multiple entries in <filename>debian/changelog</filename> by " "skipping uploads, you must create a proper <filename>*_.changes</filename> " "file which includes all changes from the last upload." msgstr "" "如果你在 <filename>debian/changelog</filename> 創建了多個條目並跳過了上傳,你" "必須創建一個對應的 <filename>*_.changes</filename> 檔案,其中包含自上次上傳以" "來的全部變更記錄。" #. type: Content of: <book><chapter><section><para> msgid "" "This can be done by specifying <literal>-v</literal> option to the package " "building programs such as <command>dpkg-buildpackage</command>, " "<command>debuild</command>, <command>pdebuild</command>, etc." msgstr "" "這可以通過傳遞 <literal>-v</literal> 選項給例如 <command>dpkg-buildpackage</" "command>、<command>debuild</command>、<command>pdebuild</command> 等軟體構建" "程式來完成。" #. type: Content of: <book><chapter><title> msgid "Updating the package" msgstr "更新套件" #. type: Content of: <book><chapter><para> msgid "Once you release a package, you need to update it soon." msgstr "一旦你發佈了一個套件,在之後的某個時間裏就需要對它進行更新。" #. type: Content of: <book><chapter><section><title> msgid "New Debian revision" msgstr "新的 Debian 版本" #. type: Content of: <book><chapter><section><para> msgid "" "Let's say that a bug report was filed against your package as " "<literal>#54321</literal>, and it describes a problem that you can solve. " "To create a new Debian revision of the package, you need to:" msgstr "" "假設針對你的套件報告的 Bug 號爲 <literal>#54321</literal>,它描述了一個你可以" "解決的問題。要創建套件的一個新 Debian 版本,你需要:" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "If this is to be recorded as a new patch, do the following." msgstr "如果要將它記錄於新的補丁中,這樣做:" #. type: Content of: <book><chapter><section><itemizedlist><listitem><itemizedlist><listitem><para> #, fuzzy #| msgid "" #| "<literal>quilt new <replaceable>bugname.patch</replaceable></literal> to " #| "set patch name;" msgid "" "<literal>dquilt new <replaceable>bugname.patch</replaceable></literal> to " "set patch name;" msgstr "" "<literal>quilt new <replaceable>bugname.patch</replaceable></literal> 設置補" "丁名稱;" #. type: Content of: <book><chapter><section><itemizedlist><listitem><itemizedlist><listitem><para> #, fuzzy #| msgid "" #| "<literal>quilt add <replaceable>buggy-file</replaceable></literal> to " #| "declare file to be modified;" msgid "" "<literal>dquilt add <replaceable>buggy-file</replaceable></literal> to " "declare file to be modified;" msgstr "" "<literal>quilt add <replaceable>buggy-file</replaceable></literal> 聲明檔案將" "被更改;" #. type: Content of: <book><chapter><section><itemizedlist><listitem><itemizedlist><listitem><para> msgid "Correct the problem in the package source for the upstream bug;" msgstr "修正套件程式碼中的上游 Bug;" #. type: Content of: <book><chapter><section><itemizedlist><listitem><itemizedlist><listitem><para> #, fuzzy #| msgid "" #| "<literal>quilt refresh</literal> to record to " #| "<filename><replaceable>bugname.patch</replaceable></filename>;" msgid "" "<literal>dquilt refresh</literal> to record to " "<filename><replaceable>bugname.patch</replaceable></filename>;" msgstr "" "<literal>quilt refresh</literal> 將修改記錄到 <filename><replaceable>bugname." "patch</replaceable></filename>;" #. type: Content of: <book><chapter><section><itemizedlist><listitem><itemizedlist><listitem><para> #, fuzzy #| msgid "<literal>quilt header -e</literal> to add its description;" msgid "<literal>dquilt header -e</literal> to add its description;" msgstr "<literal>quilt header -e</literal> 添加對它的描述;" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "If this is to update an existing patch, do the following." msgstr "如果是更新一個已存在的補丁,這樣做:" #. type: Content of: <book><chapter><section><itemizedlist><listitem><itemizedlist><listitem><para> #, fuzzy #| msgid "" #| "<literal>quilt pop <replaceable>foo.patch</replaceable></literal> to " #| "recall existing <filename><replaceable>foo.patch</replaceable></filename>;" msgid "" "<literal>dquilt pop <replaceable>foo.patch</replaceable></literal> to recall " "existing <filename><replaceable>foo.patch</replaceable></filename>;" msgstr "" "<literal>quilt pop <replaceable>foo.patch</replaceable></literal> 重現已存在" "的 <filename><replaceable>foo.patch</replaceable></filename>;" #. type: Content of: <book><chapter><section><itemizedlist><listitem><itemizedlist><listitem><para> msgid "" "Correct the problem in the old <filename><replaceable>foo.patch</" "replaceable></filename>;" msgstr "" "修正舊的 <filename><replaceable>foo.patch</replaceable></filename> 中的問題;" #. type: Content of: <book><chapter><section><itemizedlist><listitem><itemizedlist><listitem><para> #, fuzzy #| msgid "" #| "<literal>quilt refresh</literal> to update <filename><replaceable>foo." #| "patch</replaceable></filename>;" msgid "" "<literal>dquilt refresh</literal> to update <filename><replaceable>foo." "patch</replaceable></filename>;" msgstr "" "<literal>quilt refresh</literal> 更新 <filename><replaceable>foo.patch</" "replaceable></filename>;" #. type: Content of: <book><chapter><section><itemizedlist><listitem><itemizedlist><listitem><para> #, fuzzy #| msgid "<literal>quilt header -e</literal> to update its description;" msgid "<literal>dquilt header -e</literal> to update its description;" msgstr "<literal>quilt header -e</literal> 更新對它的描述;" #. type: Content of: <book><chapter><section><itemizedlist><listitem><itemizedlist><listitem><para> #, fuzzy #| msgid "" #| "<literal>while quilt push; do quilt refresh; done</literal> to apply all " #| "patches while removing <emphasis>fuzz</emphasis>;" msgid "" "<literal>while dquilt push; do dquilt refresh; done</literal> to apply all " "patches while removing <emphasis>fuzz</emphasis>;" msgstr "" "<literal>while quilt push; do quilt refresh; done</literal> 應用所有補丁以確" "保它們 <emphasis>邊界清晰</emphasis>;" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para><footnote><para> msgid "" "To get the date in the required format, use <literal>LANG=C date -R</" "literal>." msgstr "要獲得需要的日期格式,使用 <literal>LANG=C date -R</literal>。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "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\"/>" msgstr "" "在 Debian <filename>changelog</filename> 檔案的頂部添加一個條目。例如可以使" "用 <literal>dch -i</literal> 或用 <literal>dch -v <replaceable>version</" "replaceable>-<replaceable>revision</replaceable></literal> 來指定版本,然後用" "你喜歡的編輯器插入訊息。<placeholder type=\"footnote\" id=\"0\"/>" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "Include a short description of the bug and the solution in the changelog " "entry, followed by <literal>Closes: #54321</literal>. That way, the bug " "report will be <emphasis>automagically</emphasis> closed by the archive " "maintenance software the moment your package gets accepted in the Debian " "archive." msgstr "" "在 changlog 條目中簡要描述 Bug 和相應的解決辦法,並在後面添加 " "<literal>Closes: #54321</literal>。這樣 Bug 報告會在你的套件被 Debian 倉庫接" "受的同時被倉庫管理軟體 <emphasis>自動關閉</emphasis>。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "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." msgstr "" "重複上述操作來修復更多的 Bug,並在需要的時候使用 <literal>dch</literal> 更新 " "Debian <filename>changelog</filename> 檔案。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "Repeat what you did in <xref linkend=\"completebuild\"/>, <xref linkend=" "\"checkit\"/>, and <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." msgstr "" "重複在 <xref linkend=\"completebuild\"/> 、<xref linkend=\"checkit\"/> 和 " "<xref linkend=\"upload\"/> 中進行的操作。惟一的區別是這次不需要再包含原始程式" "碼檔案,因爲它們沒有變化且已經存在於 Debian 倉庫中。" #. type: Content of: <book><chapter><section><title> msgid "Inspection of the new upstream release" msgstr "檢査新上游版本" #. type: Content of: <book><chapter><section><para> msgid "" "When preparing packages of the new upstream release for the Debian archive, " "you must check the new upstream release, first." msgstr "在爲 Debian 倉庫準備新上游版本的套件前,你必須首先檢査它。" #. type: Content of: <book><chapter><section><para> msgid "" "You start this by reading the upstream <filename>changelog</filename>, " "<filename>NEWS</filename>, and whatever other documentations they may have " "released with the new version." msgstr "" "檢査工作應從閱讀 <filename>changelog</filename>、<filename>NEWS</filename> 以" "及所有隨新版本一同發佈的文件。" #. type: Content of: <book><chapter><section><para> msgid "" "You then inspect changes between the old and new upstream sources as follow " "to watch out for anything suspicious." msgstr "然後應按照以下步驟檢査新舊版本之間的差別,看是否存在可疑的內容:" #. type: Content of: <book><chapter><section><screen> #, no-wrap msgid "$ diff -urN <replaceable>foo</replaceable>-<replaceable>oldversion</replaceable> <replaceable>foo</replaceable>-<replaceable>newversion</replaceable>\n" msgstr "$ diff -urN <replaceable>foo</replaceable>-<replaceable>oldversion</replaceable> <replaceable>foo</replaceable>-<replaceable>newversion</replaceable>\n" #. type: Content of: <book><chapter><section><para> msgid "" "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 erase them before " "running <command>diff</command> to the source for inspection." msgstr "" "對於 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> 進行程式碼檢査前刪除它們。" #. type: Content of: <book><chapter><section><title> msgid "New upstream release" msgstr "新上游版本" #. type: Content of: <book><chapter><section><para><footnote><para> msgid "" "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." msgstr "" "如果套件 <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> 來完成。" #. type: Content of: <book><chapter><section><para> msgid "" "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 few obvious chores." msgstr "" "如果套件 <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\"/>當然,你需要做幾個很顯然的雜事。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "Create a copy of upstream source as the " "<filename>foo_<replaceable>newversion</replaceable>.tar.gz</filename> file." msgstr "" "創建一份上游原始碼的副本,命名爲 <filename>foo_<replaceable>newversion</" "replaceable>.tar.gz</filename>" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "Update the Debian <filename>changelog</filename> file with <literal>dch -v " "<replaceable>newversion</replaceable>-<replaceable>1</replaceable></literal>." msgstr "" "使用 <literal>dch -v <replaceable>newversion</replaceable>-<replaceable>1</" "replaceable></literal> 更新 Debian <filename>changelog</filename> 檔案。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><itemizedlist><listitem><para> #, fuzzy #| msgid "Add an entry with New upstream release." msgid "Add an entry with <literal>New upstream release</literal>." msgstr "添加一個條目,內容爲 New upstream release。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><itemizedlist><listitem><para> #, fuzzy #| msgid "" #| "Describe concisely the changes <emphasis>in the new upstream release</" #| "emphasis> that fix reported bugs and close those bugs." msgid "" "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>." msgstr "簡明地介紹 <emphasis>在新上游版本中</emphasis> 上游修復和關閉的 Bug。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><itemizedlist><listitem><para> #, fuzzy #| msgid "" #| "Describe concisely the changes <emphasis>to the new upstream release</" #| "emphasis> by the maintainer that fix reported bugs and close those bugs." msgid "" "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>." msgstr "" "簡明地介紹維護者 <emphasis>對此新上游版本</emphasis> 做出的修改,修復和關閉" "的 Bug。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> #, fuzzy #| msgid "" #| "<literal>while quilt push; do quilt refresh; done</literal> to apply all " #| "patches while removing <emphasis>fuzz</emphasis>." msgid "" "<literal>while dquilt push; do dquilt refresh; done</literal> to apply all " "patches while removing <emphasis>fuzz</emphasis>." msgstr "" "運行 <literal>while quilt push; do quilt refresh; done</literal> 以應用全部補" "丁並使它們 <emphasis>邊界清晰</emphasis>。" #. type: Content of: <book><chapter><section><para> msgid "" "If the patch/merge did not apply cleanly, inspect the situation (clues are " "left in <filename>.rej</filename> files)." msgstr "" "如果補丁沒有乾淨地被應用,檢査原因(線索在 <filename>.rej</filename> 檔案裏)。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "If a patch you applied to the source was integrated to the upstream source," msgstr "如果你的補丁已經被上游接受:" #. type: Content of: <book><chapter><section><itemizedlist><listitem><itemizedlist><listitem><para> #, fuzzy #| msgid "<literal>quilt delete</literal> to remove it." msgid "<literal>dquilt delete</literal> to remove it." msgstr "使用 <literal>quilt delete</literal> 刪除它。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "If a patch you applied to the source conflicted with new changes in the " "upstream source," msgstr "如果你的補丁與上游程式碼中的變更有衝突:" #. type: Content of: <book><chapter><section><itemizedlist><listitem><itemizedlist><listitem><para> #, fuzzy #| msgid "" #| "<literal>quilt push -f</literal> to apply old patches while forcing " #| "rejects as <filename><replaceable>baz</replaceable>.rej</filename>." msgid "" "<literal>dquilt push -f</literal> to apply old patches while forcing rejects " "as <filename><replaceable>baz</replaceable>.rej</filename>." msgstr "" "使用 <literal>quilt push -f</literal> 應用舊補丁,未應用的部分會被保存爲 " "<filename><replaceable>baz</replaceable>.rej</filename>。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><itemizedlist><listitem><para> msgid "" "Edit the <filename><replaceable>baz</replaceable></filename> file manually " "to realize intended effect of <filename><replaceable>baz</replaceable>.rej</" "filename>." msgstr "" "手工編輯 <filename><replaceable>baz</replaceable></filename> 來在新的程式碼中" "實現 <filename><replaceable>baz</replaceable>.rej</filename> 中應有的效果。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><itemizedlist><listitem><para> #, fuzzy #| msgid "<literal>quilt refresh</literal> to update the patch." msgid "<literal>dquilt refresh</literal> to update the patch." msgstr "使用 <literal>quilt refresh</literal> 更新補丁。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> #, fuzzy #| msgid "" #| "Continue back to <literal>while quilt push; do quilt refresh; done</" #| "literal>." msgid "" "Continue back to <literal>while dquilt push; do dquilt refresh; done</" "literal>." msgstr "再次運行 <literal>while quilt push; do quilt refresh; done</literal>。" #. type: Content of: <book><chapter><section><para> msgid "" "This process can be automated using the <citerefentry> " "<refentrytitle>uupdate</refentrytitle> <manvolnum>1</manvolnum> </" "citerefentry> command as follows:" msgstr "" "這個過程可以通過使用 <citerefentry> <refentrytitle>uupdate</refentrytitle> " "<manvolnum>1</manvolnum> </citerefentry> 來更自動化地完成:" #. type: Content of: <book><chapter><section><screen> #, fuzzy, no-wrap #| msgid "" #| "$ apt-get source <replaceable>foo</replaceable>\n" #| "...\n" #| "dpkg-source: info: extracting <replaceable>foo</replaceable> in <replaceable>foo</replaceable>-<replaceable>oldversion</replaceable>\n" #| "dpkg-source: info: unpacking <replaceable>foo</replaceable>_<replaceable>oldversion</replaceable>.orig.tar.gz\n" #| "dpkg-source: info: applying <replaceable>foo</replaceable>_<replaceable>oldversion</replaceable>-1.debian.tar.gz\n" #| "$ ls -F\n" #| "<replaceable>foo</replaceable>-<replaceable>oldversion</replaceable>/\n" #| "<replaceable>foo</replaceable>_<replaceable>oldversion</replaceable>-1.debian.tar.gz\n" #| "<replaceable>foo</replaceable>_<replaceable>oldversion</replaceable>-1.dsc\n" #| "<replaceable>foo</replaceable>_<replaceable>oldversion</replaceable>.orig.tar.gz\n" #| "$ wget http://example.org/<replaceable>foo</replaceable>/<replaceable>foo</replaceable>-<replaceable>newversion</replaceable>.tar.gz\n" #| "$ cd <replaceable>foo</replaceable>-<replaceable>oldversion</replaceable>\n" #| "$ uupdate -v <replaceable>newversion</replaceable> ../<replaceable>foo</replaceable>-<replaceable>newversion</replaceable>.tar.gz\n" #| "$ cd ../<replaceable>foo</replaceable>-<replaceable>newversion</replaceable>\n" #| "$ while quilt push; do quilt refresh; done\n" #| "$ dch\n" #| "... document changes made\n" msgid "" "$ apt-get source <replaceable>foo</replaceable>\n" "...\n" "dpkg-source: info: extracting <replaceable>foo</replaceable> in <replaceable>foo</replaceable>-<replaceable>oldversion</replaceable>\n" "dpkg-source: info: unpacking <replaceable>foo</replaceable>_<replaceable>oldversion</replaceable>.orig.tar.gz\n" "dpkg-source: info: applying <replaceable>foo</replaceable>_<replaceable>oldversion</replaceable>-1.debian.tar.gz\n" "$ ls -F\n" "<replaceable>foo</replaceable>-<replaceable>oldversion</replaceable>/\n" "<replaceable>foo</replaceable>_<replaceable>oldversion</replaceable>-1.debian.tar.gz\n" "<replaceable>foo</replaceable>_<replaceable>oldversion</replaceable>-1.dsc\n" "<replaceable>foo</replaceable>_<replaceable>oldversion</replaceable>.orig.tar.gz\n" "$ wget http://example.org/<replaceable>foo</replaceable>/<replaceable>foo</replaceable>-<replaceable>newversion</replaceable>.tar.gz\n" "$ cd <replaceable>foo</replaceable>-<replaceable>oldversion</replaceable>\n" "$ uupdate -v <replaceable>newversion</replaceable> ../<replaceable>foo</replaceable>-<replaceable>newversion</replaceable>.tar.gz\n" "$ cd ../<replaceable>foo</replaceable>-<replaceable>newversion</replaceable>\n" "$ while dquilt push; do dquilt refresh; done\n" "$ dch\n" "... document changes made\n" msgstr "" "$ apt-get source <replaceable>foo</replaceable>\n" "...\n" "dpkg-source: info: extracting <replaceable>foo</replaceable> in <replaceable>foo</replaceable>-<replaceable>oldversion</replaceable>\n" "dpkg-source: info: unpacking <replaceable>foo</replaceable>_<replaceable>oldversion</replaceable>.orig.tar.gz\n" "dpkg-source: info: applying <replaceable>foo</replaceable>_<replaceable>oldversion</replaceable>-1.debian.tar.gz\n" "$ ls -F\n" "<replaceable>foo</replaceable>-<replaceable>oldversion</replaceable>/\n" "<replaceable>foo</replaceable>_<replaceable>oldversion</replaceable>-1.debian.tar.gz\n" "<replaceable>foo</replaceable>_<replaceable>oldversion</replaceable>-1.dsc\n" "<replaceable>foo</replaceable>_<replaceable>oldversion</replaceable>.orig.tar.gz\n" "$ wget http://example.org/<replaceable>foo</replaceable>/<replaceable>foo</replaceable>-<replaceable>newversion</replaceable>.tar.gz\n" "$ cd <replaceable>foo</replaceable>-<replaceable>oldversion</replaceable>\n" "$ uupdate -v <replaceable>newversion</replaceable> ../<replaceable>foo</replaceable>-<replaceable>newversion</replaceable>.tar.gz\n" "$ cd ../<replaceable>foo</replaceable>-<replaceable>newversion</replaceable>\n" "$ while quilt push; do quilt refresh; done\n" "$ dch\n" "... document changes made\n" #. type: Content of: <book><chapter><section><para><footnote><para> msgid "" "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." msgstr "" "如果 <command>uscan</command> 命令下載並更新了原始碼,但沒有運行 " "<command>uupdate</command> 命令,你應該修正 <filename>debian/watch</" "filename> 檔案,使 URL 末尾後帶有 <literal>debian uupdate</literal>。" #. type: Content of: <book><chapter><section><para> msgid "" "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\"/" ">" msgstr "" "如果你按照 <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\"/>" #. type: Content of: <book><chapter><section><para> msgid "" "You can release this updated source by repeating what you did in <xref " "linkend=\"completebuild\"/>, <xref linkend=\"checkit\"/>, and <xref linkend=" "\"upload\"/>." msgstr "" "重複 <xref linkend=\"completebuild\"/> 、<xref linkend=\"checkit\"/> 和 " "<xref linkend=\"upload\"/> 中的操作,即可發佈此更新的套件。" #. type: Content of: <book><chapter><section><title> msgid "Updating the packaging style" msgstr "更新打包風格" #. type: Content of: <book><chapter><section><para><footnote><para> msgid "" "If your sponsor or other maintainers object to updating the existing " "packaging style, it is not worth bothering nor arguing. There are more " "important things to do." msgstr "" "如果你的 sponsor 或其他維護者一定反對更新已有的打包風格,則不值得去爲此煩惱或" "爭論,總是有更重要的事要做。" #. type: Content of: <book><chapter><section><para> msgid "" "Updating the package style is not a required activity for the update of a " "package. But, you can use the full capability of the modern <systemitem " "role=\"package\">debhelper</systemitem> system and the <literal>3.0</" "literal> source format by doing this. <placeholder type=\"footnote\" id=" "\"0\"/>" msgstr "" "更新打包風格不是更新套件的必須步驟,但是這樣可以使你的套件得到對現代的 " "<systemitem role=\"package\">debhelper</systemitem> 系統和 <literal>3.0</" "literal> 原始碼套件格式完整的兼容性。<placeholder type=\"footnote\" id=\"0\"/" ">" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "If you need to add erased template files for any reason, you may run " "<command>dh_make</command> again in the same Debian package source tree with " "<literal>--addmissing</literal> option. Then edit them properly." msgstr "" "如果你需要重新添加已刪除的模板檔案,可以在同一個 Debian 套件原始碼樹中運行 " "<command>dh_make</command>,並添加 <literal>--addmissing</literal> 選項。然後" "對模板進行相應的編輯。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "If the package has not 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." msgstr "" "如果套件的 <filename>debian/rules</filename> 檔案沒有更新爲使用 <systemitem " "role=\"package\">debhelper</systemitem> V7 的 <command>dh</command> 語法,則" "更新它使用 <command>dh</command>。在需要的時候更新 <filename>debian/control</" "filename> 檔案。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para><footnote><para> msgid "" "In the <systemitem role=\"package\">cdbs</systemitem> (0.4.74) package, " "there are some negative descriptions of the <filename>rules</filename> file " "created by the <command>dh_make</command> command for the non-<systemitem " "role=\"package\">cdbs</systemitem> choices. Do not worry about it. It " "applies only for <literal>lenny</literal> which created explicit targets " "with long list of <command>dh_*</command> commands." msgstr "" "在 <systemitem role=\"package\">cdbs</systemitem> (0.4.74)套件中有一些對於 " "<command>dh_make</command> 創建的非 <systemitem role=\"package\">cdbs</" "systemitem> 的 <filename>rules</filename> 檔案的消極描述。不要擔心它們,它們" "僅是針對於 <literal>lenny</literal> 中需要列出大串的 <command>dh_*</command> " "命令而言的。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> #, fuzzy #| msgid "" #| "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 <filename>/usr/share/doc/cdbs/cdbs-" #| "doc.html</filename> and understand its <literal>DEB_*</literal> " #| "configuration variables. <placeholder type=\"footnote\" id=\"0\"/>" msgid "" "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 <ulink url=\"&cdbs-doc;\">cdbs-doc.pdf.gz</ulink> and " "understand its <literal>DEB_*</literal> configuration variables. " "<placeholder type=\"footnote\" id=\"0\"/>" msgstr "" "如果你希望將使用 <systemitem role=\"package\">cdbs</systemitem> 的 " "<filename>Makefile</filename> 語法創建的 <filename>rules</filename> 檔案更新" "爲 <command>dh</command> 語法,參考 <filename>/usr/share/doc/cdbs/cdbs-doc." "html</filename> 並理解各 <literal>DEB_*</literal> 設定變量。<placeholder " "type=\"footnote\" id=\"0\"/>" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "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 <filename>debian/*</filename> files can be just " "copied." msgstr "" "如果你有一個不帶有 <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> 目錄中的其他檔案可以直接複製過來。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para><footnote><para> msgid "" "You may split <filename>big.diff</filename> into many small incremental " "patches using the <command>splitdiff</command> command." msgstr "" "你可能使用 <command>splitdiff</command> 命令將 <filename>big.diff</filename> " "分割爲多個有各自作用的補丁。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "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 <filename>debian/*</filename> files can be just " "copied. Import the <filename>big.diff</filename> file generated by the " "<literal>filterdiff -z -x '*/debian/*' <replaceable>foo</replaceable>.diff." "gz > big.diff</literal> command to your <command>quilt</command> system, " "if needed. <placeholder type=\"footnote\" id=\"0\"/>" msgstr "" "如果你有一個帶有 <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 > big.diff</literal> 生成的 <filename>big.diff</filename> 檔案導入" "到 <command>quilt</command> 系統。<placeholder type=\"footnote\" id=\"0\"/>" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> #, fuzzy #| msgid "" #| "If it was packaged with 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 the <systemitem role=\"package\">quilt</" #| "systemitem> command using <filename>deb3</filename> at <ulink url=\"&deb3;" #| "\">&deb3;</ulink>." msgid "" "If it was packaged with 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 the <systemitem role=\"package\">quilt</systemitem> command " "using <filename>deb3</filename> at <ulink url=\"&deb3;\"/>." msgstr "" "如果它使用了其他的補丁系統,例如 <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> 系統。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "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 such " "things and make it use the newer <literal>3.0 (native)</literal> source " "format." msgstr "" "如果它使用 <command>dh</command> 命令的 <literal>--with quilt</literal> 選" "項,或 <command>dh_quilt_patch</command> 和 <command>dh_quilt_unpatch</" "command> 命令,刪除它們並使其使用新的 <literal>3.0 (native)</literal> 原始碼" "套件格式。" #. type: Content of: <book><chapter><section><para> msgid "" "You need to do other tasks described in <xref linkend=\"newupstream\"/>, too." msgstr "當然你還需要按照 <xref linkend=\"newupstream\"/> 完成其他的步驟。" #. type: Content of: <book><chapter><section><title> msgid "Reminders for updating packages" msgstr "對更新套件的幾點提示" #. type: Content of: <book><chapter><section><para> msgid "Here are few reminders for updating packages." msgstr "以下是對更新套件的幾點提示。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "Preserve old <filename>changelog</filename> entries (sounds obvious, but " "there have been incidents to type <literal>dch</literal> when you should " "have typed <literal>dch -i</literal>.)" msgstr "" "保留舊的 <filename>changelog</filename> 條目(看似顯然,但是總有可能把 " "<literal>dch -i</literal> 輸入爲 <literal>dch</literal>)。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "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." msgstr "" "已存在的 Debian 修改需要被重新校驗,去除上游已經接受的東西,除非有必要的原" "因,還要記錄尚未被上游接受的部分。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "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." msgstr "" "如果對編譯系統作出了修改(希望你已經在檢査上游變更時瞭解了這些),那麼要在必要" "時更新 <filename>debian/rules</filename> 和 <filename>debian/control</" "filename> 編譯依賴關係。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "Check to see <ulink url=\"&bts;\">Debian Bug Tracking System (BTS)</ulink> " "if someone have provided patches to bugs that are currently open in it." msgstr "" "檢査 <ulink url=\"&bts;\">Debian Bug Tracking System (BTS)</ulink> 是否有人爲" "某些仍然未修復的 Bug 提供了補丁。" #. type: Content of: <book><chapter><section><itemizedlist><listitem><para> msgid "" "Check the contents of the <filename>.changes</filename> file to make sure " "you are uploading to the correct distribution, the proper bugs 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." msgstr "" "檢査 <filename>.changes</filename> 檔案以確保你正要上傳到正確的發行版、正確的" "列於 <literal>Closes</literal> 欄位的 Bug、<literal>Maintainer</literal> 和 " "<literal>Changed-By</literal> 欄位相匹配,且該檔案已經使用 GPG 簽署等。" #~ msgid "<firstname>Josip</firstname> <surname>Rodin</surname>" #~ msgstr "<firstname>Josip</firstname> <surname>Rodin</surname>" #~ msgid "<firstname>Osamu</firstname> <surname>Aoki</surname>" #~ msgstr "<firstname>Osamu</firstname> <surname>Aoki</surname>" #, fuzzy #~| msgid "New Debian revision" #~ msgid "How Debian functions" #~ msgstr "新的 Debian 版本" #, fuzzy #~| msgid "There are several role names used around Debian." #~ msgid "Here are my reminders on how Debian functions." #~ msgstr "在 Debian 社群中有幾個常見的角色。" #, fuzzy #~| msgid "" #~| "The <systemitem role=\"package\">gentoo</systemitem> package uses the " #~| "GNU build system, also known as the Autotools. See <ulink url=\"&gnu-" #~| "build-system;\">&gnu-build-system;</ulink>." #~ msgid "" #~ "The <systemitem role=\"package\">gentoo</systemitem> package uses the " #~ "<ulink url=\"&gnu-build-system;\">GNU build system</ulink>, also known as " #~ "the Autotools." #~ msgstr "" #~ "<systemitem role=\"package\">gentoo</systemitem> 套件使用 GNU 編譯系統,又" #~ "稱 Autotools。參考 <ulink url=\"&gnu-build-system;\">&gnu-build-system;</" #~ "ulink>" #~ msgid "" #~ "The last feature you need to know about is <literal>${shlibs:Depends}</" #~ "literal>, <literal>${perl:Depends}</literal>, <literal>${misc:Depends}</" #~ "literal>, etc. These entries are substituted by the list generated by " #~ "other <systemitem role=\"package\">debhelper</systemitem> components when " #~ "the <citerefentry> <refentrytitle>dh_gencontrol</refentrytitle> " #~ "<manvolnum>1</manvolnum> </citerefentry> command is executed." #~ msgstr "" #~ "你應當知道的最後一個特性是關於 <literal>${shlibs:Depends}</literal>、" #~ "<literal>${perl:Depends}</literal>、<literal>${misc:Depends}</literal> " #~ "等。這些條目的值會由 <systemitem role=\"package\">debhelper</systemitem> " #~ "的其他組件在 <citerefentry> <refentrytitle>dh_gencontrol</refentrytitle> " #~ "<manvolnum>1</manvolnum> </citerefentry> 運行時生成。" #, fuzzy #~| msgid "" #~| "See <ulink url=\"&mentors-dn;cgi-bin/welcome\">mentors.debian.net</" #~| "ulink> for publically accessible upload area for non-DD." #~ msgid "" #~ "See <ulink url=\"&mentors-dn;\"/> for publically accessible upload area " #~ "for non-DD." #~ msgstr "" #~ "査看 <ulink url=\"&mentors-dn;cgi-bin/welcome\">mentors.debian.net</" #~ "ulink> 來了解對於非 Debian Developer 可用的公共上傳位置。" #~ msgid "" #~ "See <ulink url=\"&debref-archive;\">Debian Reference, 2.7.12. 'Small " #~ "public package archive'</ulink> for an example for creating a small " #~ "public package archive compatible with the modern secure APT system." #~ msgstr "" #~ "訪問 <ulink url=\"&debref-archive;\">Debian Reference, 2.7.12. 'Small " #~ "public package archive'</ulink> 來査看一個創建與現代的安全 APT 系統兼容的" #~ "公共套件倉庫的例子。" #~ msgid "" #~ "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 on the Debian Mentors' mailing list at <ulink url=\"&debian-mentors-" #~ "ldo;\">debian-mentors@lists.debian.org</ulink>. The more experienced " #~ "Debian developers will gladly help you, but do read at least some of the " #~ "documentation before asking a question!" #~ msgstr "" #~ "如果在所有可用的文件和在線資源中都無法找到答案,你可以在 Debian Mentors 郵" #~ "件列表詢問(<ulink url=\"&debian-mentors-ldo;\">debian-mentors@lists." #~ "debian.org</ulink>)。在那裏會有經驗更加豐富的 Debian 開發人員幫助你,但在" #~ "發問前請確定要閱讀已有的文件!" #~ msgid "" #~ "If you still have questions, ask on the Debian Developers' mailing list " #~ "at <ulink url=\"&debian-devel-ldo;\">debian-devel@lists.debian.org</" #~ "ulink>. See <ulink url=\"&debian-devel-ldo;\">&debian-devel-ldo;</ulink> " #~ "for more information about this mailing list." #~ msgstr "" #~ "如果仍然不能解決所有的問題,則到 Debian Developers 郵件列表詢問(<ulink " #~ "url=\"&debian-devel-ldo;\">debian-devel@lists.debian.org</ulink>)。關於此" #~ "郵件列表,參考 <ulink url=\"&debian-devel-ldo;\">&debian-devel-ldo;</" #~ "ulink>" #~ msgid "" #~ "You can also check package information through <ulink url=\"&packages-do;" #~ "\">package search page</ulink> and <ulink url=\"&packages-qa-do;\">Debian " #~ "Package Tracking System</ulink>." #~ msgstr "" #~ "你還可以通過 <ulink url=\"&packages-do;\">套件搜索頁面</ulink> 和 <ulink " #~ "url=\"&packages-qa-do;\">Debian Package Tracking System</ulink> (Debian 套" #~ "件跟蹤系統,PTS)査詢套件訊息。" #~ msgid "" #~ "Several different views of orphaned or RFA'ed packages are available at:" #~ msgstr "有幾種査看 RFA 套件的方法:" #~ msgid "" #~ "You can disable this configuration by starting the <command>quilt</" #~ "command> command as <literal>quilt --quiltrc /dev/null ...</literal>." #~ msgstr "" #~ "你可以通過 <literal>quilt --quiltrc /dev/null ...</literal> 來運行 " #~ "<command>quilt</command> 來禁用此設定檔案。" #~ msgid "This is what the dependencies mean:" #~ msgstr "以下是各種依賴關係的含義:" #~ msgid "" #~ "Section | Description | Notes\n" #~ " 1 User commands Executable commands or scripts.\n" #~ " 2 System calls Functions provided by the kernel.\n" #~ " 3 Library calls Functions within system libraries.\n" #~ " 4 Special files Usually found in /dev\n" #~ " 5 File formats E.g. /etc/passwd's format\n" #~ " 6 Games Or other frivolous programs\n" #~ " 7 Macro packages Such as man macros.\n" #~ " 8 System administration Programs typically only run by root.\n" #~ " 9 Kernel routines Non-standard calls and internals.\n" #~ msgstr "" #~ "章節 | 描述 | 註釋\n" #~ " 1 用戶命令 可執行命令或腳本。\n" #~ " 2 系統調用 核心提供的函數。\n" #~ " 3 函數函式庫調用 系統函式庫提供的函數。\n" #~ " 4 特殊檔案 常見於 /dev\n" #~ " 5 檔案格式 例如 /etc/passwd 的格式。\n" #~ " 6 遊戲 遊戲或其他無足輕重的程式。\n" #~ " 7 巨集包 例如 man 巨集。\n" #~ " 8 系統管理 典型由 root 運行的程式。\n" #~ " 9 核心函數 非標準調用和內部控制結構。\n" #~ msgid "" #~ "There were a major reorganization of menu structure for <literal>squeeze</" #~ "literal>." #~ msgstr "<literal>squeeze</literal> 的列表和以前的有了較大的調整。" #~ msgid "" #~ "<systemitem role=\"package\">topgit</systemitem>: a Git patch queue " #~ "manager" #~ msgstr "" #~ "<systemitem role=\"package\">topgit</systemitem>:一個 Git 補丁隊列管理" #~ "器。" #~ msgid "" #~ "Building Debian Packages with git-buildpackage at <filename>/usr/share/" #~ "doc/git-buildpackage/manual-html/gbp.html</filename>" #~ msgstr "" #~ "位於 <filename>/usr/share/doc/git-buildpackage/manual-html/gbp.html</" #~ "filename> 的 Building Debian Packages with git-buildpackage" #~ msgid "" #~ "<ulink url=\"http://git.debian.org/?p=collab-maint/topgit.git;" #~ "a=blob_plain;f=debian/HOWTO-tg2quilt;hb=HEAD\">Using TopGit to generate " #~ "quilt series for Debian packaging</ulink>" #~ msgstr "" #~ "<ulink url=\"http://git.debian.org/?p=collab-maint/topgit.git;" #~ "a=blob_plain;f=debian/HOWTO-tg2quilt;hb=HEAD\">Using TopGit to generate " #~ "quilt series for Debian packaging</ulink>" #~ msgid "" #~ "=====COMMENT===== Translation in [[this language]] is also available in " #~ "the <systemitem role=\"package\">maint-guide-xy</systemitem> package. " #~ "=====TNEMMOC=====" #~ msgstr "" #~ "=====COMMENT===== Translation in [[this language]] is also available in " #~ "the <systemitem role=\"package\">maint-guide-xy</systemitem> package. " #~ "=====TNEMMOC=====" #~ msgid "" #~ "=====COMMENT===== /usr/share/doc/debian is used be doc-debian and debian-" #~ "faq =====TNEMMOC=====" #~ msgstr "" #~ "=====COMMENT===== /usr/share/doc/debian is used be doc-debian and debian-" #~ "faq =====TNEMMOC=====" #~ msgid "" #~ "=====COMMENT===== No more use of ftp-master nor faster queue. It is not " #~ "so useful these days. If you upload to ftp-master, <command>dupload</" #~ "command> will ask for your password on Debian machines, and then upload " #~ "the packages. =====TNEMMOC=====" #~ msgstr "" #~ "=====COMMENT===== No more use of ftp-master nor faster queue. It is not " #~ "so useful these days. If you upload to ftp-master, <command>dupload</" #~ "command> will ask for your password on Debian machines, and then upload " #~ "the packages. =====TNEMMOC====="