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

Last change on this file since 18777 was 18745, checked in by pguyot (Paul Guyot), 14 years ago

New livecheck check: sourceforge.
By default, the livecheck check is sourceforge if the project is obviously (looking at master_sites) hosted as a sourceforge project. Otherwise, it's freshmeat (which used to be the default but the information there isn't always very fresh).

  • Property svn:eol-style set to native
File size: 25.6 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 August 31, 2005
31.Dt PORTFILE 7 "Apple Computer, Inc."
32.Os
33.Sh NAME
34.Nm Portfile
35.Nd Darwinports 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
42as utilization of TCL's extensive functionality.
43.Nm Portfiles
44are encoded in UTF-8.
45.Pp
46The
47.Nm Darwinports System
48uses a target dependency system based on a
49depends/provides model, allowing for targets to be registered and
50executed in the correct order based on their individual requirements.
51.Pp
52A
53.Nm
54author needs to be aware of the various standard targets, the options
55that they require and the variables that both the targets and the port
56system provide.
57.Sh PORTSYSTEM
58Portfiles must begin with a PortSystem line that defines which version of the
59Portfile interpreter should be used.
60.br
61.Sy Synopsis:
62.Dl PortSystem 1.0
63.Sh MAIN VARIABLES
64All ports are required to set certain variables.
65.Bl -tag -width lc
66.It Ic name
67Full name of port.
68.br
69.Sy Type:
70.Em required
71.br
72.Sy Example:
73.Dl name XFree86
74.It Ic version
75Upstream version of software.
76.br
77.Sy Type:
78.Em required
79.br
80.Sy Example:
81.Dl version 4.2.1
82.It Ic epoch
83If a port's version numbering changes such that a newer version looks
84older than the previous version, the
85.Ic epoch
86should be increased. Often the
87.Ic epoch
88is formatted like a date.
89.br
90.Sy Type:
91.Em optional
92.br
93.Sy Default:
94.Em 0
95.br
96.Sy Example:
97.Dl epoch 20041231
98.It Ic description
99One line description of the software and what it does.
100.br
101.Sy Type:
102.Em required
103.br
104.Sy Example:
105.Dl description Dictionary Server Protocol (RFC2229) client
106.It Ic long_description
107A verbose description of the software and what it does.
108.br
109.Sy Type:
110.Em required
111.br
112.Sy Example:
113.Bd -literal -offset indent -compact
114long_description The GNU Image Manipulation Program \e\
115
116    (GIMP) is a powerful tool for the preparation and \e\
117
118    manipulation of digital images. The GIMP provides \e\
119
120    the user with a wide variety of image manipulation, \e\
121
122    painting, processing, and rendering tools.
123.Ed
124.It Ic revision
125Local revision number of
126.Nm .
127Increment for port revisions which would change its installation in any way.
128.br
129.Sy Type:
130.Em optional
131.br
132.Sy Default:
133.Em 0
134.br
135.Sy Example:
136.Dl revision 1
137.It Ic categories
138Categories to which this port belongs.
139.br
140.Sy Type:
141.Em required
142.br
143.Sy Example:
144.Dl categories spelling textproc
145.It Ic maintainers
146E-mail address(es) of port maintainer(s).
147.br
148.Sy Type:
149.Em required
150.br
151.Sy Example:
152.Dl maintainers landonf@opendarwin.org kevin@opendarwin.org
153.It Ic platforms
154Declares which platforms are supported by the port.
155.br
156.Sy Type:
157.Em required
158.br
159.Sy Values:
160.Em darwin freebsd
161.br
162.Sy Example:
163.Dl platforms darwin
164.It Ic worksrcdir
165Path to source directory relative to
166.Ic workpath .
167.br
168.Sy Type:
169.Em optional
170.br
171.Sy Default:
172.Em ${distname}
173.br
174.Sy Example:
175.Dl worksrcdir ${distname}-src-${version}
176.It Ic distname
177Name of distribution file, without the
178.Cm extract.suffix .
179.br
180.Sy Type:
181.Em optional
182.br
183.Sy Default:
184.Em ${name}-${version}
185.br
186.Sy Example:
187.Dl distname ${name}-${version}-src
188.It Ic master_sites
189List of sites to fetch
190.Ic distfiles
191from or a predefined mirror site
192list. If set to a predefined mirror site, without a subdirectory being
193defined, the portname is used as the name of the subdirectory.
194.br
195.Sy Type:
196.Em required
197.br
198.Sy Example:
199.Bd -literal -offset indent -compact
200master_sites ftp://ftp.cdrom.com/pub/magic \e\
201
202    sourceforge
203.Ed
204.It Xo
205.Ic checksums Ar filename Ar type Ar checksum
206.Op Ar filename Ar type checksum ...
207.Xc
208List of checksums for the
209.Ic distfiles .
210The checksum
211.Ar type
212can currently be md5, rmd160 or sha1. The
213.Ar filename
214can be omitted if there is only one distfile.
215.br
216.Sy Type:
217.Em required
218.br
219.Sy Example:
220.Bd -literal -offset indent -compact
221checksums dictd-1.7.1.tar.gz md5 81317b86ea0a5df0163900ad2e6bb12c \e\
222        magic-words-1.7.1.tar.gz md5 897a005182928613eadd30c267ce9c5b
223.Ed
224.br
225.Sy Example (ledit 1.11):
226.Bd -literal -offset indent -compact
227checksums md5 a2d38ba641682509c1e964ad699a9dd2 \e\
228        sha1 1fb6443b5fdf3c83787953f06282d256477c1288
229.Ed
230.br
231.Sy Example (ssldump 0.9b3):
232.Bd -literal -offset indent -compact
233checksums md5 ac8c28fe87508d6bfb06344ec496b1dd \e\
234        sha1 a633a9a811a138eac5ed440d583473b644135ef5 \e\
235        rmd160 941cf8f2ef8459ec4f9ce65772e134505d46566
236.Ed
237.It Ic use_automake
238If set to yes, run the
239.Cm automake
240target to build any
241.Pa Makefile.in
242files for use by
243.Pa configure .
244.br
245.Sy Type:
246.Em optional
247.br
248.Sy Default:
249.Em no
250.br
251.Sy Example:
252.Dl use_automake yes
253.It Ic use_autoconf
254If set to yes, run the
255.Cm autoconf
256target to build any
257.Pa configure
258script required.
259.br
260.Sy Type:
261.Em optional
262.br
263.Sy Default:
264.Em no
265.br
266.Sy Example:
267.Dl use_autoconf yes
268.It Ic use_configure
269If set to yes, run the
270.Cm configure
271target to configure the build.
272.br
273.Sy Type:
274.Em optional
275.br
276.Sy Default:
277.Em yes
278.br
279.Sy Example:
280.Dl use_configure no
281.El
282.Sh TARGET HOOKS
283A number of hooks are available for customizing many of the standard
284targets that
285.Xr port 1
286executes. The targets supporting these hooks are
287.Cm fetch ,
288.Cm automake ,
289.Cm autoconf ,
290.Cm configure ,
291.Cm build ,
292.Cm destroot ,
293and
294.Cm test .
295The hooks are:
296.Bl -tag -width lc
297.It Va target Ns Ic .dir
298Directory in which to run the
299.Va target .
300.br
301.Sy Example:
302.Dl automake.dir src
303.It Va target Ns Ic .env
304Change the environment the
305.Va target
306is run in. This is often overridden on a per
307.Nm
308basis.
309.br
310.Sy Example:
311.Dl configure.env CFLAGS=-O
312.It Va target Ns Ic .pre_args
313Additional arguments passed before the main arguments.
314.br
315.Sy Example:
316.Dl extract.pre_args -cd
317.It Va target Ns Ic .args
318Main arguments to pass to the
319.Va target .
320This is often overridden on a per
321.Nm
322basis.
323.br
324.Sy Example:
325.Dl configure.args --enable-fooble
326.It Va target Ns Ic .post_args
327Additional arguments passed after the main arguments.
328.br
329.Sy Example:
330.Dl extract.post_args | tar xf -
331.El
332.Sh RUNTIME VARIABLES
333Read-only access to the Darwinports configuration is provided.
334.Bl -tag -width lc
335.It Ic prefix
336Install prefix
337.br
338.Sy Type:
339.Em optional
340.br
341.Sy Default:
342.Em /opt/local
343.It Ic libpath
344Location of ports-specific TCL libraries.
345.br
346.Sy Type:
347.Em read-only
348.It Ic workdir
349Path to work directory relative to
350.Ic portpath .
351Where possible use
352.Ic workpath
353instead.
354.br
355.Sy Type:
356.Em read-only
357.br
358.Sy Default:
359.Em work
360.It Ic workpath
361Full path to work directory.
362.br
363.Sy Type:
364.Em read-only
365.br
366.Sy Default:
367.Em ${portpath}/${workdir}
368.It Ic worksrcpath
369Full path to working sources (where port has unpacked itself).
370.br
371.Sy Type:
372.Em read-only
373.br
374.Sy Default:
375.Em ${workpath}/${worksrcdir}
376.It Ic filesdir
377Path to port files relative to
378.Ic portpath .
379.br
380.Sy Type:
381.Em read-only
382.br
383.Sy Default:
384.Em files
385.It Ic distpath
386Location to store downloaded distfiles.
387.br
388.Sy Type:
389.Em read-only
390.br
391.Sy Default:
392.Em ${sysportpath}/distfiles/${dist_subdir}/
393.It Ic os.arch
394Identifies hardware type (eg "powerpc").
395.br
396.Sy Type:
397.Em read-only
398.It Ic os.version
399Version number of operating system (eg "7.0").
400.br
401.Sy Type:
402.Em read-only
403.It Ic os.endian
404Endianness of the processor (eg "bigEndian").
405.br
406.Sy Type:
407.Em read-only
408.It Ic os.platform
409Operating system name (eg "darwin").
410.br
411.Sy Type:
412.Em read-only
413.It Ic install.user
414User for darwinports installation (eg
415.Pa root )
416.br
417.Sy Type:
418.Em read-only
419.It Ic install.group
420Group for darwinports installation (eg
421.Pa wheel )
422.br
423.Sy Type:
424.Em read-only
425.It Ic x11prefix
426Absolute path to X11 (eg
427.Pa /usr/X11R6 )
428.br
429.Sy Type:
430.Em read-only
431.El
432.Sh DEPENDENCY OPTIONS
433Each dependency for the port is expressed in the format:
434.Bl -tag -width lc
435.It Ar type Ns : Ns Ao filename Ac Ns : Ns Ao port Ac
436.El
437.Pp
438Where
439.Ar type
440is "bin" if
441.Ao filename Ac
442is a program, "lib" if it is a library, or "path" if it is a path to an
443installed file. If the dependency is really on a whole port and not an
444individual file, then the alternative syntax:
445.Bl -tag -width ls
446.It port: Ns Ao port Ac
447.El
448.Pp
449should be used.
450.Ao port Ac represents the name of an existing Darwinports
451.Nm port .
452.Bl -tag -width lc
453.It Ic depends_build
454List of dependencies to check before
455.Cm build ,
456.Cm destroot ,
457.Cm install ,
458and
459.Cm package
460targets.
461.br
462.Sy Type:
463.Em optional
464.br
465.Sy Example:
466.Dl depends_build bin:autoconf:autoconf
467.It Ic depends_run
468List of dependencies to check before
469.Cm destroot ,
470.Cm install
471and
472.Cm package
473targets.
474.br
475.Sy Type:
476.Em optional
477.br
478.Sy Example:
479.Dl depends_run bin:bash:bash
480.It Ic depends_lib
481List of dependencies to check before
482.Cm configure ,
483.Cm build ,
484.Cm destroot ,
485.Cm install ,
486and
487.Cm package
488targets.
489.br
490.Sy Type:
491.Em optional
492.br
493.Sy Example:
494.Dl depends_lib lib:libfetch.3:libfetch
495.El
496.Sh FETCH OPTIONS
497Fetch all distribution files and patches.
498.Bl -tag -width lc
499.It Ic master_sites.mirror_subdir
500Subdirectory to append to all mirror sites for any list specified in
501master_sites.
502.br
503.Sy Type:
504.Em optional
505.br
506.Sy Default:
507.Em ${name}
508.br
509.Sy Example:
510.Dl master_sites.mirror_subdir      magic
511.It Ic patch_sites
512List of sites to fetch
513.Ic patchfiles
514from or a predefined mirror site list.
515.br
516.Sy Type:
517.Em optional
518.br
519.Sy Default:
520.Em ${master_sites}
521.br
522.Sy Example:
523.Dl patch_sites ftp://ftp.patchcityrepo.com/pub/magic/patches
524.It Ic patch_sites.mirror_subdir
525Subdirectory to append to all mirror sites for any list specified in
526.Ic patch_sites .
527.br
528.Sy Type:
529.Em optional
530.br
531.Sy Default:
532.Em ${name}
533.br
534.Sy Example:
535.Dl patch_sites.mirror_subdir       magic
536.It Ic extract.suffix
537Suffix to append to
538.Ic distname .
539.br
540.Sy Type:
541.Em optional
542.br
543.Sy Default:
544.Em .tar.gz
545.br
546.Sy Example:
547.Dl extract.suffix .tgz
548.It Ic distfiles
549List of distribution files to fetch from
550.Ic master_sites .
551.br
552.Sy Type:
553.Em optional
554.br
555.Sy Default:
556.Em [suffix ${distname}]
557.br
558.Sy Example:
559.Dl distfiles magicsource.tar.gz cluebat.tar.bz2
560.It Ic patchfiles
561List of patches to fetch and apply.
562.br
563.Sy Type:
564.Em optional
565.br
566.Sy Example:
567.Dl patchfiles japanese-widechar-fix.diff japanese-localization.diff
568.It Ic use_zip
569Use zip.
570.br
571Sets extract.suffix to: .zip
572.br
573Sets extract.cmd to: unzip
574.br
575Sets extract.pre_args to: -q
576.br
577Sets extract.post_args to: "-d $portpath/$workdir"
578.br
579.Sy Type:
580.Em optional
581.br
582.Sy Example:
583.Dl use_zip yes
584.It Ic use_bzip2
585Use bzip2.
586.br
587Sets extract.suffix to: .bzip2
588.br
589Sets extract.cmd to: bzip2
590.br
591.Sy Type:
592.Em optional
593.br
594.Sy Example:
595.Dl use_bzip2 yes
596.It Ic dist_subdir
597Create a sub-directory in
598.Ic distpath
599to store all fetched files.
600.br
601.Sy Type:
602.Em optional
603.br
604.Sy Default:
605.Em ${name}
606.br
607.Sy Example:
608.Dl dist_subdir vim${version}
609.El
610.Ss ADVANCED FETCH OPTIONS
611Some mirrors require special options for the actual resource to be properly
612fetched.
613.Bl -tag -width lc
614.It Ic fetch.user
615HTTP or FTP user to fetch the resource.
616.br
617.Sy Type:
618.Em optional
619.It Ic fetch.password
620HTTP or FTP password to fetch the resource.
621.br
622.Sy Type:
623.Em optional
624.It Ic fetch.use_epsv
625Whether to use EPSV command for FTP transfers.
626.br
627.Sy Type:
628.Em optional
629.br
630.Sy Default:
631.Em yes
632.br
633.El
634.Ss FETCHING FROM CVS
635As an alternative to fetching distribution files, pulling the sources
636from a CVS repository is supported. Use of CVS can give rise to
637non-reproducible builds, so it is strongly discouraged.
638.Bl -tag -width lc
639.It Ic cvs.tag
640CVS tag identifying the code to checkout.
641.br
642.Sy Type:
643.Em optional
644.It Ic cvs.date
645Date identifying the code to checkout.
646.br
647.Sy Type:
648.Em optional
649.br
650.Sy Example:
651.Dl cvs.date \*q12-April-2005\*q
652.It Ic cvs.module
653CVS module to check the code out from.
654.br
655.Sy Type:
656.Em optional
657.El
658.Sh EXTRACT OPTIONS
659Extract all compressed/archived files.
660.Bl -tag -width lc
661.It Ic extract.only
662List of files to extract into
663.Ic workpath .
664.br
665.Sy Type:
666.Em optional
667.br
668.Sy Default:
669.Em ${distfiles}
670.br
671.Sy Example:
672.Dl extract.only worksrc-1.4.4.tar.gz
673.It Ic extract.cmd
674Command to perform the extraction.
675.br
676.Sy Type:
677.Em optional
678.br
679.Sy Default:
680.Em gzip
681.br
682.Sy Example:
683.Dl extract.cmd bzip2
684.El
685.Sh BUILD OPTIONS
686Execute necessary build commands.
687.Bl -tag -width lc
688.It Ic build.cmd
689Make command to run relative to
690.Ic worksrcdir .
691.br
692.Sy Type:
693.Em optional
694.br
695.Sy Default:
696.Em make
697.br
698.Sy Example:
699.Dl build.cmd pbxbuild
700.It Ic build.type
701Defines which 'make' is required, either 'gnu' or 'bsd'.
702Sets
703.Ic build.cmd
704to either
705.Pa gnumake
706or
707.Pa bsdmake
708accordingly.
709.br
710.Sy Type:
711.Em optional
712.br
713.Sy Default:
714.Em gnu
715.br
716.Sy Example:
717.Dl build.type bsd
718.It Ic build.target
719Target passed to
720.Ic build.cmd .
721.br
722.Sy Type:
723.Em optional
724.br
725.Sy Default:
726.Em all
727.br
728.Sy Example:
729.Dl build.target all-src
730.El
731.Sh DESTROOT OPTIONS
732Execute necessary commands to install into a temporary destination root
733("destroot") staging area.
734.Bl -tag -width lc
735.It Ic destroot.cmd
736Install command to run relative to
737.Ic worksrcdir .
738.br
739.Sy Type:
740.Em optional
741.br
742.Sy Default:
743.Em ${build.cmd}
744.br
745.Sy Example:
746.Dl destroot.cmd pbxbuild
747.It Ic destroot.type
748Defines which 'make' is required, either 'gnu' or 'bsd'.
749Sets
750.Ic destroot.cmd
751to either
752.Pa gnumake
753or
754.Pa bsdmake
755accordingly.
756.br
757.Sy Type:
758.Em optional
759.br
760.Sy Default:
761.Em ${build.type}
762.br
763.Sy Example:
764.Dl destroot.type gnu
765.It Ic destroot.destdir
766Arguments passed to
767.Ic destroot.cmd
768in order to install correctly
769into the destroot.
770.br
771.Sy Type:
772.Em optional
773.br
774.Sy Default:
775.Em DESTDIR=${destroot}
776.br
777.Sy Example:
778.Dl destroot.destdir prefix=${destroot}${prefix}
779.It Ic destroot.target
780Install target to pass to
781.Ic destroot.cmd .
782.br
783.Sy Type:
784.Em optional
785.br
786.Sy Default:
787.Em install
788.br
789.Sy Example:
790.Dl destroot.target install-src
791.It Ic destroot.umask
792Umask to use during destroot.
793.br
794.Sy Type:
795.Em optional
796.br
797.Sy Default:
798.Em 022
799.br
800.Sy Example:
801.Dl destroot.umask 002
802.It Ic destroot.keepdirs
803List of directories that should not be pruned if empty upon
804.Cm destroot
805completion.
806.br
807.Sy Type:
808.Em optional
809.br
810.Sy Example:
811.Dl destroot.keepdirs ${destroot}${prefix}/var/log/mysql
812.El
813.Sh TEST OPTIONS
814Execute commands to run test suites bundled with a port.
815.Bl -tag -width lc
816.It Ic test.run
817Enable running test suites bundled with a port.
818.br
819.Sy Type:
820.Em optional
821.br
822.Sy Example:
823.Dl test.run     yes
824.It Ic test.cmd
825Test command to run relative to
826.Ic worksrcdir .
827.br
828.Sy Type:
829.Em optional
830.br
831.Sy Default:
832.Em ${build.cmd}
833.br
834.Sy Example:
835.Dl test.cmd checks.sh
836.It Ic test.target
837Test target to pass to
838.Ic test.cmd .
839.br
840.Sy Type:
841.Em optional
842.br
843.Sy Default:
844.Em test
845.br
846.Sy Example:
847.Dl test.target checks
848.El
849.Sh STARTUPITEMS OPTIONS
850If a port needs to run on system startup, it can use the Darwinports
851startup mechanism.
852.Bl -tag -width lc
853.It Ic startupitem.name
854Displayed name of the startup item.
855.br
856.Sy Type:
857.Em required
858.br
859.Sy Example:
860.Dl startupitem.name OpenSSH
861.It Ic startupitem.type
862Form of startup item to install.
863.br
864.Sy Type:
865.Em optional
866.br
867.Sy Default:
868.Em SystemStarter
869.br
870.Sy Values:
871.Em SystemStarter RCng
872.El
873.Sh DISTCHECK AND LIVECHECK OPTIONS
874Darwinports can automatically check if the software has been updated
875since the Portfile was modified and if some external changes require
876an update to the Portfile. This helps maintainers have up-to-date
877and working Portfiles.
878.br
879Two checks are available. With distcheck, Darwinports can check that the
880distfile(s) are still downloadable and did not change since the portfile
881was modified.
882With livecheck, Darwinports can query a resource to determine if a newer
883version of the software is available.
884.Bl -tag -width lc
885.It Ic distcheck.check
886This option can be used to disable distcheck. It specifies what kind
887of check should be performed on distfiles:
888.Em moddate
889(check if the Portfile is older than the distfile) or
890.Em none
891(no check).
892.br
893.Sy Type:
894.Em optional
895.br
896.Sy Default:
897.Em moddate
898.br
899.Sy Values:
900.Em moddate none
901.It Ic livecheck.check
902What kind of check to perform to figure out if the software has been updated.
903Can be
904.Em freshmeat
905(uses the date_updated tag of the freshmeat XML file),
906.Em sourceforge
907(uses the version of the latest file release of the project),
908.Em moddate
909(uses the modification date of some URL resource),
910.Em regex
911(retrieve the version by applying a regex to some URL resource),
912.Em regexm
913(retrieve the version by applying a multi-line regex to some URL resource),
914.Em md5
915(compares the md5 sum of some URL resource) or
916.Em none
917(no check).
918.br
919.Sy Type:
920.Em optional
921.br
922.Sy Default:
923.Em freshmeat
924or
925.Em sourceforge
926if the master_sites is sourceforge.
927.br
928.Sy Values:
929.Em freshmeat sourceforge moddate regex regexm md5 none
930.It Ic livecheck.name
931Name of the project for live checks (used for freshmeat and sourceforge checks).
932.br
933.Sy Type:
934.Em optional
935.br
936.Sy Default:
937.Em ${name}
938or the sourceforge project name if it can be guessed by looking at the master_sites.
939.It Ic livecheck.version
940Version of the project for live checks (used for regex-based checks).
941.br
942.Sy Type:
943.Em optional
944.br
945.Sy Default:
946.Em ${version}
947.It Ic livecheck.url
948URL to query for the check.
949.br
950.Sy Type:
951.Em optional
952.br
953.Sy Default:
954.Em ${homepage}
955or
956.Em http://freshmeat.net/projects-xml/${livecheck.name}/${livecheck.name}.xml
957or
958.Em http://sourceforge.net/export/rss2_projfiles.php?project=${livecheck.name}
959.It Ic livecheck.regex
960Regular expression to parse the resource for regex checks.
961.br
962.Sy Type:
963.Em optional
964.It Ic livecheck.md5
965md5 sum to use for md5 comparison.
966.br
967.Sy Type:
968.Em optional
969.El
970.Sh VARIANT OPTIONS
971Darwinports allows for conditional modification to be specified in a
972.Nm ,
973allowing for user-customization of a software's build-time settings.
974.Bl -tag -width lc
975.It Xo
976.Ic variant
977.Op Cm requires Ar variant
978.Op Cm conflicts Ar variant
979.Xc
980The value is usually a TCL script which modifies other port's
981.Nm
982variables. Dependencies and conflicts with other variants in the same
983port can be expressed with
984.Cm requires
985and
986.Cm conflicts .
987The example adds a "gnome" variant to a port.
988.br
989.Sy Type:
990.Em optional
991.br
992.Sy Example:
993.Bd -literal -offset indent -compact
994variant gnome requires glib { configure.args-append --with-gnome \e\
995
996    depends_lib-append lib:gnome-session:gnome-session }
997.Ed
998.It Ic default_variants
999If variants are defined, then the
1000.Ic default_variants
1001value lists which variants are enabled by default.
1002.br
1003.Sy Type:
1004.Em optional
1005.br
1006.Sy Example:
1007.Dl default_variants +ssl +tcpd
1008.El
1009.Sh PLATFORM OPTIONS
1010Darwinports allows for platform-specific conditional modification to be
1011specified in a
1012.Nm ,
1013much like variants, for handling differences between platforms and
1014versions of the same platform.
1015.Bl -tag -width lc
1016.It Xo
1017.Ic platform
1018.Ar platform
1019.Op Ar version
1020.Op Ar arch
1021.Xc
1022The platform key is used to begin the darwin platform definitions as
1023shown in the examples from the databases/db4 and devel/libidl1
1024.Nm Portfiles
1025respectively.
1026.br
1027.Sy Type:
1028.Em optional
1029.br
1030.Sy Example:
1031.Bd -literal -offset indent -compact
1032platform darwin 6 { configure.args-append   --enable-tcl \e\
1033
1034        --with-tcl=/System/Library/Tcl/8.3 }
1035.Ed
1036.br
1037.Sy Example:
1038.Bd -literal -offset indent -compact
1039platform darwin powerpc { configure.args-append \e\
1040
1041        --host=${os.arch}-apple-rhapsody${os.version} }
1042platform darwin i386 { configure.args-append \e\
1043
1044        --host=i386-gnu-rhapsody${os.version} }
1045.Ed
1046.El
1047.Sh PORTGROUP
1048To factorize the work with similar ports, DarwinPorts provides the notion of
1049.Nm PortGroup
1050that can be used to load definitions for a given class or group of ports. See
1051.Xr portgroup 7
1052for more details on the various PortGroup classes.
1053.Sh TCL EXTENSIONS
1054A number of TCL extensions are available for use in
1055.Nm Portfiles .
1056.Pp
1057.Bl -tag -width lc
1058.Bl -tag -width lc -compact
1059.It Xo
1060.Ic xinstall
1061.Op Fl c
1062.Op Fl B Ar suffix
1063.Op Fl b
1064.Op Fl C
1065.Op Fl f Ar flags
1066.Op Fl g Ar group
1067.Op Fl M
1068.Op Fl m Ar mode
1069.Op Fl o Ar owner
1070.Op Fl p
1071.Op Fl S
1072.Op Fl s
1073.Op Fl W Ar dir
1074.Op Ar
1075.Ar destination
1076.Xc
1077.It Xo
1078.Ic xinstall
1079.Fl d
1080.Op Fl B Ar suffix
1081.Op Fl b
1082.Op Fl C
1083.Op Fl f Ar flags
1084.Op Fl g Ar group
1085.Op Fl M
1086.Op Fl m Ar mode
1087.Op Fl o Ar owner
1088.Op Fl p
1089.Op Fl S
1090.Op Fl s
1091.Op Fl W Ar dir
1092.Ar directory
1093.Xc
1094Install file(s) to a target file or directory. The options are
1095intended to be compatible with
1096.Xr install 1 :
1097.Bl -tag -width indent
1098.It Fl b
1099Backup any existing files with an
1100.Pa .old
1101extension.
1102.It Fl B
1103Specify a different backup suffix for the
1104.Fl b
1105flag.
1106.It Fl c
1107Install files (this is the default).
1108.It Fl C
1109Only copy a file if it is different.
1110.It Fl d
1111Create directories, including (if necessary) parent directories.
1112.It Fl f
1113Specify target flags, see
1114.Xr chflags 1
1115for details.
1116.It Fl g
1117Specify the group.
1118.It Fl M
1119Disable use of
1120.Xr mmap 2 .
1121.It Fl m
1122Specify an alternate mode. The default is 0755. See
1123.Xr chmod 1
1124for defails.
1125.It Fl p
1126Preserve the modification time.
1127.It Fl S
1128Copy safely, using a temporary file.
1129.It Fl s
1130Strip binaries using
1131.Xr strip 1 .
1132.It Fl W
1133Change to
1134.Ar dir
1135before working.
1136.El
1137.El
1138.It Xo
1139.Ic curl fetch
1140.Ar url
1141.Ar file
1142.Xc
1143Fetch a resource at
1144.Ar url
1145and save it to
1146.Ar file .
1147.It Xo
1148.Ic curl isnewer
1149.Ar url
1150.Ar date
1151.Xc
1152Determine if resource at
1153.Ar url
1154is newer than
1155.Ar date
1156(expressed in seconds since epoch).
1157.It Xo
1158.Ic adduser
1159.Ar username
1160.Op Cm uid Ns = Ns uid
1161.Op Cm gid Ns = Ns gid
1162.Op Cm passwd Ns = Ns passwd
1163.Op Cm realname Ns = Ns realname
1164.Op Cm home Ns = Ns home
1165.Op Cm shell Ns = Ns shell
1166.Xc
1167Add a new local user to the system with the specified uid, gid,
1168password, real name, home directory and login shell.
1169.It Ic existsuser Ar username
1170Check if a local user exists.
1171.It Ic nextuid
1172Returns the highest used uid plus one.
1173.It Xo
1174.Ic addgroup
1175.Ar group
1176.Op Cm gid Ns = Ns gid
1177.Op Cm passwd Ns = Ns passwd
1178.Op Cm users Ns = Ns users
1179.Xc
1180Add a new local group to the system, with the specified gid, password
1181and with a list users as members.
1182.It Ic existsgroup Ar group
1183Check if a local group exists and return the corresponding gid. This can be used
1184with adduser:
1185.Dl addgroup foo
1186.Dl adduser foo gid=[existsgroup foo]
1187.It Ic nextgid
1188Returns the highest used gid plus one.
1189.It Ic reinplace Ar regex Ar filename
1190Provide in-place sed like editing of a file.
1191.br
1192.Sy Example:
1193.Dl reinplace \*qs|/usr/local|${prefix}|g\*q doc/manpage.1
1194.It Ic file
1195Standard TCL command to manipulate file names and attributes, recommended if you wish to preserve Mac OS
1196resource forks when destrooting ports on Mac OS X 10.3.x and Mac OS X 10.4.x . Use
1197.Nm xinstall
1198to also preserve Extended Attributes (i.e. Access Control Lists). See
1199.Xr file n .
1200.It Ic system Ar commandline
1201Execute a program. See
1202.Xr system 3 .
1203For calls to
1204.Xr install 1
1205please use
1206.Nm xinstall .
1207For calls to
1208.Xr mv 1 ,
1209.Xr cp 1 ,
1210.Xr rm 1
1211or similar, please use
1212.Nm file .
1213.It Ic variant_isset Ar variant
1214Checks if the given
1215.Ar variant
1216is being built.
1217.It Ic variant_set Ar variant
1218Set the given
1219.Ar variant .
1220.It Ic variant_unset Ar variant
1221Unset the given
1222.Ar variant .
1223.It Va variable Ns - Ns Ic append Ar item
1224Append
1225.Ar item
1226to the
1227.Va variable .
1228.br
1229.Sy Example:
1230.Dl configure.args-append --with-gnomedb
1231.It Va variable Ns - Ns Ic delete Ar item
1232Delete
1233.Ar item
1234from the
1235.Va variable .
1236.br
1237.Sy Example:
1238.Dl configure.args-delete --with-gnomedb
1239.It Ic readdir Ar directory
1240Return the list of elements in a
1241.Ar directory ,
1242excluding
1243.Pa \&.
1244and
1245.Pa \&.. .
1246.It Ic strsed Ar string Ar pattern
1247Perform
1248.Xr ed 1 Ns / Ns
1249.Xr tr 1 Ns -like
1250search, replace, and transliteration on a string.
1251.It Ic mktemp Ar template
1252Create a temporary file using a
1253.Ar template .
1254See
1255.Xr mktemp 3 .
1256.It Ic mkstemp Ar template
1257Create a temporary file securely using a
1258.Ar template .
1259See
1260.Xr mkstemp 3 .
1261.It Ic md5 Ar
1262Compute the MD5 hashes of the file(s).
1263.It Ic rpm-vercomp Ar versionA Ar versionB
1264Compare two RPM-format versions for equality.
1265.It Ic sudo Ar password Ar command Ar \&...
1266Execute
1267.Ar command
1268using
1269.Cm sudo
1270with the provided password.
1271.El
1272.Pp
1273.Bl -tag -width lc -compact
1274.It Ic ui_debug Ar message
1275.It Ic ui_error Ar message
1276.It Ic ui_info Ar message
1277.It Ic ui_msg Ar message
1278.It Ic ui_warn Ar message
1279Display a
1280.Ar message
1281to the user, at various different levels.
1282.br
1283.Sy Example:
1284.Dl ui_msg \*qAdd each user to the system using the clamav command\*q
1285.El
1286.Sh SEE ALSO
1287.Xr port 1 ,
1288.Xr ports.conf 5 ,
1289.Xr portgroup 7 ,
1290.Xr portstyle 7 ,
1291.Xr porthier 7 ,
1292.Xr file n
1293.Sh AUTHORS
1294.An "Landon Fuller" Aq landonf@opendarwin.org
1295.An "Kevin Van Vechten" Aq kevin@opendarwin.org
1296.An "Jordan K. Hubbard" Aq jkh@opendarwin.org
1297.An "Chris Ridd" Aq cjr@opendarwin.org
1298.An "Juan Manuel Palacios" Aq jmpp@opendarwin.org
Note: See TracBrowser for help on using the repository browser.