I would like to propose a format for XML info documents for Fink.  
Please note that this is very preliminary and subject to much change, 
especially since the reason I'm putting this up here is so that it can 
get changed, edited, customized, and finalized.  Once this is finalized, 
and even before, I will begin implementing the feature-set.

My idea of this includes a transition format, and a complete format.  
The complete format will include things like variants and separate 
packages from a single compile, stuff that is not implemented in the 
core of Fink yet.  That format will be created as we implement those 
features.  The 'transitional' feature-set would be a wrapper over the 
existing Fink code that would simply parse the XML into the same hash as 
the regular info files.

Again, please provide any and all comments! Thank you!


Proposed transitional .xinfo format:

Terminology:
Some fields will have values like 'foo, bar, or foobar' those indicate 
multiple possible values.  Some fields are surrounded by braces 
[ foo='bar or foobar' ] those are optional, the default is the first 
specified in the contents of the field, or none if the field is empty.

<package name="foo" version="0.0.1" revision="1" type="bundle, nosource, 
or perl" essential="true or false">
        <maintainer name="John Doe" email="[EMAIL PROTECTED]"/>
        
        <require [type="depends, builddepends, provides, conflicts, 
replaces or predepends"] package="bar"/>
        <suggest [type="suggests, recommends, or enhances"] package="bar"/>
        
        <source url="http://open.source.site/directory/%n-%v.tar.gz"; 
[ directory="%n-%v-2002" ] [ nodirectory="true" ] 
[ rename="file1-%n-%v.tar.gz" ] />
        <custommirror>
                <nam-US url="http://other.source.site/mirror/"/>
                <asi-JP url="http://last.source.site.jp/mirror/"/>
        </custommirror>
        
        <update>
                <configguess [ default="true or false" ] [ dirs="mydir myotherdir"] />
                <libtool [ default="true or false" ] [ dirs="mydir myotherdir"] />
                <pomakefile/>
                <pod/>
        </update>
        
        <patch [ name="%f.patch" ] >
<![CDATA[
patch -p1 script.here
]]>
        </patch>                // <-- Note here that patch is used for both the 
patch and the patchscript, just leave out the contents if you don't want 
the patchscript
        
        <configure params="--insert --your=parems --here">
        <compilescript>
<![CDATA[
make all
make foo
]]>
        </compilescript>
        <installscript>
<![CDATA[
make install
make install-foo
]]>
        </installscript>
        
        <doc files="README LICENSE COPYRIGHT INSTALL Stuff"/>
        <set env="CPPFlags" [ value="-I/my/path" ] [ noset="true" ]/>
        
        <script type="preinst, postinst, prerm, or postrm">
<![CDATA[
add --your /script/here
]]>
        </script>
        
        <conf files="%p/etc/foo.conf %p/etc/bar.conf"/>
        <info docs="stuff.info foo.info"/>
        
        <daemonic name="foo">
<![CDATA[
<my daemonic="stuff" goes="here"/>
]]>
        </daemonic>
        
        <description text="Fooilator for the bar software"/>
        <desc type="detail, usage, packaging, or port">
                Blah blah blah
        </desc>
        <license type="GPL, LGPL, GPL/LGPL, BSD, Artistic, OSI-Approved, 
Restrictive, Commercial, Public Domain"/>
        <homepage url="http://www.myhome.net/"/>
</package>

Again, please comment on anything and everything you feel like!

Thanks,
Kyle Moffett


_______________________________________________
Fink-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/fink-devel

Reply via email to