source: trunk/base/doc/portfile.7 @ 964

Last change on this file since 964 was 964, checked in by jkh, 18 years ago

portname -> name, portversion -> version, portrevision -> revision

  • Property svn:eol-style set to native
File size: 11.5 KB
Line 
1.\" portfile.7
2.\"
3.\" Copyright (c) 2002 Apple Computer, Inc.
4.\" All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright
10.\"    notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\"    notice, this list of conditions and the following disclaimer in the
13.\"    documentation and/or other materials provided with the distribution.
14.\" 3. Neither the name of Apple Computer, Inc. nor the names of its
15.\"    contributors may be used to endorse or promote products derived from
16.\"    this software without specific prior written permission.
17.\"
18.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19.\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21.\" ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
22.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28.\" POSSIBILITY OF SUCH DAMAGE.
29.\"
30.Dd September 2, 2002
31.Dt PORTFILE 7 "Apple Computer, Inc."
32.Os
33.Sh NAME
34.Nm Portfile
35.Nd darwin ports description file reference
36.Sh DESCRIPTION
37A complete reference of all available
38.Nm
39variables and example syntax.
40.Nm Portfiles
41consist of valid TCL, allowing for simple key/value pair syntax as well as
42utiliziation of TCL's extensive functionality.
43.Pp
44The
45.Nm Darwin Ports System
46uses a target dependency system based on a
47depends/provides model, allowing for targets to be registered and
48executed in the correct order based on their individual requirements.
49.Pp
50A
51.Nm
52author needs to be aware of the various standard targets, the options that they
53require, and the variables that both the targets and the port system provides.
54
55.Sh TARGETS
56.Tp
57.Ss MAIN OPTIONS
58Neccesary standard options
59.Bl -tag -width lc
60.It Ic prefix
61Install prefix
62.br
63.Sy Type:
64.Em optional
65.Sy Default:
66.Em /opt/local
67
68.It Ic libpath
69Locate of ports-specific TCL libraries
70.br
71.Sy Type:
72.Em read-only
73
74.It Ic workdir
75Path to work directory relative to ${portpath}
76.br
77.Sy Type:
78.Em read-only
79.Sy Default:
80.Em work
81
82.It Ic workpath
83Full path to work directory
84.br
85.Sy Type:
86.Em read-only
87.Sy Default:
88.Em ${portpath}/${workdir}
89
90.It Ic name
91Full name of port
92.br
93.Sy Type:
94.Em required
95.br
96.Sy Example:
97.Dl name        XFree86
98
99.It Ic version
100Upstream version of software
101.br
102.Sy Type:
103.Em required
104.br
105.Sy Example:
106.Dl version     4.2.1
107
108.It Ic revision
109Local revision number of portfile.
110Increment for port revisions.
111.br
112.Sy Type:
113.Em optional
114.Sy Default:
115.Em 0
116.br
117.Sy Example:
118.Dl revision    1
119
120.It Ic categories
121Categories to which this port belongs
122.br
123.Sy Type:
124.Em required
125.br
126.Sy Example:
127.Dl categories  spelling textproc
128
129.It Ic maintainers
130E-mail address(es) of port maintainer(s)
131.br
132.Sy Type:
133.Em required
134.br
135.Sy Example:
136.Dl maintainers landonf@opendarwin.org kevin@opendarwin.org
137
138.It Ic worksrcdir
139Path to source directory relative to ${workpath}
140.br
141.Sy Type:
142.Em optional
143.Sy Default:
144.Em ${distname}
145.br
146.Sy Example:
147.Dl worksrcdir  ${distname}-src-${version}
148
149.It Ic filedir
150Path to port files relative to ${portpath}
151.br
152.Sy Type:
153.Em read-only
154.Sy Default:
155.Em files
156
157.It Ic distname
158Name of distibution file, minus extract suffix
159.br
160.Sy Type:
161.Em optional
162.Sy Default:
163.Em ${name}-${version})
164.br
165.Sy Example:
166.Dl distname    ${name}-${version}-src
167
168.It Ic distpath
169Location to store downloaded distfiles
170.br
171.Sy Type:
172.Em read-only
173.Sy Default:
174.Em ${sysportpath}/distfiles
175
176.It Ic os_arch
177Identifies hardware type (ie, "Power Macintosh")
178.br
179.Sy Type:
180.Em read-only
181
182.It Ic os_version
183Version number of operating system (ie "6.0")
184.br
185.Sy Type:
186.Em read-only
187.El
188
189.Ss DEPENDS OPTIONS
190Checking and building of dependencies
191.Bl -tag -width lc
192.It Ic depends_fetch
193List of dependencies to check before running fetch target
194.br
195.Sy Type:
196.Em optional
197.br
198.Sy Example:
199.Dl depends_fetch       bin:fetch:net/fetch bin:wget:wget
200
201.It Ic depends_build
202List of dependencies to check before build, install, and package targets
203.br
204.Sy Type:
205.Em optional
206.br
207.Sy Example:
208.Dl depends_build       bin:autoconf:autoconf
209
210.It Ic depends_run
211List of dependencies to check before install and package targets
212.br
213.Sy Type:
214.Em optional
215.br
216.Sy Example:
217.Dl depends_run bin:bash:bash
218
219.It Ic depends_extract
220List of dependencies to check before extract target
221.br
222.Sy Type:
223.Em optional
224.br
225.Sy Example:
226.Dl depends_extract     bin:bzip2:bzip2
227
228.It Ic depends_lib
229List of dependencies to check before configure, build, install, and package targets
230.br
231.Sy Type:
232.Em optional
233.br
234.Sy Example:
235.Dl depends_lib lib:libfetch.3:libfetch
236.El
237
238.Ss FETCH OPTIONS
239Fetch all distribution files and patches
240.Bl -tag -width lc
241.It Ic master_sites
242List of sites to fetch ${distfiles} from
243.br
244.Sy Type:
245.Em required
246.br
247.Sy Example:
248.Dl master_sites        ftp://ftp.cdrom.com/pub/magic \
249                        ftp://ftp.sourceforge.net/pub/projects/magic
250
251.It Ic patch_sites
252List of sites to fetch ${patchfiles} from
253.br
254.Sy Type:
255.Em optional
256.Sy Default:
257.Em ${master_sites}
258.br
259.Sy Example:
260.Dl patch_sites ftp://ftp.patchcityrepo.com/pub/magic/patches
261
262.It Ic extract.sufx
263Suffix to append to ${distname}
264.br
265.Sy Type:
266.Em optional
267.Sy Default:
268.Em .tar.gz
269.br
270.Sy Example:
271.Dl extract.sufx        .tgz
272
273.It Ic distfiles
274List of distribution files to fetch from ${master_sites}
275.br
276.Sy Type:
277.Em optional
278.Sy Default:
279.Em [suffix ${distname}]
280.br
281.Sy Example:
282.Dl distfiles   magicsource.tar.gz cluebat.tar.bz2
283
284.It Ic patchfiles
285List of patches to fetch and apply
286.br
287.Sy Type:
288.Em optional
289.br
290.Sy Example:
291.Dl patchfiles  japanese-widechar-fix.diff japanese-localization.diff
292
293.It Ic use_zip
294Use zip.
295.br
296Sets extract.sufx to: .zip
297.br
298Sets extract.cmd to: unzip
299.br
300Sets extract.pre_args to: -q
301.br
302Sets extract.post_args to: "-d $portpath/$workdir"
303.br
304.Sy Type:
305.Em optional
306.br
307.Sy Example:
308.Dl use_zip             yes
309
310.It Ic use_bzip2
311Use bzip2.
312.br
313Sets extract.sufx to: .bzip2
314.br
315Sets extract.cmd to: bzip2
316.br
317.Sy Type:
318.Em optional
319.br
320.Sy Example:
321.Dl use_bzip2   yes
322
323.It Ic dist_subdir
324Create a sub-directory in ${distpath} to store all fetched files.
325.br
326.Sy Type:
327.Em optional
328.br
329.Sy Example:
330.Dl dist_subdir vim${version}
331
332.El
333.Ss CHECKSUM OPTIONS
334Compare checksums of all fetched files
335.Bl -tag -width lc
336.It Ic checksums
337List of checksums in the format: <file name> <checksum type> <checksum>
338Currently, the only supported checksum type is md5
339.br
340.Sy Type:
341.Em required
342.br
343.Sy Example:
344.Dl checkums    dictd-1.7.1.tar.gz md5 81317b86ea0a5df0163900ad2e6bb12c \
345                                magic-words-1.7.1.tar.gz md5 897a005182928613eadd30c267ce9c5b
346.El
347
348.Ss EXTRACT OPTIONS
349Extract all compressed/archived files
350.Bl -tag -width lc
351
352.It Ic extract.only
353List of files to extract into ${workpath}
354.br
355.Sy Type:
356.Em optional
357.Sy Default:
358.Em ${distfiles}
359.br
360.Sy Example:
361.Dl extract.only        worksrc-1.4.4.tar.gz
362
363.It Ic extract.cmd
364Command to perform extract
365.br
366.Sy Type:
367.Em optional
368.Sy Default
369.Em gzip
370.br
371.Sy Example:
372.Dl extract.cmd bzip2
373
374.It Ic extract.pre_args
375Arguments added to extract command before a file name
376.br
377.Sy Type:
378.Em optional
379.Sy Default:
380.Em -dc
381.br
382.Sy Example:
383.Dl extract.pre_args    -cd
384
385.It Ic extract.args
386Arguments to extract.cmd
387.br
388.Sy Type:
389.Em read-only
390.Sy Default:
391.Em ${distpath}/${distfile}
392
393.It Ic extract.post_args
394Arguments added to extract command after a file name
395.br
396.Sy Type:
397.Em optional
398.Sy Default:
399.Em "| tar -xf -"
400.br
401.Sy Example:
402.Dl extract.post_args   | tar -x -s@bladeenc-0.94.2/other_makefiles/BladeEnc..@@p -f -
403
404.El
405
406.Ss PATCH OPTIONS
407Apply all necessary patches to the extracted source
408No options defined for patch. Move patchfiles here?
409
410.Ss CONFIGURE OPTIONS
411Execute necessary configuration steps
412.Bl -tag -width lc
413
414.It Ic configure.pre_args
415Arguments added to configure command before ${configure.args}
416.br
417.Sy Type:
418.Em optional
419.br
420.Sy Example:
421.Dl configure.pre_args          --prefix=${prefix}/apache2
422
423.It Ic configure.args
424Arguments to pass to configure.
425.br
426.Sy Type:
427.Em optional
428.br
429.Sy Example:
430.Dl configure.args              --etcdir=${prefix}/etc
431
432.It Ic configure.dir
433Directory in which to run ${configure.cmd}
434.br
435.Sy Type:
436.Em optional
437.Sy Default:
438.Em ${workpath}/${worksrcdir}
439.br
440.Sy Example:
441.Dl configure.dir               src
442
443.It Ic use_automake
444If set to yes, use automake
445.br
446.Sy Type:
447.Em optional
448.br
449.Sy Example:
450.Dl use_automake        yes
451
452.It Ic automake.env
453Environmental variables to pass to automake
454.br
455.Sy Type:
456.Em optional
457.br
458.Sy Example:
459.Dl automake.env        CFLAGS=-I${prefix}/include/gtk12
460
461.It Ic automake.args
462Arguments to pass to automake.
463.br
464.Sy Type:
465.Em optional
466.br
467.Sy Example:
468.Dl automake.args       --foreign
469
470.It Ic automake.dir
471Directory in which to run ${automake.cmd}
472.br
473.Sy Type:
474.Em optional
475.Sy Default:
476.Em ${workpath}/${worksrcdir}
477.br
478.Sy Example:
479.Dl automake.dir                src
480
481.It Ic use_autoconf
482If set to yes, run autoconf
483.br
484.Sy Type:
485.Em optional
486.br
487.Sy Example:
488.Dl use_autoconf        yes
489
490.It Ic autoconf.env
491Environmental variables to pass to autoconf
492.br
493.Sy Type:
494.Em optional
495.br
496.Sy Example:
497.Dl autoconf.env        CFLAGS=I${prefix}/include/gtk12
498
499.It Ic autoconf.args
500Arguments to pass to autoconf
501.br
502.Sy Type:
503.Em optional
504.br
505.Sy Example:
506.Dl autoconf.args       -l src/aclocaldir
507
508.It Ic autoconf.dir
509Directory in which to run ${autoconf.cmd}
510.br
511.Sy Type:
512.Em optional
513.Sy Default:
514.Em ${autoconf.dir}
515.br
516.Sy Example:
517.Dl autoconf.dir        src
518
519.It Ic xmkmf
520Does nothing
521
522.It Ic libtool
523Does nothing
524.El
525
526.Ss BUILD OPTIONS
527Execute necessary build commands
528.Bl -tag -width lc
529.It Ic build.cmd
530Make command to run relative to ${worksrcdir}
531.br
532.Sy Type:
533.Em optional
534.Sy Default:
535.Em make
536.br
537.Sy Example:
538.Dl build.cmd   pbxbuild
539
540.It Ic build.type
541Type of make required, either 'gnu' or 'bsd'
542Sets build.cmd to either 'gnumake' or 'bsdmake' accordingly
543.br
544.Sy Type:
545.Em optional
546.Sy Default:
547.Em bsd
548.br
549.Sy Example:
550.Dl build.type  gnu
551
552.It Ic build.pre_args
553Arguments to pass to ${build.cmd} before ${build.args}
554.br
555.Sy Type:
556.Em read-only
557.Sy Default:
558.Em ${build.target.current}
559
560
561.It Ic build.args
562Arguments to pass to ${build.cmd}
563.br
564.Sy Type:
565.Em optional
566.br
567.Sy Example:
568.Dl build.args  -DNOWARN
569
570
571.It Ic build.target.all
572Target to pass to make for building everything
573.br
574.Sy Type:
575.Em optional
576.Sy Default:
577.Em all
578.br
579.Sy Example:
580.Dl build.target.all all-src
581
582.El
583
584.Ss INSTALL OPTIONS
585Execute necessary install commands
586.Bl -tag -width lc
587
588.It Ic build.target.install
589Install target to pass to ${build.cmd}
590.br
591.Sy Type:
592.Em optional
593.Sy Default:
594.Em install
595.br
596.Sy Example:
597.Dl build.target.install        install-src
598
599.El
600.Ss REGISTRY OPTIONS
601Register installed package contents
602.Bl -tag -width lc
603
604.It Ic contents
605List of files to be installed by the port
606Files are assumed to be relative to ${prefix} unless the first character is a '/'
607.br
608.Sy Type:
609.Em required
610.br
611.Sy Example:
612.Dl contents            bin/ls man/man1/ls.1.gz
613
614.It Ic description
615One line description of the software and what it does
616.br
617.Sy Type:
618.Em required
619.br
620.Sy Example:
621.Dl description "Dictionary Server Protocol (RFC2229) client"
622.El
623
624.Sh AUTHORS
625.An "Landon Fuller <landonf@opendarwin.org>"
626.An "Kevin Van Vechten <kevin@opendarwin.org>"
627.An "Jordan K. Hubbard <jkh@opendarwin.org>"
Note: See TracBrowser for help on using the repository browser.