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

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

New livecheck mode: regexm (matches the whole resource).

  • Property svn:eol-style set to native
File size: 25.2 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 moddate
907(uses the modification date of some URL resource),
908.Em regex
909(retrieve the version by applying a regex to some URL resource),
910.Em regexm
911(retrieve the version by applying a multi-line regex to some URL resource),
912.Em md5
913(compares the md5 sum of some URL resource) or
914.Em none
915(no check).
916.br
917.Sy Type:
918.Em optional
919.br
920.Sy Default:
921.Em freshmeat
922.br
923.Sy Values:
924.Em freshmeat moddate regex md5 none
925.It Ic livecheck.name
926Name of the project for live checks (used for freshmeat-based checks).
927.br
928.Sy Type:
929.Em optional
930.br
931.Sy Default:
932.Em ${name}
933.It Ic livecheck.version
934Version of the project for live checks (used for regex-based checks).
935.br
936.Sy Type:
937.Em optional
938.br
939.Sy Default:
940.Em ${version}
941.It Ic livecheck.url
942URL to query for the check.
943.br
944.Sy Type:
945.Em optional
946.br
947.Sy Default:
948.Em ${homepage}
949or
950.Em http://freshmeat.net/projects-xml/${livecheck.name}/${livecheck.name}.xml
951.It Ic livecheck.regex
952Regular expression to parse the resource for regex checks.
953.br
954.Sy Type:
955.Em optional
956.It Ic livecheck.md5
957md5 sum to use for md5 comparison.
958.br
959.Sy Type:
960.Em optional
961.El
962.Sh VARIANT OPTIONS
963Darwinports allows for conditional modification to be specified in a
964.Nm ,
965allowing for user-customization of a software's build-time settings.
966.Bl -tag -width lc
967.It Xo
968.Ic variant
969.Op Cm requires Ar variant
970.Op Cm conflicts Ar variant
971.Xc
972The value is usually a TCL script which modifies other port's
973.Nm
974variables. Dependencies and conflicts with other variants in the same
975port can be expressed with
976.Cm requires
977and
978.Cm conflicts .
979The example adds a "gnome" variant to a port.
980.br
981.Sy Type:
982.Em optional
983.br
984.Sy Example:
985.Bd -literal -offset indent -compact
986variant gnome requires glib { configure.args-append --with-gnome \e\
987
988    depends_lib-append lib:gnome-session:gnome-session }
989.Ed
990.It Ic default_variants
991If variants are defined, then the
992.Ic default_variants
993value lists which variants are enabled by default.
994.br
995.Sy Type:
996.Em optional
997.br
998.Sy Example:
999.Dl default_variants +ssl +tcpd
1000.El
1001.Sh PLATFORM OPTIONS
1002Darwinports allows for platform-specific conditional modification to be
1003specified in a
1004.Nm ,
1005much like variants, for handling differences between platforms and
1006versions of the same platform.
1007.Bl -tag -width lc
1008.It Xo
1009.Ic platform
1010.Ar platform
1011.Op Ar version
1012.Op Ar arch
1013.Xc
1014The platform key is used to begin the darwin platform definitions as
1015shown in the examples from the databases/db4 and devel/libidl1
1016.Nm Portfiles
1017respectively.
1018.br
1019.Sy Type:
1020.Em optional
1021.br
1022.Sy Example:
1023.Bd -literal -offset indent -compact
1024platform darwin 6 { configure.args-append   --enable-tcl \e\
1025
1026        --with-tcl=/System/Library/Tcl/8.3 }
1027.Ed
1028.br
1029.Sy Example:
1030.Bd -literal -offset indent -compact
1031platform darwin powerpc { configure.args-append \e\
1032
1033        --host=${os.arch}-apple-rhapsody${os.version} }
1034platform darwin i386 { configure.args-append \e\
1035
1036        --host=i386-gnu-rhapsody${os.version} }
1037.Ed
1038.El
1039.Sh PORTGROUP
1040To factorize the work with similar ports, DarwinPorts provides the notion of
1041.Nm PortGroup
1042that can be used to load definitions for a given class or group of ports. See
1043.Xr portgroup 7
1044for more details on the various PortGroup classes.
1045.Sh TCL EXTENSIONS
1046A number of TCL extensions are available for use in
1047.Nm Portfiles .
1048.Pp
1049.Bl -tag -width lc
1050.Bl -tag -width lc -compact
1051.It Xo
1052.Ic xinstall
1053.Op Fl c
1054.Op Fl B Ar suffix
1055.Op Fl b
1056.Op Fl C
1057.Op Fl f Ar flags
1058.Op Fl g Ar group
1059.Op Fl M
1060.Op Fl m Ar mode
1061.Op Fl o Ar owner
1062.Op Fl p
1063.Op Fl S
1064.Op Fl s
1065.Op Fl W Ar dir
1066.Op Ar
1067.Ar destination
1068.Xc
1069.It Xo
1070.Ic xinstall
1071.Fl d
1072.Op Fl B Ar suffix
1073.Op Fl b
1074.Op Fl C
1075.Op Fl f Ar flags
1076.Op Fl g Ar group
1077.Op Fl M
1078.Op Fl m Ar mode
1079.Op Fl o Ar owner
1080.Op Fl p
1081.Op Fl S
1082.Op Fl s
1083.Op Fl W Ar dir
1084.Ar directory
1085.Xc
1086Install file(s) to a target file or directory. The options are
1087intended to be compatible with
1088.Xr install 1 :
1089.Bl -tag -width indent
1090.It Fl b
1091Backup any existing files with an
1092.Pa .old
1093extension.
1094.It Fl B
1095Specify a different backup suffix for the
1096.Fl b
1097flag.
1098.It Fl c
1099Install files (this is the default).
1100.It Fl C
1101Only copy a file if it is different.
1102.It Fl d
1103Create directories, including (if necessary) parent directories.
1104.It Fl f
1105Specify target flags, see
1106.Xr chflags 1
1107for details.
1108.It Fl g
1109Specify the group.
1110.It Fl M
1111Disable use of
1112.Xr mmap 2 .
1113.It Fl m
1114Specify an alternate mode. The default is 0755. See
1115.Xr chmod 1
1116for defails.
1117.It Fl p
1118Preserve the modification time.
1119.It Fl S
1120Copy safely, using a temporary file.
1121.It Fl s
1122Strip binaries using
1123.Xr strip 1 .
1124.It Fl W
1125Change to
1126.Ar dir
1127before working.
1128.El
1129.El
1130.It Xo
1131.Ic curl fetch
1132.Ar url
1133.Ar file
1134.Xc
1135Fetch a resource at
1136.Ar url
1137and save it to
1138.Ar file .
1139.It Xo
1140.Ic curl isnewer
1141.Ar url
1142.Ar date
1143.Xc
1144Determine if resource at
1145.Ar url
1146is newer than
1147.Ar date
1148(expressed in seconds since epoch).
1149.It Xo
1150.Ic adduser
1151.Ar username
1152.Op Cm uid Ns = Ns uid
1153.Op Cm gid Ns = Ns gid
1154.Op Cm passwd Ns = Ns passwd
1155.Op Cm realname Ns = Ns realname
1156.Op Cm home Ns = Ns home
1157.Op Cm shell Ns = Ns shell
1158.Xc
1159Add a new local user to the system with the specified uid, gid,
1160password, real name, home directory and login shell.
1161.It Ic existsuser Ar username
1162Check if a local user exists.
1163.It Ic nextuid
1164Returns the highest used uid plus one.
1165.It Xo
1166.Ic addgroup
1167.Ar group
1168.Op Cm gid Ns = Ns gid
1169.Op Cm passwd Ns = Ns passwd
1170.Op Cm users Ns = Ns users
1171.Xc
1172Add a new local group to the system, with the specified gid, password
1173and with a list users as members.
1174.It Ic existsgroup Ar group
1175Check if a local group exists and return the corresponding gid. This can be used
1176with adduser:
1177.Dl addgroup foo
1178.Dl adduser foo gid=[existsgroup foo]
1179.It Ic nextgid
1180Returns the highest used gid plus one.
1181.It Ic reinplace Ar regex Ar filename
1182Provide in-place sed like editing of a file.
1183.br
1184.Sy Example:
1185.Dl reinplace \*qs|/usr/local|${prefix}|g\*q doc/manpage.1
1186.It Ic file
1187Standard TCL command to manipulate file names and attributes, recommended if you wish to preserve Mac OS
1188resource forks when destrooting ports on Mac OS X 10.3.x and Mac OS X 10.4.x . Use
1189.Nm xinstall
1190to also preserve Extended Attributes (i.e. Access Control Lists). See
1191.Xr file n .
1192.It Ic system Ar commandline
1193Execute a program. See
1194.Xr system 3 .
1195For calls to
1196.Xr install 1
1197please use
1198.Nm xinstall .
1199For calls to
1200.Xr mv 1 ,
1201.Xr cp 1 ,
1202.Xr rm 1
1203or similar, please use
1204.Nm file .
1205.It Ic variant_isset Ar variant
1206Checks if the given
1207.Ar variant
1208is being built.
1209.It Ic variant_set Ar variant
1210Set the given
1211.Ar variant .
1212.It Ic variant_unset Ar variant
1213Unset the given
1214.Ar variant .
1215.It Va variable Ns - Ns Ic append Ar item
1216Append
1217.Ar item
1218to the
1219.Va variable .
1220.br
1221.Sy Example:
1222.Dl configure.args-append --with-gnomedb
1223.It Va variable Ns - Ns Ic delete Ar item
1224Delete
1225.Ar item
1226from the
1227.Va variable .
1228.br
1229.Sy Example:
1230.Dl configure.args-delete --with-gnomedb
1231.It Ic readdir Ar directory
1232Return the list of elements in a
1233.Ar directory ,
1234excluding
1235.Pa \&.
1236and
1237.Pa \&.. .
1238.It Ic strsed Ar string Ar pattern
1239Perform
1240.Xr ed 1 Ns / Ns
1241.Xr tr 1 Ns -like
1242search, replace, and transliteration on a string.
1243.It Ic mktemp Ar template
1244Create a temporary file using a
1245.Ar template .
1246See
1247.Xr mktemp 3 .
1248.It Ic mkstemp Ar template
1249Create a temporary file securely using a
1250.Ar template .
1251See
1252.Xr mkstemp 3 .
1253.It Ic md5 Ar
1254Compute the MD5 hashes of the file(s).
1255.It Ic rpm-vercomp Ar versionA Ar versionB
1256Compare two RPM-format versions for equality.
1257.It Ic sudo Ar password Ar command Ar \&...
1258Execute
1259.Ar command
1260using
1261.Cm sudo
1262with the provided password.
1263.El
1264.Pp
1265.Bl -tag -width lc -compact
1266.It Ic ui_debug Ar message
1267.It Ic ui_error Ar message
1268.It Ic ui_info Ar message
1269.It Ic ui_msg Ar message
1270.It Ic ui_warn Ar message
1271Display a
1272.Ar message
1273to the user, at various different levels.
1274.br
1275.Sy Example:
1276.Dl ui_msg \*qAdd each user to the system using the clamav command\*q
1277.El
1278.Sh SEE ALSO
1279.Xr port 1 ,
1280.Xr ports.conf 5 ,
1281.Xr portgroup 7 ,
1282.Xr portstyle 7 ,
1283.Xr porthier 7 ,
1284.Xr file n
1285.Sh AUTHORS
1286.An "Landon Fuller" Aq landonf@opendarwin.org
1287.An "Kevin Van Vechten" Aq kevin@opendarwin.org
1288.An "Jordan K. Hubbard" Aq jkh@opendarwin.org
1289.An "Chris Ridd" Aq cjr@opendarwin.org
1290.An "Juan Manuel Palacios" Aq jmpp@opendarwin.org
Note: See TracBrowser for help on using the repository browser.