-
Notifications
You must be signed in to change notification settings - Fork 68
/
package.xml
157 lines (131 loc) · 5 KB
/
package.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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
Mibble MIB Parser (www.mibble.org)
See LICENSE.txt for licensing information.
Copyright (c) 2004-2017 Per Cederberg. All rights reserved.
-->
<project name="mibble" default="all">
<!--
BUILD INSTRUCTIONS
This is an Ant build file for packaging Mibble. You can use it to
package the different distributions of Mibble. Note that this build
file will overwrite content in the current directory as a result of
the build process.
To run Ant, choose one (or more) of the targets under the TOP-LEVEL
TARGETS heading below. If you run Ant without any target specified
it will build and package all distributions.
The following build properties are available (specify on the
command-line with -Dname=value):
build.version
The build version number. Defaults to todays date.
build.type
The build type name. Set to "all" to run the complete build
with tests. By default this value is set to "minimal" which
avoids testing.
-->
<!-- INITIALIZATION -->
<tstamp />
<property name="build.version" value="${DSTAMP}" />
<property name="build.type" value="minimal" />
<!-- TOP-LEVEL TARGETS -->
<target name="all" description="Builds both the public and commercial packages"
depends="commercial,public" />
<target name="commercial" description="Builds only the commercial package"
depends="package-clean,package-commercial" />
<target name="public" description="Builds only the public package"
depends="package-clean,package-public" />
<!-- PACKAGING TARGETS -->
<target name="package-clean">
<delete>
<fileset dir="." includes="mibble-*.tar.gz" />
</delete>
</target>
<target name="package-commercial">
<copy file="LICENSE-COMMERCIAL.txt"
tofile="LICENSE.txt"
overwrite="true" />
<ant antfile="build.xml" target="${build.type}">
<property name="build.name" value="mibble-commercial" />
</ant>
<tar tarfile="mibble-commercial-${build.version}.tar.gz"
longfile="gnu"
compression="gzip">
<tarfileset dir="."
prefix="mibble-commercial-${build.version}">
<include name="README.txt" />
<include name="LICENSE.txt" />
<include name="build.xml" />
<include name="bin/*.bat" />
<include name="MibbleBrowser.jar" />
<include name="lib/mibble-*.jar" />
<include name="lib/grammatica-*.jar" />
<include name="lib/snmp*.jar" />
<include name="src/**" />
<include name="doc/**" />
</tarfileset>
<tarfileset dir="."
prefix="mibble-commercial-${build.version}"
mode="777"
includes="bin/*.sh" />
</tar>
<delete file="LICENSE.txt" />
</target>
<target name="package-public">
<copy file="LICENSE-GPL.txt"
tofile="LICENSE.txt"
overwrite="true" />
<ant antfile="build.xml" target="${build.type}">
<property name="build.name" value="mibble" />
</ant>
<tar tarfile="mibble-${build.version}.tar.gz"
longfile="gnu"
compression="gzip">
<tarfileset dir="."
prefix="mibble-${build.version}">
<include name="README.txt" />
<include name="LICENSE.txt" />
<include name="build.xml" />
<include name="bin/*.bat" />
<include name="MibbleBrowser.jar" />
<include name="lib/mibble-*.jar" />
<include name="lib/grammatica-*.jar" />
<include name="lib/snmp*.jar" />
<include name="src/**" />
<include name="doc/**" />
</tarfileset>
<tarfileset dir="."
prefix="mibble-${build.version}"
mode="777"
includes="bin/*.sh" />
</tar>
<delete file="LICENSE.txt" />
</target>
<!-- TOOLING & HELPER TARGETS -->
<target name="util-copyright" description="Updates copyright years in sources">
<replaceregexp match="(20\d\d)-20\d\d" replace="\1-2017" flags="g" byline="true">
<fileset dir="." includes="*.gradle" />
<fileset dir="." includes="*.md" />
<fileset dir="." includes="*.txt" />
<fileset dir="." includes="*.xml" />
<fileset dir="src/java" includes="**/*.java" />
<fileset dir="src/grammar" includes="**/*.grammar" />
</replaceregexp>
</target>
<target name="util-download-mibs" description="Downloads MIB files from libsmi">
<exec executable="svn">
<arg line="checkout http://svn.ibr.cs.tu-bs.de/software-ibr-1999-libsmi/trunk tmp" />
</exec>
<replaceregexp match="\s+$" replace="" flags="g" byline="true">
<fileset dir="tmp/mibs" includes="**/*" />
</replaceregexp>
<fixcrlf srcDir="tmp/mibs" tab="remove" />
<copy todir="src/mibs" overwrite="true" force="true" verbose="true">
<fileset dir="tmp/mibs">
<include name="iana/*" />
<include name="ietf/*" />
<exclude name="**/Makefile*" />
</fileset>
</copy>
<delete dir="tmp" quiet="true" />
</target>
</project>