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

Last change on this file since 2426 was 2295, checked in by landonf (Landon Fuller), 18 years ago

Add install.destroot to portfile man page
Submitted by: Felix Kronlage <fkr@…>

  • Property svn:eol-style set to native
File size: 12.9 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 description
109One line description of the software and what it does
110.br
111.Sy Type:
112.Em required
113.br
114.Sy Example:
115.Dl description "Dictionary Server Protocol (RFC2229) client"
116
117.It Ic long_description
118A verbose description of the software and what it does
119.br
120.Sy Type:
121.Em required
122.br
123.Sy Example:
124.Dl long_description    The GNU Image Manipulation Program (GIMP) is a powerful tool for the preparation and manipulation of digital images.  The GIMP provides the user with a wide variety of image manipulation, painting, processing, and rendering tools.
125
126.It Ic revision
127Local revision number of portfile.
128Increment for port revisions.
129.br
130.Sy Type:
131.Em optional
132.Sy Default:
133.Em 0
134.br
135.Sy Example:
136.Dl revision    1
137
138.It Ic categories
139Categories to which this port belongs
140.br
141.Sy Type:
142.Em required
143.br
144.Sy Example:
145.Dl categories  spelling textproc
146
147.It Ic maintainers
148E-mail address(es) of port maintainer(s)
149.br
150.Sy Type:
151.Em required
152.br
153.Sy Example:
154.Dl maintainers landonf@opendarwin.org kevin@opendarwin.org
155
156.It Ic platforms
157Declares which platforms are supported by the port
158.br
159.Sy Type:
160.Em required
161.br
162.Sy Values:
163.Em darwin freebsd
164.br
165.Sy Example:
166.Dl platforms   darwin
167
168.It Ic worksrcdir
169Path to source directory relative to ${workpath}
170.br
171.Sy Type:
172.Em optional
173.Sy Default:
174.Em ${distname}
175.br
176.Sy Example:
177.Dl worksrcdir  ${distname}-src-${version}
178
179.It Ic worksrcpath
180Full path to working sources (where port has unpacked itself)
181.br
182.Sy Type:
183.Em read-only
184.Sy Default:
185.Em ${workpath}/${worksrcdir}
186
187.It Ic filedir
188Path to port files relative to ${portpath}
189.br
190.Sy Type:
191.Em read-only
192.Sy Default:
193.Em files
194
195.It Ic distname
196Name of distibution file, minus extract suffix
197.br
198.Sy Type:
199.Em optional
200.Sy Default:
201.Em ${name}-${version})
202.br
203.Sy Example:
204.Dl distname    ${name}-${version}-src
205
206.It Ic distpath
207Location to store downloaded distfiles
208.br
209.Sy Type:
210.Em read-only
211.Sy Default:
212.Em ${sysportpath}/distfiles
213
214.It Ic os_arch
215Identifies hardware type (ie, "Power Macintosh")
216.br
217.Sy Type:
218.Em read-only
219
220.It Ic os_version
221Version number of operating system (ie "6.0")
222.br
223.Sy Type:
224.Em read-only
225.El
226
227.Ss DEPENDS OPTIONS
228Checking and building of dependencies
229.Bl -tag -width lc
230.It Ic depends_fetch
231List of dependencies to check before running fetch target
232.br
233.Sy Type:
234.Em optional
235.br
236.Sy Example:
237.Dl depends_fetch       bin:fetch:net/fetch bin:wget:wget
238
239.It Ic depends_build
240List of dependencies to check before build, install, and package targets
241.br
242.Sy Type:
243.Em optional
244.br
245.Sy Example:
246.Dl depends_build       bin:autoconf:autoconf
247
248.It Ic depends_run
249List of dependencies to check before install and package targets
250.br
251.Sy Type:
252.Em optional
253.br
254.Sy Example:
255.Dl depends_run bin:bash:bash
256
257.It Ic depends_extract
258List of dependencies to check before extract target
259.br
260.Sy Type:
261.Em optional
262.br
263.Sy Example:
264.Dl depends_extract     bin:bzip2:bzip2
265
266.It Ic depends_lib
267List of dependencies to check before configure, build, install, and package targets
268.br
269.Sy Type:
270.Em optional
271.br
272.Sy Example:
273.Dl depends_lib lib:libfetch.3:libfetch
274.El
275
276.Ss FETCH OPTIONS
277Fetch all distribution files and patches
278.Bl -tag -width lc
279.It Ic master_sites
280List of sites to fetch ${distfiles} from
281.br
282.Sy Type:
283.Em required
284.br
285.Sy Example:
286.Dl master_sites        ftp://ftp.cdrom.com/pub/magic \
287                        ftp://ftp.sourceforge.net/pub/projects/magic
288
289.It Ic patch_sites
290List of sites to fetch ${patchfiles} from
291.br
292.Sy Type:
293.Em optional
294.Sy Default:
295.Em ${master_sites}
296.br
297.Sy Example:
298.Dl patch_sites ftp://ftp.patchcityrepo.com/pub/magic/patches
299
300.It Ic extract.sufx
301Suffix to append to ${distname}
302.br
303.Sy Type:
304.Em optional
305.Sy Default:
306.Em .tar.gz
307.br
308.Sy Example:
309.Dl extract.sufx        .tgz
310
311.It Ic distfiles
312List of distribution files to fetch from ${master_sites}
313.br
314.Sy Type:
315.Em optional
316.Sy Default:
317.Em [suffix ${distname}]
318.br
319.Sy Example:
320.Dl distfiles   magicsource.tar.gz cluebat.tar.bz2
321
322.It Ic patchfiles
323List of patches to fetch and apply
324.br
325.Sy Type:
326.Em optional
327.br
328.Sy Example:
329.Dl patchfiles  japanese-widechar-fix.diff japanese-localization.diff
330
331.It Ic use_zip
332Use zip.
333.br
334Sets extract.sufx to: .zip
335.br
336Sets extract.cmd to: unzip
337.br
338Sets extract.pre_args to: -q
339.br
340Sets extract.post_args to: "-d $portpath/$workdir"
341.br
342.Sy Type:
343.Em optional
344.br
345.Sy Example:
346.Dl use_zip             yes
347
348.It Ic use_bzip2
349Use bzip2.
350.br
351Sets extract.sufx to: .bzip2
352.br
353Sets extract.cmd to: bzip2
354.br
355.Sy Type:
356.Em optional
357.br
358.Sy Example:
359.Dl use_bzip2   yes
360
361.It Ic dist_subdir
362Create a sub-directory in ${distpath} to store all fetched files.
363.br
364.Sy Type:
365.Em optional
366.br
367.Sy Example:
368.Dl dist_subdir vim${version}
369
370.El
371.Ss CHECKSUM OPTIONS
372Compare checksums of all fetched files
373.Bl -tag -width lc
374.It Ic checksums
375List of checksums in the format: <file name> <checksum type> <checksum>
376Currently, the only supported checksum type is md5
377.br
378.Sy Type:
379.Em required
380.br
381.Sy Example:
382.Dl checkums    dictd-1.7.1.tar.gz md5 81317b86ea0a5df0163900ad2e6bb12c \
383                                magic-words-1.7.1.tar.gz md5 897a005182928613eadd30c267ce9c5b
384.El
385
386.Ss EXTRACT OPTIONS
387Extract all compressed/archived files
388.Bl -tag -width lc
389
390.It Ic extract.only
391List of files to extract into ${workpath}
392.br
393.Sy Type:
394.Em optional
395.Sy Default:
396.Em ${distfiles}
397.br
398.Sy Example:
399.Dl extract.only        worksrc-1.4.4.tar.gz
400
401.It Ic extract.cmd
402Command to perform extract
403.br
404.Sy Type:
405.Em optional
406.Sy Default
407.Em gzip
408.br
409.Sy Example:
410.Dl extract.cmd bzip2
411
412.It Ic extract.pre_args
413Arguments added to extract command before a file name
414.br
415.Sy Type:
416.Em optional
417.Sy Default:
418.Em -dc
419.br
420.Sy Example:
421.Dl extract.pre_args    -cd
422
423.It Ic extract.args
424Arguments to extract.cmd
425.br
426.Sy Type:
427.Em read-only
428.Sy Default:
429.Em ${distpath}/${distfile}
430
431.It Ic extract.post_args
432Arguments added to extract command after a file name
433.br
434.Sy Type:
435.Em optional
436.Sy Default:
437.Em "| tar -xf -"
438.br
439.Sy Example:
440.Dl extract.post_args   | tar -x -s@bladeenc-0.94.2/other_makefiles/BladeEnc..@@p -f -
441
442.El
443
444.Ss PATCH OPTIONS
445Apply all necessary patches to the extracted source
446No options defined for patch. Move patchfiles here?
447
448.Ss CONFIGURE OPTIONS
449Execute necessary configuration steps
450.Bl -tag -width lc
451
452.It Ic configure.pre_args
453Arguments added to configure command before ${configure.args}
454.br
455.Sy Type:
456.Em optional
457.br
458.Sy Example:
459.Dl configure.pre_args          --prefix=${prefix}/apache2
460
461.It Ic configure.args
462Arguments to pass to configure.
463.br
464.Sy Type:
465.Em optional
466.br
467.Sy Example:
468.Dl configure.args              --etcdir=${prefix}/etc
469
470.It Ic configure.dir
471Directory in which to run ${configure.cmd}
472.br
473.Sy Type:
474.Em optional
475.Sy Default:
476.Em ${workpath}/${worksrcdir}
477.br
478.Sy Example:
479.Dl configure.dir               src
480
481.It Ic use_automake
482If set to yes, use automake
483.br
484.Sy Type:
485.Em optional
486.br
487.Sy Example:
488.Dl use_automake        yes
489
490.It Ic automake.env
491Environmental variables to pass to automake
492.br
493.Sy Type:
494.Em optional
495.br
496.Sy Example:
497.Dl automake.env        CFLAGS=-I${prefix}/include/gtk12
498
499.It Ic automake.args
500Arguments to pass to automake.
501.br
502.Sy Type:
503.Em optional
504.br
505.Sy Example:
506.Dl automake.args       --foreign
507
508.It Ic automake.dir
509Directory in which to run ${automake.cmd}
510.br
511.Sy Type:
512.Em optional
513.Sy Default:
514.Em ${workpath}/${worksrcdir}
515.br
516.Sy Example:
517.Dl automake.dir                src
518
519.It Ic use_autoconf
520If set to yes, run autoconf
521.br
522.Sy Type:
523.Em optional
524.br
525.Sy Example:
526.Dl use_autoconf        yes
527
528.It Ic autoconf.env
529Environmental variables to pass to autoconf
530.br
531.Sy Type:
532.Em optional
533.br
534.Sy Example:
535.Dl autoconf.env        CFLAGS=I${prefix}/include/gtk12
536
537.It Ic autoconf.args
538Arguments to pass to autoconf
539.br
540.Sy Type:
541.Em optional
542.br
543.Sy Example:
544.Dl autoconf.args       -l src/aclocaldir
545
546.It Ic autoconf.dir
547Directory in which to run ${autoconf.cmd}
548.br
549.Sy Type:
550.Em optional
551.Sy Default:
552.Em ${autoconf.dir}
553.br
554.Sy Example:
555.Dl autoconf.dir        src
556
557.It Ic xmkmf
558Does nothing
559
560.It Ic libtool
561Does nothing
562.El
563
564.Ss BUILD OPTIONS
565Execute necessary build commands
566.Bl -tag -width lc
567.It Ic build.cmd
568Make command to run relative to ${worksrcdir}
569.br
570.Sy Type:
571.Em optional
572.Sy Default:
573.Em make
574.br
575.Sy Example:
576.Dl build.cmd   pbxbuild
577
578.It Ic build.type
579Defines which 'make' is required, either 'gnu' or 'bsd'
580Sets build.cmd to either 'gnumake' or 'bsdmake' accordingly
581.br
582.Sy Type:
583.Em optional
584.Sy Default:
585.Em gnu
586.br
587.Sy Example:
588.Dl build.type  bsd
589
590.It Ic build.pre_args
591Arguments to pass to ${build.cmd} before ${build.args}
592.br
593.Sy Type:
594.Em read-only
595.Sy Default:
596.Em ${build.target}
597
598
599.It Ic build.args
600Arguments to pass to ${build.cmd}
601.br
602.Sy Type:
603.Em optional
604.br
605.Sy Example:
606.Dl build.args  -DNOWARN
607
608
609.It Ic build.target.all
610.br
611.Sy Deprecated:
612.Dl Replaced by build.target
613
614.It Ic build.target
615Target passed to ${build.cmd}
616.br
617.Sy Type:
618.Em optional
619.Sy Default:
620.Em all
621.br
622.Sy Example:
623.Dl build.target all-src
624
625.El
626
627.Ss INSTALL OPTIONS
628Execute necessary install commands
629
630.Bl -tag -width lc
631.It Ic install.cmd
632Install command to run relative to ${worksrcdir}
633.br
634.Sy Type:
635.Em optional
636.Sy Default:
637.Em ${build.cmd}
638.br
639.Sy Example:
640.Dl install.cmd pbxbuild
641
642.It Ic install.type
643Defines which 'make' is required, either 'gnu' or 'bsd'
644Sets install.cmd to either 'gnumake' or 'bsdmake' accordingly
645.br
646.Sy Type:
647.Em optional
648.Sy Default:
649.Em ${build.type}
650.br
651.Sy Example:
652.Dl install.type        gnu
653
654.It Ic install.pre_args
655Arguments to pass to ${install.cmd} before ${install.args}
656.br
657.Sy Type:
658.Em read-only
659.Sy Default:
660.Em ${install.target}
661
662
663.It Ic install.args
664Arguments to pass to ${install.cmd}
665.br
666.Sy Type:
667.Em optional
668.br
669.Sy Example:
670.Dl build.args  -DPREFIX=${prefix}
671
672.It Ic install.destroot
673Arguments passed to ${install.cmd} in order to install correctly
674into the destroot.
675.br
676.Sy Type:
677.Em optional
678.Sy Default:
679.Em DESTDIR=${destroot}
680.br
681.Sy Example:
682.Dl install.destroot    prefix=${destroot}${prefix}
683
684.It Ic build.target.install
685.br
686.Sy Deprecated:
687.Dl Replaced by install.target
688
689.It Ic install.target
690Install target to pass to ${install.cmd}
691.br
692.Sy Type:
693.Em optional
694.Sy Default:
695.Em install
696.br
697.Sy Example:
698.Dl install.target install-src
699
700.El
701
702.Sh AUTHORS
703.An "Landon Fuller <landonf@opendarwin.org>"
704.An "Kevin Van Vechten <kevin@opendarwin.org>"
705.An "Jordan K. Hubbard <jkh@opendarwin.org>"
Note: See TracBrowser for help on using the repository browser.