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 section free |
32 |
%define gcj_support 1 |
33 |
|
34 |
Summary: JSF Implementation |
35 |
Name: myfaces |
36 |
Version: 1.1.0 |
37 |
Release: %mkrel 3.4.5 |
38 |
Epoch: 0 |
39 |
License: Apache License |
40 |
URL: http://myfaces.apache.org/ |
41 |
Group: Development/Java |
42 |
#Vendor: JPackage Project |
43 |
#Distribution: JPackage |
44 |
Source0: myfaces-1.1.0-src.tar.bz2 |
45 |
# svn export https://svn.apache.org/repos/asf/myfaces/release/tags/1_1_0 |
46 |
|
47 |
Patch0: myfaces-1.1.0-build_xml.patch |
48 |
BuildRequires: ant >= 0:1.6, ant-junit >= 0:1.6, ant-trax >= 0:1.6, xalan-j2, java-rpmbuild >= 0:1.5 |
49 |
BuildRequires: junit |
50 |
#BuildRequires: asm |
51 |
#BuildRequires: cglib |
52 |
BuildRequires: jakarta-commons-beanutils |
53 |
BuildRequires: jakarta-commons-codec |
54 |
BuildRequires: jakarta-commons-collections |
55 |
BuildRequires: jakarta-commons-digester |
56 |
BuildRequires: jakarta-commons-el |
57 |
BuildRequires: jakarta-commons-fileupload |
58 |
BuildRequires: jakarta-commons-logging |
59 |
BuildRequires: jakarta-commons-validator |
60 |
BuildRequires: jsp |
61 |
#BuildRequires: easymock-classextension |
62 |
#BuildRequires: easymock |
63 |
BuildRequires: oro |
64 |
BuildRequires: jakarta-taglibs-standard |
65 |
BuildRequires: portlet-1.0-api |
66 |
BuildRequires: servletapi5 |
67 |
BuildRequires: struts |
68 |
#BuildRequires: tlddoc |
69 |
BuildRequires: xdoclet |
70 |
BuildRequires: xjavadoc |
71 |
BuildRequires: xml-commons-jaxp-1.3-apis |
72 |
Requires: jakarta-commons-beanutils |
73 |
Requires: jakarta-commons-codec |
74 |
Requires: jakarta-commons-collections |
75 |
Requires: jakarta-commons-digester |
76 |
Requires: jakarta-commons-el |
77 |
Requires: jakarta-commons-fileupload |
78 |
Requires: jakarta-commons-logging |
79 |
Requires: jakarta-commons-validator |
80 |
Requires: jsp |
81 |
Requires: portlet-1.0-api |
82 |
Requires: servletapi5 |
83 |
Requires: struts |
84 |
Requires: xml-commons-jaxp-1.3-apis |
85 |
%if %{gcj_support} |
86 |
BuildRequires: java-gcj-compat-devel |
87 |
%else |
88 |
BuildArch: noarch |
89 |
%endif |
90 |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot |
91 |
|
92 |
%description |
93 |
JavaServer(tm) Faces is a new and upcoming web application framework |
94 |
that accomplishes the MVC paradigm. It is comparable to the |
95 |
well-known Struts Framework but has features and concepts that |
96 |
are beyond those of Struts; especially the component orientation. |
97 |
Look at Sun's JavaServer(tm) Page to learn more about the Java |
98 |
Specification Request 127 and to download the specification. |
99 |
|
100 |
%package javadoc |
101 |
Summary: Javadoc for %{name} |
102 |
Group: Development/Java |
103 |
|
104 |
%description javadoc |
105 |
%{summary}. |
106 |
|
107 |
%package demo |
108 |
Summary: Samples for %{name} |
109 |
Group: Development/Java |
110 |
|
111 |
%description demo |
112 |
%{summary}. |
113 |
|
114 |
%prep |
115 |
%setup -q -n %{name}-%{version}-src |
116 |
%patch0 -b .sav |
117 |
%{__perl} -pi -e 's/<xslt/<style processor="trax"/g' `find . -type f -name build.xml` |
118 |
%{__perl} -pi -e 's|/xslt|/style|g' `find . -type f -name build.xml` |
119 |
|
120 |
%build |
121 |
mkdir -p build/dist/temp |
122 |
mkdir lib |
123 |
pushd lib |
124 |
#ln -sf $(build-classpath asm/asm) . |
125 |
#ln -sf $(build-classpath cglib) . |
126 |
ln -sf $(build-classpath commons-beanutils) . |
127 |
ln -sf $(build-classpath commons-codec) . |
128 |
ln -sf $(build-classpath commons-collections) . |
129 |
ln -sf $(build-classpath commons-digester) . |
130 |
ln -sf $(build-classpath commons-el) . |
131 |
ln -sf $(build-classpath commons-fileupload) . |
132 |
ln -sf $(build-classpath commons-logging) . |
133 |
ln -sf $(build-classpath commons-validator) . |
134 |
#ln -sf $(build-classpath easymock-classextension) . |
135 |
#ln -sf $(build-classpath easymock) . |
136 |
ln -sf $(build-classpath oro) jakarta-oro.jar |
137 |
ln -sf $(build-classpath jsp) jsp.jar |
138 |
ln -sf $(build-classpath taglibs-core) jstl.jar |
139 |
ln -sf $(build-classpath junit) . |
140 |
ln -sf $(build-classpath portlet-1.0-api) portlet-api.jar |
141 |
ln -sf $(build-classpath servletapi5) servlet-api.jar |
142 |
ln -sf $(build-classpath struts) . |
143 |
#ln -sf $(build-classpath tlddoc) . |
144 |
ln -sf $(build-classpath xdoclet/xdoclet) . |
145 |
ln -sf $(build-classpath xjavadoc) . |
146 |
popd |
147 |
|
148 |
cd build |
149 |
export OPT_JAR_LIST=: |
150 |
export CLASSPATH=$(build-classpath ant/ant-trax xalan-j2 xalan-j2-serializer) |
151 |
%{ant} -Dskip.sandbox=true dist-all |
152 |
|
153 |
%install |
154 |
rm -rf $RPM_BUILD_ROOT |
155 |
|
156 |
# jars |
157 |
mkdir -p $RPM_BUILD_ROOT%{_javadir}/%{name} |
158 |
|
159 |
cp -p api/build/dist/%{name}-api.jar \ |
160 |
$RPM_BUILD_ROOT%{_javadir}/%{name}/%{name}-jsf-api-%{version}.jar |
161 |
cp -p build/dist/%{name}-all.jar \ |
162 |
$RPM_BUILD_ROOT%{_javadir}/%{name}/%{name}-all-%{version}.jar |
163 |
cp -p impl/build/dist/%{name}-impl.jar \ |
164 |
$RPM_BUILD_ROOT%{_javadir}/%{name}/%{name}-impl-%{version}.jar |
165 |
cp -p tomahawk/build/dist/tomahawk.jar \ |
166 |
$RPM_BUILD_ROOT%{_javadir}/%{name}/tomahawk-%{version}.jar |
167 |
(cd $RPM_BUILD_ROOT%{_javadir}/%{name} && for jar in *-%{version}.jar; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done) |
168 |
|
169 |
# javadoc |
170 |
mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}/api |
171 |
mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}/impl |
172 |
mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}/tomahawk |
173 |
cp -pr api/build/temp/javadoc/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}/api |
174 |
cp -pr impl/build/temp/javadoc/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}/impl |
175 |
cp -pr tomahawk/build/temp/javadoc/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}/tomahawk |
176 |
ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name} |
177 |
|
178 |
# manual |
179 |
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} |
180 |
cp -p api/build/LICENSE.txt $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} |
181 |
|
182 |
# demo |
183 |
mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}-%{version} |
184 |
cp -pr examples/* $RPM_BUILD_ROOT%{_datadir}/%{name}-%{version} |
185 |
rm -rf $RPM_BUILD_ROOT%{_datadir}/%{name}-%{version}/{build,temp} |
186 |
|
187 |
%if %{gcj_support} |
188 |
%{_bindir}/aot-compile-rpm |
189 |
%endif |
190 |
|
191 |
%clean |
192 |
rm -rf $RPM_BUILD_ROOT |
193 |
|
194 |
%if %{gcj_support} |
195 |
%post |
196 |
%{update_gcjdb} |
197 |
|
198 |
%postun |
199 |
%{clean_gcjdb} |
200 |
%endif |
201 |
|
202 |
%files |
203 |
%defattr(0644,root,root,0755) |
204 |
%{_docdir}/%{name}-%{version}/LICENSE.txt |
205 |
%{_javadir}/%{name}/*.jar |
206 |
%if %{gcj_support} |
207 |
%dir %{_libdir}/gcj/%{name} |
208 |
%{_libdir}/gcj/%{name}/*.jar.* |
209 |
%endif |
210 |
|
211 |
%files javadoc |
212 |
%defattr(0644,root,root,0755) |
213 |
%{_javadocdir}/%{name}-%{version} |
214 |
%{_javadocdir}/%{name} |
215 |
|
216 |
%files demo |
217 |
%defattr(0644,root,root,0755) |
218 |
%{_datadir}/%{name}-%{version} |
219 |
|
220 |
|