root/branches/1.1/runtime/build-pear-package.xml

Revision 205, 4.7 kB (checked in by david, 3 years ago)

Getting ready for 1.1.1

Line 
1 <?xml version="1.0"?>
2
3 <!--
4         This build file creates a minimal package of propel-runtime files,
5         builds a package.xml for installation using PEAR and creates the necessary TGZ file.
6                
7 -->     
8
9 <project name="propel_runtime" basedir="." default="main">
10        
11         <property name="build.base.dir" value="build"/>
12         <property name="pkgname" value="${phing.project.name}-${version}"/>             
13         <property name="build.src.dir" value="${build.base.dir}/${pkgname}"/>
14        
15         <fileset dir="classes/propel" id="classes">                     
16                 <include name="**"/>
17         </fileset>     
18
19         <!--
20                 ==============================================
21                 Main entry point
22                 ==============================================
23         -->                             
24         <target name="main" if="version" depends="versioncheck">       
25                 <phingcall target="build"/>
26                 <phingcall target="pear-package"/>
27                 <phingcall target="tar"/>
28         </target>
29
30         <!--
31          ===================================================================
32          Target: checks if language was given, otherwise fail
33          ===================================================================
34         -->
35         <target name="versioncheck" unless="version">
36                 <echo message="====================================================="/>
37                 <echo message="Version not specified. You must enter a version. In"/>
38                 <echo message="the future you can add this to build.properties or"/>
39                 <echo message="enter it on the command line: "/>
40                 <echo message=" "/>
41                 <echo message="-Dversion=1.0.0"/>
42                 <echo message="====================================================="/>
43                 <input propertyname="version" promptChar=":">Propel version for package</input>
44                
45                 <property name="pkgname" value="${phing.project.name}-${version}" override="true"/>             
46                 <property name="build.src.dir" value="${build.base.dir}/${pkgname}" override="true"/>
47                
48         </target>
49  
50         <!--
51                 ==============================================
52                 Copy the desired files into the build/ dir
53                 making sure to put them in the directory
54                 structure that will be needed for PEAR install
55                 ==============================================
56         -->     
57         <target name="build">
58                 <echo>-----------------------------</echo>
59                 <echo>| Creating directory layout |</echo>
60                 <echo>-----------------------------</echo>
61                
62                 <delete dir="${build.base.dir}"/>
63                 <mkdir dir="${build.base.dir}"/>
64                
65                 <copy todir="${build.src.dir}">                 
66                         <fileset refid="classes"/>
67                 </copy>
68                                
69         </target>
70        
71         <!--
72                 ==============================================
73                 Create a PEAR package.xml which will guide the
74                 installation.
75                 ==============================================
76         -->     
77         <target name="pear-package">
78        
79                 <echo>-----------------------------</echo>
80                 <echo>| Creating PEAR package.xml |</echo>
81                 <echo>-----------------------------</echo>
82                 <echo></echo>
83                 <echo>... This may take some time ...</echo>
84                
85                 <pearpkg name="${phing.project.name}" dir="${build.src.dir}" destFile="${build.base.dir}/package.xml">
86                        
87                         <fileset dir="${build.src.dir}">
88                                 <include name="**"/>
89                         </fileset>
90                        
91                         <option name="baseinstalldir" value="propel"/>
92                        
93                         <option name="notes">Due to popular demand, the 1.1.1 release introduces compatibility with Phing 2.1.0-final. It does not contain any new features.</option>
94                        
95                         <!-- Set the simple options -->
96                         <option name="description">This is the runtime component of the Propel object persistence framework.</option>
97                        
98                         <option name="summary">PHP5 object persistence layer based on Apache Torque</option>
99                         <option name="version" value="${version}"/>
100                         <option name="state" value="stable"/>
101                         <option name="license" value="LGPL"/>
102                        
103                         <!-- Set the complex options -->
104                         <mapping name="maintainers">
105                                 <element>
106                                         <element key="handle" value="hlellelid"/>
107                                         <element key="name" value="Hans"/>
108                                         <element key="email" value="hans@xmpl.org"/>
109                                         <element key="role" value="lead"/>
110                                 </element>
111                         </mapping>
112                        
113                         <mapping name="deps">
114                                 <element>
115                                         <element key="type" value="php"/>
116                                         <element key="version" value="5.0.0"/>
117                                         <element key="rel" value="ge"/>
118                                 </element>
119                                 <element>
120                                         <element key="name" value="creole"/>
121                                         <element key="type" value="pkg"/>
122                                         <element key="version" value="1.0.1"/>
123                                         <element key="rel" value="ge"/>
124                                 </element>
125                         </mapping>
126                        
127                 </pearpkg>
128         </target>
129        
130         <!--
131                 ==============================================
132                 Create a tar.gz of the files, which will be
133                 installed by pear package manager.
134                 ==============================================
135         -->
136         <target name="tar">
137                 <echo>-----------------------------</echo>
138                 <echo>| Creating tar.gz package   |</echo>
139                 <echo>-----------------------------</echo>     
140                 <property name="tarfile" value="${build.base.dir}/${pkgname}.tgz"/>
141                 <delete file="${tarfile}"/>
142                 <tar destFile="${tarfile}" basedir="${build.base.dir}" />               
143         </target>
144        
145 </project>
Note: See TracBrowser for help on using the browser.