<project-template>
    <project-wizard>
	    <_name>PyGTK (automake)</_name>
	    <_description>PyGTK project using automake</_description>
	    <icon>gtk-logo.png</icon>
	    <category>Python</category>
	    <order>1</order>
	    <required-program>automake</required-program>
	    <required-program>autoconf</required-program>
	    <required-program>make</required-program>
	    <required-program>python</required-program>
	    <required-package>gtk+-3.0</required-package>
	    <!-- Not working: <required-package>python-gtk2</required-package>-->
    </project-wizard>

    <page name="basic" _label="Basic information" _description="General Project Information">
	    <property type="string" name="Name" _label="Project Name:" _description="project name" default="pygtk-foobar" summary="yes" restriction="filename" mandatory="yes"/>
	    <property type="string" name="Author" _label="Author:" _description="" default="[+UserName+]" mandatory="yes"/>
	    <property type="string" name="Email" _label="Email address:" _description="" default="[+EmailAddress+]" mandatory="no"/>
	    <property type="string" name="Version" _label="Version:" default="0.1" mandatory="yes"/>
    </page>

	<page name="options" _label="Project options" _description="Options for project build system">
		<property type="directory" name="Destination" _label="Destination:" _description="" default='[+AnjutaProjectDirectory+]/[+(string-downcase (get "Name"))+]' mandatory="yes" exist="no" summary="yes"/>
		[+INCLUDE "licenses.tpl"+]
		<property type="hidden" name="NameUpper" default='[+(string-upcase (get "Name"))+]'/>
		<property type="hidden" name="NameLower" default='[+(string-downcase (get "Name"))+]'/>
		<property type="hidden" name="NameCUpper" default='[+(string-append (if (~~* (get "Name") "[0-9]") "_" "") (string->c-name! (string-substitute (string-upcase (get "Name")) " " "_")))+]'/>
		<property type="hidden" name="NameCLower" default='[+(string->c-name! (string-substitute (string-downcase (get "Name")) " " "_"))+]'/>
		<property type="hidden" name="NameHLower" default='[+(string-substitute (string->c-name! (string-downcase (get "Name"))) " " "-")+]'/>
		<property type="boolean" name="HaveI18n" _label="Add internationalization:" _description="Adds support for internationalization so that your project can have translations in different languages" default="0"/>
		<property type="boolean" name="HavePackage" _label="Configure external packages:" _description="Use pkg-config to add library support from other packages" default="0"/>
		<property type="boolean" name="HaveBuilderUI" _label="Use GtkBuilder for user interface:" _description="Use GtkBuilder to create the user-interface in a graphical way and load it from xml files at runtime" default="1"/>
	</page>

[+IF (=(get "HavePackage") "1")+]
    <page name="packages" _label="Configure external packages" _description="Configure external packages">
		    <property type="package" name="PackageModule1" _label="Required Packages:" _description="Check the packages that your project requires" mandatory="yes"/>
    </page>
[+ENDIF+]    
    <content>
	    <directory source="terminal" destination="[+Destination+]">
		    <file source="AUTHORS"/>
		    <file source="ChangeLog"/>
		    <file source="Makefile.am.tpl" destination="Makefile.am"/>
		    <file source="NEWS"/>
		    <file source="README"/>
		    <file source="autogen.sh" executable="yes"/>
		    [+IF (=(get "HaveI18n") "1") +]
		    <directory source="po">
			    <file source="ChangeLog"/>
			    <file source="LINGUAS" />
		    </directory>
		    [+ENDIF+]
	    </directory>
	    <directory source="pygtk" destination="[+Destination+]">
		    [+IF (=(get "HaveI18n") "1") +]
		    <directory source="po">
			    <file source="POTFILES.in"/>
		    </directory>
		    [+ENDIF+]
		    <file destination="[+NameHLower+].anjuta" source="project.anjuta"/>
		    <file source="configure.ac.tpl" destination="configure.ac"/>
		    <directory source="src">
			    <file source="main.py" destination="[+NameHLower+].py" executable="yes"/>
			    <file source="Makefile.am.tpl" destination="Makefile.am"/>
		    </directory>
	    </directory>
		<directory source="gtk" destination="[+Destination+]">
			<directory source="src">
[+IF (=(get "HaveBuilderUI") "1")+]				
				<file source="project.ui" destination="[+NameHLower+].ui"/>
[+ENDIF+]
			</directory>
		</directory>

	    <directory source="licenses" destination="[+Destination+]">
		    <file source="[+License+].txt" destination="COPYING"/>	
	    </directory>
    </content>

    <action>
	    <open file="[+Destination+]/[+NameHLower+].anjuta"/>
    </action>
</project-template>
