-
Notifications
You must be signed in to change notification settings - Fork 4
/
deb.xml
103 lines (99 loc) · 4.75 KB
/
deb.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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<project name="deb" xmlns:antcontrib="antlib:net.sf.antcontrib" basedir=".">
<macrodef name="deb-create">
<attribute name="todir" />
<attribute name="package"/>
<attribute name="version" default=""/>
<attribute name="distribution" default="release"/>
<attribute name="section"/>
<attribute name="priority" default="extra"/>
<attribute name="arch" default="all"/>
<attribute name="depends" default=""/>
<attribute name="maintainer" default=""/>
<attribute name="description"/>
<attribute name="debname" default="@{package}_@{version}-1_@{arch}.deb"/>
<attribute name="key" default=""/>
<attribute name="passphrase" default=""/>
<attribute name="keyring" default=""/>
<attribute name="n" default="${line.separator}"/>
<element name="tarfilesets" implicit="true"/>
<sequential>
<delete dir="${temp.dir}/deb"/>
<mkdir dir="${temp.dir}/deb/debian"/>
<tstamp><format property="debchangedate" pattern="EEE, dd MMM yyyy HH:mm:ss Z" locale="en,GB"/></tstamp>
<!-- <echo file="${temp.dir}/deb/debian/changelog" message="@{package} (@{version}) distribution(s); urgency=urgency
* change details
-‐ maintainer @{maintainer} ${debchangedate}" />
-->
<echo file="${temp.dir}/deb/debian/changelog" message=" * changes for the next release
@{distribution} date=${debchangedate}, version=@{version}, urgency=low, by=@{maintainer}
release distribution=production
* change1
* change2
" />
<echo file="${temp.dir}/deb/debian/control"
message="Package: @{package}@{n}Distribution: @{distribution}@{n}Version: @{version}@{n}Section: @{section}@{n}Priority: @{priority}@{n}Architecture: @{arch}@{n}Depends: @{depends}@{n}Maintainer: @{maintainer}@{n}Description: @{description}@{n}"/>
<jdeb destfile="@{todir}/@{debname}" control="${temp.dir}/deb/debian" verbose="true"
key="@{key}" keyring="@{keyring}" passphrase="@{passphrase}">
<tarfilesets />
</jdeb>
</sequential>
</macrodef>
<macrodef name="jdeb">
<attribute name="destfile"/>
<attribute name="control"/>
<attribute name="key" default=""/>
<attribute name="passphrase" default=""/>
<attribute name="keyring" default=""/>
<attribute name="verbose" default="false"/>
<attribute name="changesIn" default="@{control}/changelog"/>
<attribute name="changesSave" default="@{control}/changelog2"/>
<element name="tarfilesets" implicit="true"/>
<sequential>
<taskdef-dependency name="jdeb" classname="org.vafer.jdeb.ant.DebAntTask" groupId="org.vafer" artifactId="jdeb" version="1.3" dest="${cfdistro.lib.dir}/jdeb">
<exclusions>
<exclusion groupId="commons-io" artifactId="commons-io"/>
<exclusion groupId="org.apache.commons" artifactId="commons-compress"/>
<exclusion groupId="org.apache.maven" artifactId="maven-core"/>
<exclusion groupId="org.apache.maven" artifactId="maven-plugin-api"/>
<exclusion groupId="org.apache.ant" artifactId="ant"/>
<exclusion groupId="org.bouncycastle" artifactId="bcpg-jdk15on"/>
</exclusions>
</taskdef-dependency>
<antcontrib:if>
<equals arg1="@{keyring}" arg2=""/>
<then><antcontrib:var name="jdeb.signPackage" value="false"/></then>
<else><antcontrib:var name="jdeb.signPackage" value="true"/></else>
</antcontrib:if>
<echo message="@{changesIn} ********** " />
<echo message="@{changesSave}" />
<jdeb destfile="@{destfile}" control="@{control}" verbose="@{verbose}"
changesIn="@{changesIn}" changesSave="@{changesSave}"
key="@{key}" keyring="@{keyring}" passphrase="@{passphrase}">
<tarfilesets />
</jdeb>
</sequential>
</macrodef>
<macrodef name="deb-repo">
<attribute name="dir" default="/opt/repo/debs/" />
<attribute name="key" default=""/>
<attribute name="passphrase" default=""/>
<attribute name="keyring" default=""/>
<attribute name="verbose" default="false"/>
<attribute name="origin" default=""/>
<attribute name="label" default=""/>
<attribute name="suite" default=""/>
<attribute name="version" default=""/>
<attribute name="codename" default=""/>
<attribute name="architectures" default=""/>
<attribute name="components" default=""/>
<attribute name="description" default=""/>
<attribute name="confline" default="deb http://${server.host}:${server.port.http}/artifacts/debs/noarch /"/>
<sequential>
<taskdef-dependency name="debrepo" classname="debrepo.ant.DebRepoTask" artifactId="debrepo" groupId="org.cfmlprojects" version="1.0.0" />
<debrepo repoDir="@{dir}" verbose="@{verbose}" key="@{key}" passphrase="@{passphrase}" keyring="@{keyring}"
origin="@{origin}" label="@{label}" suite="@{suite}" version="@{version}" codename="@{codename}"
architectures="@{architectures}" components="@{components}" description="@{description}"/>
<echo file="@{dir}/@{label}.list" message="@{confline}" />
</sequential>
</macrodef>
</project>