Fix import.
[cyberduck.git] / build-linux.xml
blobc3751aecd1034a103e2333d40d2f92c5114ef358
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3  *      $Revision$
4  *      $Date$
5  *
6  *  Copyright (c) 2005-2012 David Kocher. All rights reserved.
7  *  http://cyberduck.io/
8  *
9  *      This program is free software; you can redistribute it and/or modify
10  *      it under the terms of the GNU General Public License as published by
11  *      the Free Software Foundation; either version 2 of the License, or
12  *      (at your option) any later version.
13  *
14  *      This program is distributed in the hope that it will be useful,
15  *      but WITHOUT ANY WARRANTY; without even the implied warranty of
16  *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  *      GNU General Public License for more details.
18  *
19  *      Bug fixes, suggestions and comments should be sent to:
20  *      dkocher@cyberduck.io
21  -->
22 <project name="Cyberduck for Linux" basedir="."
23          xmlns:fx="javafx:com.sun.javafx.tools.ant">
25     <import file="build.xml"/>
27     <property name="jvm.runtime.bin" value="${java.home}/bin"/>
29     <property name="cli.bundles" value="all"/>
30     <property name="app.icon" value="cyberduck-application.png"/>
31     <property name="rpm.spec" value="${build.bundles}/package/linux"/>
32     <property name="deb.control" value="${build.bundles}/package/linux/control"/>
33     <property name="deb.postinstall" value="${build.bundles}/package/linux/postinst"/>
34     <property name="deb.postrm" value="${build.bundles}/package/linux/postrm"/>
36     <target name="_build"/>
38     <target name="_cli">
39         <copy file="${setup}/rpm/duck.spec" todir="${rpm.spec}"/>
40         <copy file="${setup}/deb/duck.control" tofile="${deb.control}"/>
41         <copy file="${setup}/deb/duck.postinstall" tofile="${deb.postinstall}"/>
42         <copy file="${setup}/deb/duck.postrm" tofile="${deb.postrm}"/>
43         <replace file="${rpm.spec}/duck.spec" summary="true" encoding="UTF-8">
44             <replacefilter token="${VERSION}" value="${version}"/>
45             <replacefilter token="${REVISION}" value="${revision}"/>
46         </replace>
47         <path id="javafx.classpath">
48             <!-- Includes linuxrpmbuilder for given architecture -->
49             <pathelement path="${lib.ext}/ant-javafx.${sun.arch.data.model}.jar"/>
50             <pathelement path="${build.bundles}"/>
51         </path>
52         <copy todir="${build}">
53             <fileset dir="${lib}">
54                 <!-- Include libjnidispatch.so -->
55                 <include name="*.${sun.arch.data.model}.so"/>
56             </fileset>
57             <mapper type="glob" from="*.${sun.arch.data.model}.so" to="*.so"/>
58         </copy>
59         <taskdef resource="com/sun/javafx/tools/ant/antlib.xml"
60                  uri="javafx:com.sun.javafx.tools.ant">
61             <classpath refid="javafx.classpath"/>
62         </taskdef>
63         <echo message="Create native bundles with classpath ${toString:javafx.classpath}"/>
64         <fx:deploy nativeBundles="${cli.bundles}"
65                    outdir="${build.deploy}"
66                    outfile="${app.name}-${version}"
67                    offlineAllowed="true"
68                    verbose="true">
69             <fx:preferences shortcut="false" menu="false"
70                             install="true"/>
71             <fx:platform basedir="${java.home}">
72                 <fx:jvmarg value="-Djna.nounpack=true"/>
73                 <fx:jvmarg value="-Djna.noclasspath=true"/>
74                 <fx:jvmarg value="-Djava.awt.headless=true"/>
75                 <fx:jvmarg value="-Dsun.jnu.encoding=utf-8"/>
76                 <fx:jvmarg value="-Dfile.encoding=utf-8"/>
77                 <fx:jvmarg value="-Djava.security.egd=file:/dev/./urandom"/>
78                 <fx:jvmarg value="-Djava.net.useSystemProxies=true"/>
79             </fx:platform>
80             <fx:application
81                     name="duck" version="${version}.${revision}"
82                     mainClass="ch.cyberduck.cli.Terminal"/>
83             <fx:info title="${app.name}" license="GPL" copyright="${copyright}"
84                      description="${app.name}"
85                      vendor="cyberduck.io">
86                 <fx:icon href="${app.icon}"/>
87             </fx:info>
88             <fx:resources>
89                 <fx:fileset dir="${build}" type="jar">
90                     <include name="config-${version}.jar"/>
91                     <include name="core-${version}.jar"/>
92                     <include name="fs-${version}.jar"/>
93                     <include name="cli-${version}.jar"/>
94                 </fx:fileset>
95                 <fx:fileset dir="${lib}" type="jar">
96                     <include name="*.jar"/>
97                 </fx:fileset>
98                 <fx:fileset dir="${build}" type="data">
99                     <include name="*.so"/>
100                 </fx:fileset>
101                 <fx:fileset dir="." type="icon">
102                     <include name="*.ico"/>
103                 </fx:fileset>
104                 <fx:fileset type="license" file="LICENSE.txt"/>
105                 <fx:fileset dir="${home}" type="data">
106                     <include name="profiles/Rackspace US.cyberduckprofile"/>
107                 </fx:fileset>
108                 <!-- Localizations -->
109                 <fx:fileset dir="${home}" type="data">
110                     <include name="*.lproj/*.strings"/>
111                 </fx:fileset>
112             </fx:resources>
113         </fx:deploy>
114     </target>
115 </project>