Index: hb-guide-metadata.xml =================================================================== RCS file: /var/cvsroot/gentoo/xml/htdocs/proj/en/devrel/handbook/hb-guide-metadata.xml,v retrieving revision 1.12 diff -u -B -r1.12 hb-guide-metadata.xml --- hb-guide-metadata.xml 15 Jul 2008 15:33:15 -0000 1.12 +++ hb-guide-metadata.xml 15 Jul 2008 19:24:56 -0000 @@ -10,8 +10,8 @@ --> -1.0.5 -2008-03-31 +1.0.6 +2008-07-10
Why the need for metadata.xml? @@ -115,7 +115,40 @@ <longdescription> This tag contains a description of the package. This is to augment the - DESCRIPTION field in the ebuilds themselves. + DESCRIPTION field in the ebuilds themselves. This tag has two optional + subtags: <pkg> and <cat>. + + + + <use> + + This tag contains descriptions of USE flags. + This tag is optional and, if specified, has one required subtag: + <flag>. + + + + <flag> + + This tag contains a description of how the named USE flag affects this + package. It is required if the <use> tag is specified. + It alos requires the USE flag to be named in the name attribute. + This tag has two optional subtags: <pkg> and + <cat>. + + + + <pkg> + + This tag contains a valid package name in the format of a DEPEND. + + + + <cat> + + This tag contains a valid category name as defined in + profiles/categories. @@ -134,7 +167,8 @@ lang - <description>, <longdescription> + <description>, <longdescription>, + <use> In every case where a description is required, there must be at @@ -149,20 +183,33 @@ restrict <herd>, <maintainer>, - <longdescription> + <longdescription>, <flag> - The restrict attribute allows to restrict the application of certain tags - to certain versions of a package. When this attribute is used, a tag + The restrict attribute allows one to restrict the application of certain + tags to certain versions of a package. When this attribute is used, a tag without this attribute must also exist. That tag without the restrict attribute will serve as the default. The format of the restrict attribute is that of the DEPEND flag, except that "<" and ">" need to be specified by &lt; and &gt;.

- For example in the db package - restrict="&gt;=sys-libs/db-3.2.9-r5" - on the maintainer tag shows that I'm currently maintaining all versions - bigger then 3.2.9-r5. + For example, in the sys-libs/db package, + restrict="&gt;=sys-libs/db-3.2.9-r5" on the + maintainer tag shows that I'm currently maintaining all + versions greater then 3.2.9-r5. +
+ + + name + + <name> + + + This attribute is required on the <flag> tag. It + simply contains the USE flag. +

+ For example, in the sys-apps/hal package, >flag name='acpi'> + Enables ACPI</flag>
@@ -256,5 +303,59 @@ + +Third Example + + +

+For the third example, we will describe the metadata.xml of +sys-apps/hal. This ebuild is maintained by the gentopia herd +and contains USE flag descriptions. +

+ +
+<?xml version="1.0" encoding="UTF-8">
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>gentopia</herd>
+<maintainer>
+	<email>compnerd@gentoo.org</email>
+</maintainer>
+<maintainer>
+	<email>steev@gentoo.org</email>
+</maintainer>
+<use>
+	<flag name='acpi'>Enables HAL to attempt to read from
+	/proc/acpi/event, if unavailable, HAL will read events from
+	<pkg>sys-power/acpid</pkg>. If you need multiple acpi
+	readers, ensure acpid is in your default runlevel along with HAL. This
+	will also enable HAL to read Toshia and IBM acpi events which do not
+	get sent via /proc/acpi/event</flag>
+	<flag name='crypt'>Allows HAL to mount volumes that are encrypted using
+	LUKS. <pkg>sys-fs/cryptsetup-luks</pkg> which has recently been renamed
+	to <pkg>sys-fs/cryptsetup</pkg> allows you to create such encrypted
+	volumes. HAL will be able to handle volumes that are removable or
+	fixed.</flag>
+	<flag name='dell'>Builds an installs the Dell addon, which reads data from
+	the Dell SM BIOS via <pkg>sys-libs/libsmbios</pkg>. It will read your
+	service tag information and your hardware backlight data as well as
+	allow you to modify the backlight settings on a Dell laptop.</flag>
+	<flag name='disk-partition'>Allows HAL to use libparted from
+	<pkg>sys-apps/parted</pkg> to read raw partition data from your disks
+	and process that data. Future versions of HAL (possibly 0.5.11 and
+	higher) will allow you to create, modify, delete and format partitions
+	from a GUI interface agnostic of your desktop environment.</flag>
+	<flag name='doc'>Generates documentation that describes HAL's fdi
+	format.</flag>
+	<flag name='pcmcia'>Allows HAL to process PCMCIA/CardBus slot data which
+	includes inserts and removals and act on these events.</flag>
+	<flag name='selinux'>Installs SELinux policies and links HAL to the SELinux
+	libraries.</flag>
+</use>
+</pkgmetadata>
+
+ + +