svn-gvsig-desktop / tags / v1_10_0_Build_1260 / install / instalador-gvSIG-deb / build.xml @ 42158
History | View | Annotate | Download (5.48 KB)
1 | 29205 | jvhigon | <?xml version="1.0" encoding="UTF-8"?>
|
---|---|---|---|
2 | 31598 | jvhigon | <project name="BuildDebian" basedir="." default="build-without-jre"> |
3 | 29205 | jvhigon | |
4 | <property name="dist.dir" value="dist"/> |
||
5 | <property name="build.dir" value="build"/> |
||
6 | 32918 | jvhigon | <property name="gvsig.version" value="1.10"/> |
7 | <property name="gvsig.dir" value="/opt/gvSIG-${gvsig.version}"/> |
||
8 | <property file="../../appgvSIG/build.number" prefix="gvsig"/> |
||
9 | |||
10 | 29325 | jvhigon | <!--
|
11 | <property name="jni-gdal.dir" value="../../libjni-gdal/lib-dist"/>
|
||
12 | <property name="jni-proj.dir" value="../../libjni-proj4/dist"/>
|
||
13 | -->
|
||
14 | 32918 | jvhigon | |
15 | <property name="libs.dir" value="../../binaries/linux"/> |
||
16 | 29325 | jvhigon | <property name="jni-gdal.dir" value="../../binaries/deb-etch/gdal"/> |
17 | <property name="jni-proj.dir" value="../../binaries/deb-etch/proj"/> |
||
18 | 29327 | jvhigon | <property name="jni-ecw.dir" value="../../binaries/deb-etch/ecw"/> |
19 | 30308 | jvhigon | <property name="jni-mrsid.dir" value="../../binaries/deb-etch/mrsid"/> |
20 | 29325 | jvhigon | |
21 | 32918 | jvhigon | <target name="prepare" description="Prepare directory build" depends="prepare-common,prepare-all-natives"> |
22 | 29205 | jvhigon | <!--Copy debian structure and change permissions -->
|
23 | <copy todir="${build.dir}" overwrite="true" preservelastmodified="false"> |
||
24 | 32918 | jvhigon | <fileset dir="${resources.dir}"> |
25 | <exclude name="gvSIG.sh"/> |
||
26 | </fileset>
|
||
27 | 29205 | jvhigon | </copy>
|
28 | <exec executable="chmod" dir="${build.dir}/DEBIAN"> |
||
29 | <arg value="775"/> |
||
30 | <arg value="postinst"/> |
||
31 | <arg value="postrm"/> |
||
32 | 30308 | jvhigon | <arg value="preinst"/> |
33 | 29205 | jvhigon | </exec>
|
34 | 32918 | jvhigon | <!--Copy gvSIG.sh -->
|
35 | 30308 | jvhigon | <copy file="${resources.dir}/gvSIG.sh" todir="${build.dir}${gvsig.dir}/bin"/> |
36 | 29282 | jvhigon | </target>
|
37 | |||
38 | 30308 | jvhigon | |
39 | 29282 | jvhigon | <target name="prepare-common" description="Prepare common files in the build directory"> |
40 | 29205 | jvhigon | <!--Copy gvSIG lib -->
|
41 | 29282 | jvhigon | <copy todir="${build.dir}${gvsig.dir}/bin/lib"> |
42 | <fileset dir="../../_fwAndami/lib/"> |
||
43 | <exclude name=".svn"/> |
||
44 | </fileset>
|
||
45 | </copy>
|
||
46 | <!--Copy gvSIG bin directory -->
|
||
47 | <copy todir="${build.dir}${gvsig.dir}/bin/gvSIG"> |
||
48 | <fileset dir="../../_fwAndami/gvSIG/"> |
||
49 | <exclude name=".svn"/> |
||
50 | </fileset>
|
||
51 | </copy>
|
||
52 | <!--Copy theme -->
|
||
53 | <copy todir="${build.dir}${gvsig.dir}/bin/theme"> |
||
54 | <fileset dir="../../_fwAndami/theme/"> |
||
55 | <exclude name=".svn"/> |
||
56 | </fileset>
|
||
57 | </copy>
|
||
58 | <!--Copy andami.jar -->
|
||
59 | <copy file="../../_fwAndami/andami.jar" todir="${build.dir}${gvsig.dir}/bin"/> |
||
60 | 29325 | jvhigon | <!-- Copy /usr resources -->
|
61 | <copy todir="${build.dir}/usr"> |
||
62 | <fileset dir="resources/usr"></fileset> |
||
63 | </copy>
|
||
64 | 29282 | jvhigon | </target>
|
65 | 32918 | jvhigon | |
66 | <target name="prepare-all-natives" description="Prepare directory build with gvSIG native libraries"> |
||
67 | 30308 | jvhigon | <mkdir dir="${build.dir}${gvsig.dir}/libs"/> |
68 | 32918 | jvhigon | <!--Copy ALL natives -->
|
69 | <copy todir="${build.dir}${gvsig.dir}/libs"> |
||
70 | <fileset dir="${libs.dir}"> |
||
71 | <include name="*so*"/> |
||
72 | </fileset>
|
||
73 | </copy>
|
||
74 | 30308 | jvhigon | </target>
|
75 | 29282 | jvhigon | |
76 | 32918 | jvhigon | |
77 | <target name="build-without-jre" description="Creates a Debian Package" depends="clean,prepare-all-natives,copyJAI"> |
||
78 | 29207 | jvhigon | <mkdir dir="${dist.dir}"/> |
79 | 30308 | jvhigon | <antcall target="prepare"> |
80 | 31598 | jvhigon | <param name="resources.dir" value="resources/without-jre"/> |
81 | 30308 | jvhigon | </antcall>
|
82 | 32918 | jvhigon | <antcall target="prepare-version"/> |
83 | 29205 | jvhigon | <exec executable="dpkg"> |
84 | <arg value="--build"/> |
||
85 | <arg value="${build.dir}"/> |
||
86 | <arg value="${dist.dir}"/> |
||
87 | </exec>
|
||
88 | </target>
|
||
89 | 32918 | jvhigon | <target name="build-with-jre" description="Creates a Debian Package with JRE" depends="clean,prepare-all-natives,copyJRE,copyJAI"> |
90 | 30320 | jvhigon | <mkdir dir="${dist.dir}"/> |
91 | <antcall target="prepare"> |
||
92 | 31598 | jvhigon | <param name="resources.dir" value="resources/with-jre"/> |
93 | 30320 | jvhigon | </antcall>
|
94 | 32918 | jvhigon | <antcall target="prepare-version"/> |
95 | 30320 | jvhigon | <exec executable="dpkg"> |
96 | <arg value="--build"/> |
||
97 | <arg value="${build.dir}"/> |
||
98 | <arg value="${dist.dir}"/> |
||
99 | </exec>
|
||
100 | </target>
|
||
101 | 33033 | jvhigon | <target name="build-with-jre-etch" description="Creates a Debian Package with JRE and usinf etch libraries" depends="clean,prepare-all-natives,copyJRE,copyJAI"> |
102 | <mkdir dir="${dist.dir}"/> |
||
103 | <antcall target="prepare"> |
||
104 | <param name="resources.dir" value="resources/with-jre"/> |
||
105 | </antcall>
|
||
106 | <copy todir="${build.dir}${gvsig.dir}/libs" overwrite="true" preservelastmodified="false"> |
||
107 | <fileset dir="${jni-ecw.dir}"/> |
||
108 | <fileset dir="${jni-gdal.dir}"/> |
||
109 | <fileset dir="${jni-mrsid.dir}"/> |
||
110 | <fileset dir="${jni-proj.dir}"/> |
||
111 | </copy>
|
||
112 | <replace file="${build.dir}/DEBIAN/control" token="gvsig-jre" value="gvsig-jre-etch" /> |
||
113 | <antcall target="prepare-version"/> |
||
114 | <exec executable="dpkg"> |
||
115 | <arg value="--build"/> |
||
116 | <arg value="${build.dir}"/> |
||
117 | <arg value="${dist.dir}"/> |
||
118 | </exec>
|
||
119 | </target>
|
||
120 | 32918 | jvhigon | <target name="prepare-version" description="Debian control file"> |
121 | <replace file="${build.dir}/DEBIAN/control" token="#version#" value="${gvsig.version}" /> |
||
122 | <replace file="${build.dir}/DEBIAN/control" token="#build#" value="${gvsig.build.number}" /> |
||
123 | <replace file="${build.dir}/${gvsig.dir}/bin/gvSIG.sh" token="@version" value="${gvsig.version}" /> |
||
124 | <replace file="${build.dir}/usr/share/applications/gvsig.desktop" token="@version" value="${gvsig.version}" /> |
||
125 | |||
126 | <!--<replace file="${build.dir}/DEBIAN/postinst" token="@version" value="${gvsig.version}"/>
|
||
127 | <replace file="${build.dir}/DEBIAN/postrm" token="@version" value="${gvsig.version}" />
|
||
128 | -->
|
||
129 | |||
130 | 29282 | jvhigon | </target>
|
131 | 29205 | jvhigon | |
132 | 29282 | jvhigon | <target name="copyJRE" description="Adds JRE."> |
133 | 32918 | jvhigon | <copy file="../instalador-gvSIG-lin/jre/j2re-1_6_0_20-linux.tar.gz" todir="${build.dir}${gvsig.dir}"/> |
134 | 29282 | jvhigon | |
135 | 29205 | jvhigon | </target>
|
136 | 29282 | jvhigon | <target name="copyJAI" description="Copy JAI libraries."> |
137 | <copy todir="${build.dir}${gvsig.dir}/libs"> |
||
138 | <fileset dir="resources/jai/libs"> |
||
139 | </fileset>
|
||
140 | </copy>
|
||
141 | <copy todir="${build.dir}${gvsig.dir}/bin/lib"> |
||
142 | <fileset dir="resources/jai/lib"> |
||
143 | </fileset>
|
||
144 | </copy>
|
||
145 | 30308 | jvhigon | <copy file="resources/jai/LICENSE-jai.txt" todir="${build.dir}${gvsig.dir}"/> |
146 | 29282 | jvhigon | </target>
|
147 | 29205 | jvhigon | |
148 | <target name="clean" description="Cleans the build directory"> |
||
149 | <delete dir="${build.dir}" /> |
||
150 | </target>
|
||
151 | |||
152 | </project> |