<!-- Document Type Declaration file for INARY pspec.xml files -->
<!-- http://www.pardus.org.tr/projeler/inary/ -->

<!ELEMENT INARY (Source,Package+,History)>

<!-- Source Section -->

<!ELEMENT Source (
	#PCDATA |
	Name |
	Homepage |
	Icon |
	Packager |
	ExcludeArch |
	License |
	IsA |
	PartOf |
	Summary |
	Description |
	Archive |
	AdditionalFiles |
	Patches |
	BuildDependencies
)*>

<!ELEMENT Name (#PCDATA)>

<!ELEMENT Homepage (#PCDATA)>

<!ELEMENT Icon (#PCDATA)>

<!ELEMENT Packager (Name, Email)>
<!ELEMENT Email (#PCDATA)>

<!ELEMENT ExcludeArch (#PCDATA)>

<!ELEMENT License (#PCDATA)>

<!ELEMENT IsA (#PCDATA)>

<!ELEMENT PartOf (#PCDATA)>

<!ELEMENT Summary (#PCDATA)>
<!ATTLIST Summary xml:lang CDATA #IMPLIED>

<!ELEMENT Description (#PCDATA)>
<!ATTLIST Description xml:lang CDATA #IMPLIED>

<!ELEMENT Archive (#PCDATA)>
<!ATTLIST Archive sha1sum CDATA #REQUIRED>
<!-- NOTE: we can limit possible types here to the ones that inary know -->
<!ATTLIST Archive type CDATA #REQUIRED>
<!ATTLIST Archive target CDATA #IMPLIED>

<!ELEMENT BuildFlags (Flag*)>

<!ELEMENT Flag (#PCDATA)>

<!ELEMENT BuildType (#PCDATA)>

<!ELEMENT BuildDependencies (Dependency*)>

<!ELEMENT Dependency (#PCDATA)>
<!ATTLIST Dependency versionFrom CDATA #IMPLIED>
<!ATTLIST Dependency versionTo CDATA #IMPLIED>
<!ATTLIST Dependency version CDATA #IMPLIED>
<!ATTLIST Dependency releaseFrom CDATA #IMPLIED>
<!ATTLIST Dependency releaseTo CDATA #IMPLIED>
<!ATTLIST Dependency release CDATA #IMPLIED>

<!ELEMENT Patches (Patch*)>

<!ELEMENT Patch (#PCDATA)>
<!ATTLIST Patch compressionType CDATA #IMPLIED>
<!ATTLIST Patch level CDATA #IMPLIED>
<!ATTLIST Patch target CDATA #IMPLIED>
<!ATTLIST Patch reverse CDATA #IMPLIED>


<!-- Package Section -->

<!ELEMENT Package (
	#PCDATA |
	Name |
	License |
	Icon |
	IsA |
	PartOf |
	Summary |
	Description |
	BuildFlags |
	BuildType |
	BuildDependencies |
	RuntimeDependencies |
	Files |
	Conflicts |
	Replaces |
	AdditionalFiles |
	Provides
)*>

<!ELEMENT Provides (COMAR)+>
<!ELEMENT COMAR (#PCDATA)>
<!ATTLIST COMAR script CDATA #IMPLIED>
<!ATTLIST COMAR name CDATA #IMPLIED>

<!ELEMENT Conflicts (Package)+>
<!-- we have a problem here, this Package tag only contains a package name
while dtd treats this as another Package section, who said dtd doesnt
suck anyway -->
<!ATTLIST Package versionFrom CDATA #IMPLIED>
<!ATTLIST Package versionTo CDATA #IMPLIED>
<!ATTLIST Package version CDATA #IMPLIED>
<!ATTLIST Package releaseFrom CDATA #IMPLIED>
<!ATTLIST Package releaseTo CDATA #IMPLIED>
<!ATTLIST Package release CDATA #IMPLIED>

<!ELEMENT Replaces (Package)+>

<!ELEMENT AdditionalFiles (AdditionalFile+)>
<!ELEMENT AdditionalFile (#PCDATA)>
<!ATTLIST AdditionalFile target CDATA #REQUIRED>
<!ATTLIST AdditionalFile permission CDATA #IMPLIED>
<!ATTLIST AdditionalFile owner CDATA #IMPLIED>

<!ELEMENT RuntimeDependencies (Dependency*)>

<!ELEMENT Files (Path)+>

<!ELEMENT Path (#PCDATA)>
<!-- NOTE: is this list correct? -->
<!ATTLIST Path fileType
	(executable|library|data|config|doc|man|info|localedata|header)
	#REQUIRED>
<!ATTLIST Path permanent (false|true) #IMPLIED>
<!ATTLIST Path replace (false|true) #IMPLIED>


<!-- History Section -->

<!ELEMENT History (Update+)>

<!ELEMENT Update (#PCDATA | Date | Version | Comment | Type | Requires | Name | Email)*>
<!ATTLIST Update release CDATA #REQUIRED>
<!ATTLIST Update type (critical|security) #IMPLIED>

<!ELEMENT Date (#PCDATA)>
<!ELEMENT Version (#PCDATA)>
<!ELEMENT Comment (#PCDATA)>

<!ELEMENT Type (#PCDATA)>
<!ATTLIST Type package CDATA #IMPLIED>

<!ELEMENT Requires (Action+)>

<!ELEMENT Action (#PCDATA)>
<!ATTLIST Action package CDATA #IMPLIED>
<!ATTLIST Action target CDATA #IMPLIED>
