/[packages]/cauldron/mx4j/current/SPECS/mx4j.spec
ViewVC logotype

Contents of /cauldron/mx4j/current/SPECS/mx4j.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 35972 - (show annotations) (download)
Mon Jan 24 02:14:04 2011 UTC (14 years, 3 months ago) by dmorgan
File size: 8732 byte(s)
Fix bootstrap
1 # Copyright (c) 2000-2005, JPackage Project
2 # All rights reserved.
3 #
4 # Redistribution and use in source and binary forms, with or without
5 # modification, are permitted provided that the following conditions
6 # are met:
7 #
8 # 1. Redistributions of source code must retain the above copyright
9 # notice, this list of conditions and the following disclaimer.
10 # 2. Redistributions in binary form must reproduce the above copyright
11 # notice, this list of conditions and the following disclaimer in the
12 # documentation and/or other materials provided with the
13 # distribution.
14 # 3. Neither the name of the JPackage Project nor the names of its
15 # contributors may be used to endorse or promote products derived
16 # from this software without specific prior written permission.
17 #
18 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 #
30
31 %define with_tests 0
32 %define bootstrap 1
33
34 Name: mx4j
35 Version: 3.0.1
36 Release: %mkrel 1
37 Epoch: 1
38 Summary: Open source implementation of JMX Java API
39 License: ASL 1.1
40 Group: Development/Java
41 Source0: %{name}-%{version}-src.tar.gz
42 Source1: %{name}-build.policy
43 Source2: CatalogManager.properties
44 Patch0: mx4j-javaxssl.patch
45 Patch1: mx4j-%{version}.patch
46 Patch2: mx4j-build.patch
47 Patch3: mx4j-docbook.patch
48 #Patch4: mx4j-no-poa.patch
49 Patch5: mx4j-caucho-build.patch
50 Patch6: mx4j-no-iiop.patch
51 URL: http://mx4j.sourceforge.net/
52 BuildRequires: jpackage-utils > 0:1.6
53 BuildRequires: ant >= 0:1.6
54 BuildRequires: ant-nodeps
55 BuildRequires: ant-apache-resolver
56 BuildRequires: javamail >= 0:1.2-5jpp
57 BuildRequires: log4j >= 0:1.2.7
58 %if %bootstrap
59 BuildRequires: jakarta-commons-logging
60 %else
61 BuildRequires: apache-commons-logging >= 0:1.0.1
62 BuildRequires: apache-commons-discovery
63 %endif
64 BuildRequires: xml-commons-apis
65 BuildRequires: bcel >= 0:5.0
66 BuildRequires: jsse >= 0:1.0.2-6jpp
67 BuildRequires: jce >= 0:1.2.2
68 BuildRequires: coreutils
69 BuildRequires: xjavadoc
70 BuildRequires: xdoclet
71 %if %bootstrap
72 BuildRequires: axis14
73 %else
74 BuildRequires: axis >= 0:1.1
75 %endif
76 BuildRequires: wsdl4j
77 BuildRequires: docbook-dtds >= 0:1.0
78 BuildRequires: docbook-style-xsl >= 0:1.61
79 BuildRequires: xml-commons-resolver
80 BuildRequires: xml-commons
81 BuildRequires: xerces-j2
82 BuildRequires: dos2unix
83 %if %{with_tests}
84 BuildRequires: ant-junit
85 BuildRequires: burlap >= 3.0.8
86 BuildRequires: caucho-services
87 BuildRequires: hessian >= 3.0.8
88 BuildRequires: junit >= 0:3.7.1
89 BuildRequires: xmlunit
90 %endif
91 Buildarch: noarch
92 Requires(pre): /bin/rm
93 Requires(post): %{_sbindir}/update-alternatives
94 Requires(postun): %{_sbindir}/update-alternatives
95 Requires: javamail >= 0:1.2-5jpp
96 Requires: log4j >= 0:1.2.7
97 %if %bootstrap
98 Requires: jakarta-commons-logging
99 %else
100 Requires: apache-commons-logging >= 0:1.0.1
101 %endif
102 Requires: xml-commons-apis
103 Requires: bcel >= 0:5.0
104 Requires: jsse >= 0:1.0.2-6jpp
105 Requires: jce >= 0:1.2.2
106 Requires: axis >= 0:1.1
107 Requires: xml-commons-resolver
108 Requires: xml-commons
109 BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
110
111 %description
112 OpenJMX is an open source implementation of the
113 Java(TM) Management Extensions (JMX).
114
115 %package javadoc
116 Group: Development/Java
117 Summary: Javadoc for %{name}
118
119 %description javadoc
120 Javadoc for %{name}.
121
122 %package manual
123 Group: Development/Java
124 Summary: Documentation for %{name}
125
126 %description manual
127 Documentation for %{name}.
128
129 %prep
130 %setup -q
131
132 # FIXME To enable iiop when rmic becomes available
133 # turn off patch6 and turn on patch4
134 # Patch4 is a backport of upstream changes (MX4J) and may go
135 # away on future releases
136 %patch0 -p1
137 %patch1 -p0
138 %patch2 -b .sav
139 %patch3 -p1
140 #%patch4 -p0
141 %patch5 -p1
142 %patch6 -p1
143
144 cp %{SOURCE1} build
145 cp %{_sourcedir}/CatalogManager.properties %{_builddir}/%{name}-%{version}/build/
146
147 pushd lib
148 %if %{with_tests}
149 ln -sf $(build-classpath junit) .
150 ln -sf $(build-classpath xmlunit) .
151 ln -sf $(build-classpath burlap) .
152 ln -sf $(build-classpath caucho-services) .
153 ln -sf $(build-classpath hessian) .
154 %endif
155 ln -sf $(build-classpath xml-commons-apis) xml-apis.jar
156 ln -sf $(build-classpath xerces-j2) xercesImpl.jar
157 ln -sf $(build-classpath xalan-j2) xalan.jar
158 ln -sf $(build-classpath commons-logging) .
159 ln -sf $(build-classpath log4j) .
160 ln -sf $(build-classpath bcel) .
161 %if %bootstrap
162 ln -sf $(build-classpath axis14/axis) .
163 ln -sf $(build-classpath axis14/jaxrpc) .
164 ln -sf $(build-classpath axis14/saaj) .
165 %else
166 ln -sf $(build-classpath axis/axis) .
167 ln -sf $(build-classpath axis/jaxrpc) .
168 ln -sf $(build-classpath axis/saaj) .
169 %endif
170 ln -sf $(build-classpath wsdl4j) .
171 ln -sf $(build-classpath commons-discovery) .
172 ln -sf $(build-classpath servlet25) servlet.jar
173 # ln -sf $(build-classpath jython) .
174 ln -sf $(build-classpath jsse) .
175 ln -sf $(build-classpath jsse/jcert) jcert.jar
176 ln -sf $(build-classpath jsse/jnet) jnet.jar
177 ln -sf $(build-classpath jaas) .
178 ln -sf $(build-classpath javamail/mail) .
179 ln -sf $(build-classpath xml-commons-resolver) .
180 ln -sf $(build-classpath xdoclet/xdoclet) .
181 ln -sf $(build-classpath xdoclet/xdoclet-jmx-module) .
182 ln -sf $(build-classpath xdoclet/xdoclet-mx4j-module) .
183 popd
184
185 %build
186
187 export OPT_JAR_LIST="ant/ant-junit junit xmlunit ant/ant-nodeps jaxp_transform_impl ant/ant-apache-resolver xml-commons-resolver xalan-j2-serializer"
188
189 cd build
190 %if %{with_tests}
191 ant -Dbuild.sysclasspath=first compile.jmx compile.rjmx compile.tools tests-report javadocs docs
192 %else
193 ant -Dbuild.sysclasspath=first compile.jmx compile.rjmx compile.tools javadocs docs
194 %endif
195
196 %install
197 rm -rf $RPM_BUILD_ROOT
198 install -d -m 755 $RPM_BUILD_ROOT%{_javadir}/%{name}
199 install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/%{name}
200 install -m 644 dist/lib/%{name}-impl.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/%{name}-impl-%{version}.jar
201 install -m 644 dist/lib/%{name}-jmx.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/%{name}-jmx-%{version}.jar
202 install -m 644 dist/lib/%{name}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/%{name}-%{version}.jar
203 install -m 644 dist/lib/%{name}-tools.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/%{name}-tools-%{version}.jar
204 install -m 644 dist/lib/%{name}-rjmx.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/%{name}-rjmx-%{version}.jar
205 install -m 644 dist/lib/%{name}-rimpl.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/%{name}-rimpl-%{version}.jar
206 install -m 644 dist/lib/%{name}-remote.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/%{name}-remote-%{version}.jar
207 install -d -m 755 $RPM_BUILD_ROOT%{_javadir}/%{name}/boa
208 install -m 644 dist/lib/boa/%{name}-rjmx-boa.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/boa/%{name}-rjmx-boa-%{version}.jar
209 install -m 644 dist/lib/boa/%{name}-rimpl-boa.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/boa/%{name}-rimpl-boa-%{version}.jar
210 install -m 644 dist/lib/boa/%{name}-remote-boa.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/boa/%{name}-remote-boa-%{version}.jar
211
212 pushd $RPM_BUILD_ROOT%{_javadir}/%{name}
213 for jar in *-%{version}.jar ; do
214 ln -fs ${jar} $(echo $jar | sed "s|-%{version}.jar|.jar|g")
215 done
216 popd
217
218 install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
219 dos2unix dist/docs/styles.css README.txt LICENSE.txt
220 cp -r dist/docs/api/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
221 ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}
222
223 %clean
224 rm -rf $RPM_BUILD_ROOT
225
226 %pre
227 rm -f %{_javadir}/%{name}.jar
228
229 %post
230 %{_sbindir}/update-alternatives --install %{_javadir}/jmxri.jar jmxri %{_javadir}/%{name}/%{name}-jmx.jar 0
231
232 %postun
233 if [ "$1" = "0" ]; then
234 %{_sbindir}/update-alternatives --remove jmxri %{_javadir}/%{name}/%{name}-jmx.jar
235 fi
236
237 %files
238 %defattr(-,root,root,-)
239 %{_javadir}/%{name}
240 %doc LICENSE.txt
241 %doc README.txt
242
243 %files javadoc
244 %defattr(-,root,root,-)
245 %{_javadocdir}/%{name}-%{version}
246 %{_javadocdir}/%{name}
247
248 %files manual
249 %defattr(-,root,root,-)
250 %doc dist/docs/*
251

  ViewVC Help
Powered by ViewVC 1.1.30