-
Notifications
You must be signed in to change notification settings - Fork 300
/
build.xml
87 lines (83 loc) · 4.17 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<project name="GanttProject builder">
<property file="build-deb.properties"/>
<path id="class.path">
<pathelement location="build-deb/classes"/>
<fileset dir="lib" includes="*.jar"/>
</path>
<target name="compile-deb-tasks" description="Compile helper code">
<mkdir dir="build-deb/classes"/>
<javac
srcdir="src"
destdir="build-deb/classes"
classpathref="class.path"
target="1.4"
source="1.4"
debug="yes"
includeantruntime="true"
/>
<copy todir="build-deb/classes">
<fileset dir="src" includes="**/*.properties"/>
<fileset dir="src" includes="**/*.xml"/>
</copy>
<jar basedir="build-deb/classes" jarfile="lib/ganttproject-build-deb.jar" includes="**/*.class">
</jar>
</target>
<taskdef name="desktopEntry" classname="com.googlecode.ant_deb_task.DesktopEntry" classpathref="class.path"/>
<taskdef name="deb" classname="com.googlecode.ant_deb_task.Deb" classpathref="class.path"/>
<target name="distDeb" description="Builds DEB package" depends="distBin,distDebPre">
<description>Create a complete GanttProject deb package. Everything included.</description>
<desktopEntry
toFile="${distDebWork}/usr/share/applications/ganttproject.desktop"
name="GanttProject"
icon="/usr/share/icons/gnome/scalable/mimetypes/application-x-ganttproject.svg"
exec="/usr/bin/ganttproject %U"
mimetype="application/x-ganttproject;"
categories="Office;"
onlyshowin="GNOME;KDE;Unity;LXDE;MATE;Cinnamon;"
>
<genericname value="GanttProject"/>
</desktopEntry>
<copy file="ganttproject.svg" tofile="${distDebWork}/usr/share/icons/gnome/scalable/mimetypes/application-x-ganttproject.svg">
</copy>
<!-- Some docs go into /usr/share/doc/ganttproject -->
<mkdir dir="${distDebWork}/usr/share/doc/${package.name}"/>
<copy todir="${distDebWork}/usr/share/doc/${package.name}">
<fileset dir=".">
<include name="LICENSE"/>
<include name="README"/>
<include name="AUTHORS"/>
</fileset>
</copy>
<deb todir="${distDebPackage}"
package="${package.name}"
version="${version}"
homepage="https://www.ganttproject.biz/"
section="editors"
priority="optional"
depends="openjdk-7-jre | openjdk-8-jre | openjdk-9-jre | openjdk-10-jre | openjdk-11-jre | openjdk-7-jdk | openjdk-8-jdk | openjdk-9-jdk | openjdk-10-jdk | openjdk-11-jdk | oracle-java7-jre | oracle-java8-jre | oracle-java9-jre | oracle-java7-jdk | oracle-java8-jdk | oracle-java9-jdk | java7-runtime | java8-runtime | java9-runtime | java10-runtime | java11-runtime"
conflicts="ganttproject-praha"
replaces="ganttproject-praha"
postrm="${distDebWork}/postrm"
postinst="${distDebWork}/postinst">
<version upstream="${version}"/>
<maintainer name="GanttProject Team" email="contact@ganttproject.biz"/>
<description synopsis="${package.synopsis}">
${package.description}
</description>
<!-- GanttProject distro goes into /usr/share/ganttproject -->
<tarfileset dir="${distBin}" prefix="usr/share/${package.name}">
<include name="plugins/**/"/>
<include name="*.jar"/>
<include name="*.gan"/>
<include name="logging.properties"/>
</tarfileset>
<tarfileset dir="${distBin}" filemode="755" prefix="usr/share/${package.name}">
<include name="ganttproject"/>
</tarfileset>
<!-- Icons, mime types, docs and other stuff -->
<tarfileset dir="${distDebWork}/usr" prefix="usr"/>
</deb>
<rename src="${distDebPackage}/${package.name}_${version}-1_all.deb"
dest="${distDebPackage}/${package.name}_${version_build}-1_all.deb"/>
</target>
</project>