View | Details | Raw Unified | Return to bug 99835
Collapse All | Expand All

(-)book.sgml (-16 / +133 lines)
Lines 5307-5335 Link Here
5307
	    <tbody>
5307
	    <tbody>
5308
5308
5309
	      <row>
5309
	      <row>
5310
		<entry>USE_APACHE</entry>
5310
		<entry><makevar>USE_APACHE</makevar></entry>
5311
5311
5312
		<entry>The port requires Apache.</entry>
5312
		<entry>The port requires Apache.  Possible values:
5313
		  <literal>yes</literal> (gets any version),
5314
		  <literal>1.3</literal>, <literal>2.0</literal>,
5315
		  <literal>2.2</literal>, <literal>2.0+</literal>,
5316
		  etc.  Default dependency is on version
5317
		  <literal>1.3</literal>.</entry>
5313
	      </row>
5318
	      </row>
5314
5319
5315
	      <row>
5320
	      <row>
5316
		<entry>WITH_APACHE2</entry>
5321
		<entry><makevar>WITH_APACHE2</makevar></entry>
5317
5322
5318
		<entry>The port requires Apache 2.0.  Without this variable,
5323
		<entry>The port requires Apache 2.0.  Without this variable,
5319
		  the port will depend on Apache 1.3.</entry>
5324
		  the port will depend on Apache 1.3.  This variable is
5325
		  deprecated and should not be used anymore.</entry>
5320
	      </row>
5326
	      </row>
5321
5327
5322
	      <row>
5328
	      <row>
5323
		<entry>APXS</entry>
5329
		<entry><makevar>APXS</makevar></entry>
5324
5330
5325
		<entry>Full path to the <command>apxs</command> binary
5331
		<entry>Full path to the <command>apxs</command> binary.
5326
		  (read-only variable).</entry>
5332
		  Can be overriden in your port.</entry>
5333
	      </row>
5334
5335
	      <row>
5336
		<entry><makevar>HTTPD</makevar></entry>
5337
5338
		<entry>Full path to the <command>httpd</command> binary.
5339
		  Can be overriden in your port.</entry>
5340
	      </row>
5341
5342
	      <row>
5343
		<entry><makevar>APACHE_VERSION</makevar></entry>
5344
5345
		<entry>The version of present Apache installation (read-only
5346
		  variable).  This variable is only available after inclusion
5347
		  of <filename>bsd.port.pre.mk</filename>.  Possible values:
5348
		  <literal>13</literal>, <literal>20</literal>,
5349
		  <literal>22</literal>.</entry>
5350
	      </row>
5351
5352
	      <row>
5353
		<entry><makevar>APACHEMODDIR</makevar></entry>
5354
5355
		<entry>Directory for Apache modules.  This variable is
5356
		  automatically expanded in pkg-plist.</entry>
5357
	      </row>
5358
5359
	      <row>
5360
		<entry><makevar>APACHEINCLUDEDIR</makevar></entry>
5361
5362
		<entry>Directory for Apache headers.  This variable is
5363
		  automatically expanded in pkg-plist.</entry>
5364
	      </row>
5365
5366
	      <row>
5367
		<entry><makevar>APACHEETCDIR</makevar></entry>
5368
5369
		<entry>Directory for Apache configuration files.  This
5370
		  variable is automatically expanded in pkg-plist.</entry>
5327
	      </row>
5371
	      </row>
5328
5372
5329
	    </tbody>
5373
	    </tbody>
5330
	  </tgroup>
5374
	  </tgroup>
5331
	</table>
5375
	</table>
5332
5376
5377
	<table frame="none">
5378
	  <title>port Apache 模組時好用的變數</title>
5379
5380
	  <tgroup cols="2">
5381
	    <tbody>
5382
5383
	      <row>
5384
		<entry><makevar>MODULENAME</makevar></entry>
5385
5386
		<entry>模組名稱。  預設值為
5387
		  <makevar>PORTNAME</makevar>. 範例:
5388
		  <literal>mod_hello</literal></entry>
5389
	      </row>
5390
5391
	      <row>
5392
		<entry><makevar>SHORTMODNAME</makevar></entry>
5393
5394
		<entry>簡化的模組名稱。  自動地由變數
5395
		  <makevar>MODULENAME</makevar> 產生,不過可以覆蓋它。
5396
		  範例: <literal>hello</literal></entry>
5397
	      </row>
5398
5399
	      <row>
5400
		<entry><makevar>AP_FAST_BUILD</makevar></entry>
5401
5402
		<entry>使用 <command>apxs</command> 
5403
		  來編譯及安裝這個模組。</entry>
5404
	      </row>
5405
5406
	      <row>
5407
		<entry><makevar>AP_GENPLIST</makevar></entry>
5408
5409
		<entry>同樣地,也是自動產生
5410
		  <filename>pkg-plist</filename>。</entry>
5411
	      </row>
5412
5413
	      <row>
5414
		<entry><makevar>AP_INC</makevar></entry>
5415
5416
		<entry>在編譯時間加入一個目錄到標頭檔搜尋路徑。</entry>
5417
	      </row>
5418
5419
	      <row>
5420
		<entry><makevar>AP_LIB</makevar></entry>
5421
5422
		<entry>在編譯時間加入一個目錄到函式庫搜尋路徑。</entry>
5423
	      </row>
5424
5425
	      <row>
5426
		<entry><makevar>AP_EXTRAS</makevar></entry>
5427
5428
		<entry>傳給
5429
		  <command>apxs</command> 額外的 flags。</entry>
5430
	      </row>
5431
5432
	    </tbody>
5433
	  </tgroup>
5434
	</table>
5435
5436
	<para>Web 應用程式應該安裝到
5437
	  <makevar>PREFIX</makevar><filename>/www/<replaceable>appname</replaceable></filename>
5438
	  ,同時不應該假設 Apache 已存在了,除非他們有明確地需要(depend on)
5439
	  Apahce。使用者也許希望在其他非 Apache 的 Web 伺服器上執行。</para>
5440
5333
      </sect2>
5441
      </sect2>
5334
5442
5335
      <sect2 id="php-variables">
5443
      <sect2 id="php-variables">
Lines 5414-5426 Link Here
5414
5522
5415
		<entry>Want the Apache module or the CGI version of PHP.</entry>
5523
		<entry>Want the Apache module or the CGI version of PHP.</entry>
5416
	      </row>
5524
	      </row>
5417
5418
	      <row>
5419
		<entry><makevar>WANT_PHP_PEAR</makevar></entry>
5420
5421
		<entry>Want the PEAR framework.</entry>
5422
	      </row>
5423
5424
	    </tbody>
5525
	    </tbody>
5425
	  </tgroup>
5526
	  </tgroup>
5426
	</table>
5527
	</table>
Lines 5441-5447 Link Here
5441
	  <filename>pkg-plist</filename>.</para>
5542
	  <filename>pkg-plist</filename>.</para>
5442
5543
5443
	<para>Include
5544
	<para>Include
5444
	  <filename>&dollar;{PORTSDIR}/devel/pear-PEAR/Makefile.common</filename>
5545
	  <filename>&dollar;{PORTSDIR}/devel/pear/bsd.pear.mk</filename>
5445
	  on the last line of the <filename>Makefile</filename>.</para>
5546
	  on the last line of the <filename>Makefile</filename>.</para>
5446
5547
5447
	<example id="pear-makefile">
5548
	<example id="pear-makefile">
Lines 5468-5474 Link Here
5468
_DOCSDIR=       .
5569
_DOCSDIR=       .
5469
5570
5470
.include &lt;bsd.port.pre.mk&gt;
5571
.include &lt;bsd.port.pre.mk&gt;
5471
.include "&dollar;{PORTSDIR}/devel/pear-PEAR/Makefile.common"
5572
.include "&dollar;{PORTSDIR}/devel/pear/bsd.pear.mk"
5472
.include &lt;bsd.port.post.mk&gt;</programlisting>
5573
.include &lt;bsd.port.post.mk&gt;</programlisting>
5473
5574
5474
	</example>
5575
	</example>
Lines 9155-9160 Link Here
9155
	  for their files.</para>
9229
	  for their files.</para>
9156
      </sect1>
9230
      </sect1>
9157
9231
9232
      <sect1 id="dads-sh-exec">
9233
	<title>在 wrapper scripts 中使用 <function>exec</function> 述句</title>
9234
9235
	<para>若某 port 為了執行其他程式而安裝了一個 shell script,
9236
	  而該程式同時也是該 script 最後一個動作,那麼需要確定該 script 
9237
	  是用 <function>exec</function> 述句(statement),舉例而言:</para>
9238
9239
	<programlisting>#!/bin/sh
9240
exec %%LOCALBASE%%/bin/java -jar %%DATADIR%%/foo.jar "$@"</programlisting>
9241
9242
	<para><function>exec</function> 述句以所指定的程式取代了該 shell 
9243
	  的程序。 若省略 <function>exec</function> ,那麼該 shell 程序
9244
	  將會在程式執行中一直存在於記憶體,這無疑地浪費了系統資源。</para>
9245
9246
      </sect1>
9247
9158
      <sect1 id="dads-uid-and-gids">
9248
      <sect1 id="dads-uid-and-gids">
9159
	<title>UIDs and GIDs</title>
9249
	<title>UIDs and GIDs</title>

Return to bug 99835