From owner-freebsd-doc@FreeBSD.ORG Thu Jul 6 09:30:17 2006 Return-Path: X-Original-To: freebsd-doc@hub.freebsd.org Delivered-To: freebsd-doc@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CBBE616A4DE for ; Thu, 6 Jul 2006 09:30:17 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3D2FB43D4C for ; Thu, 6 Jul 2006 09:30:17 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k669UHo1073111 for ; Thu, 6 Jul 2006 09:30:17 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k669UHK7073110; Thu, 6 Jul 2006 09:30:17 GMT (envelope-from gnats) Resent-Date: Thu, 6 Jul 2006 09:30:17 GMT Resent-Message-Id: <200607060930.k669UHK7073110@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-doc@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Cheng-Lung Sung Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DF6BB16A4DD for ; Thu, 6 Jul 2006 09:29:39 +0000 (UTC) (envelope-from clsung@FreeBSD.csie.nctu.edu.tw) Received: from FreeBSD.csie.nctu.edu.tw (freebsd.csie.nctu.edu.tw [140.113.17.209]) by mx1.FreeBSD.org (Postfix) with ESMTP id 22A5343D5F for ; Thu, 6 Jul 2006 09:29:39 +0000 (GMT) (envelope-from clsung@FreeBSD.csie.nctu.edu.tw) Received: from localhost (localhost.csie.nctu.edu.tw [127.0.0.1]) by FreeBSD.csie.nctu.edu.tw (Postfix) with ESMTP id 520CF7E911 for ; Thu, 6 Jul 2006 17:31:22 +0800 (CST) Received: from FreeBSD.csie.nctu.edu.tw ([127.0.0.1]) by localhost (FreeBSD.csie.nctu.edu.tw [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id klr72cP+diST for ; Thu, 6 Jul 2006 17:31:21 +0800 (CST) Received: by FreeBSD.csie.nctu.edu.tw (Postfix, from userid 1038) id 365DE7E96F; Thu, 6 Jul 2006 17:31:21 +0800 (CST) Message-Id: <20060706093121.365DE7E96F@FreeBSD.csie.nctu.edu.tw> Date: Thu, 6 Jul 2006 17:31:21 +0800 (CST) From: Cheng-Lung Sung To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: docs/99835: [patch] works on zh_TW's porter's handbook X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Cheng-Lung Sung List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Jul 2006 09:30:18 -0000 >Number: 99835 >Category: docs >Synopsis: [patch] works on zh_TW's porter's handbook >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-doc >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Thu Jul 06 09:30:16 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Cheng-Lung Sung >Release: FreeBSD 6.1-PRERELEASE i386 >Organization: FreeBSD @ Taiwan >Environment: System: FreeBSD.csie.nctu.edu.tw 6.1-STABLE FreeBSD 6.1-STABLE #9: Thu May 11 14:31:45 CST 2006 root@FreeBSD.csie.nctu.edu.tw:/home/usr.obj/usr/src/sys/FREEBSD i386 >Description: - add one missing subsection "Use the exec statement in wrapper scripts" (translated). - add one missing table "Useful variables for porting Apache modules" (translated). - sync table "Variables for ports that use Apache" - sync subsection "PEAR modules". (docs/99733, docs/99734) >How-To-Repeat: >Fix: Index: book.sgml =================================================================== RCS file: /home/dcvs/doc/zh_TW.Big5/books/porters-handbook/book.sgml,v retrieving revision 1.6 diff -u -r1.6 book.sgml --- book.sgml 6 Jul 2006 07:56:11 -0000 1.6 +++ book.sgml 6 Jul 2006 09:25:50 -0000 @@ -5307,29 +5307,137 @@ - USE_APACHE + USE_APACHE - The port requires Apache. + The port requires Apache. Possible values: + yes (gets any version), + 1.3, 2.0, + 2.2, 2.0+, + etc. Default dependency is on version + 1.3. - WITH_APACHE2 + WITH_APACHE2 The port requires Apache 2.0. Without this variable, - the port will depend on Apache 1.3. + the port will depend on Apache 1.3. This variable is + deprecated and should not be used anymore. - APXS + APXS - Full path to the apxs binary - (read-only variable). + Full path to the apxs binary. + Can be overriden in your port. + + + + HTTPD + + Full path to the httpd binary. + Can be overriden in your port. + + + + APACHE_VERSION + + The version of present Apache installation (read-only + variable). This variable is only available after inclusion + of bsd.port.pre.mk. Possible values: + 13, 20, + 22. + + + + APACHEMODDIR + + Directory for Apache modules. This variable is + automatically expanded in pkg-plist. + + + + APACHEINCLUDEDIR + + Directory for Apache headers. This variable is + automatically expanded in pkg-plist. + + + + APACHEETCDIR + + Directory for Apache configuration files. This + variable is automatically expanded in pkg-plist. + + port Apache 模組時好用的變數 + + + + + + MODULENAME + + 模組名稱。 預設值為 + PORTNAME. 範例: + mod_hello + + + + SHORTMODNAME + + 簡化的模組名稱。 自動地由變數 + MODULENAME 產生,不過可以覆蓋它。 + 範例: hello + + + + AP_FAST_BUILD + + 使用 apxs + 來編譯及安裝這個模組。 + + + + AP_GENPLIST + + 同樣地,也是自動產生 + pkg-plist + + + + AP_INC + + 在編譯時間加入一個目錄到標頭檔搜尋路徑。 + + + + AP_LIB + + 在編譯時間加入一個目錄到函式庫搜尋路徑。 + + + + AP_EXTRAS + + 傳給 + apxs 額外的 flags。 + + + + +
+ + Web 應用程式應該安裝到 + PREFIX/www/appname + ,同時不應該假設 Apache 已存在了,除非他們有明確地需要(depend on) + Apahce。使用者也許希望在其他非 Apache 的 Web 伺服器上執行。 + @@ -5414,13 +5522,6 @@ Want the Apache module or the CGI version of PHP. - - - WANT_PHP_PEAR - - Want the PEAR framework. - - @@ -5441,7 +5542,7 @@ pkg-plist. Include - ${PORTSDIR}/devel/pear-PEAR/Makefile.common + ${PORTSDIR}/devel/pear/bsd.pear.mk on the last line of the Makefile. @@ -5468,7 +5569,7 @@ _DOCSDIR= . .include <bsd.port.pre.mk> -.include "${PORTSDIR}/devel/pear-PEAR/Makefile.common" +.include "${PORTSDIR}/devel/pear/bsd.pear.mk" .include <bsd.port.post.mk> @@ -9155,6 +9229,22 @@ for their files. + + 在 wrapper scripts 中使用 <function>exec</function> 述句 + + 若某 port 為了執行其他程式而安裝了一個 shell script, + 而該程式同時也是該 script 最後一個動作,那麼需要確定該 script + 是用 exec 述句(statement),舉例而言: + + #!/bin/sh +exec %%LOCALBASE%%/bin/java -jar %%DATADIR%%/foo.jar "$@" + + exec 述句以所指定的程式取代了該 shell + 的程序。 若省略 exec ,那麼該 shell 程序 + 將會在程式執行中一直存在於記憶體,這無疑地浪費了系統資源。 + + + UIDs and GIDs >Release-Note: >Audit-Trail: >Unformatted: