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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 28455 - (show annotations) (download)
Fri Jan 21 09:16:37 2011 UTC (13 years, 3 months ago) by dmorgan
File size: 4809 byte(s)
imported package adaptx
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_gcj_support 1
32
33 %define gcj_support %{?_with_gcj_support:1}%{!?_with_gcj_support:%{?_without_gcj_support:0}%{!?_without_gcj_support:%{?_gcj_support:%{_gcj_support}}%{!?_gcj_support:0}}}
34
35 Name: adaptx
36 Version: 0.9.13
37 Release: %mkrel 4.1.7
38 Summary: AdaptX XSLT processor and XPath engine
39 License: BSD
40 Group: Development/Java
41 # svn export http://svn.codehaus.org/castor/adaptx/tags/0.9.13/ adaptx-0.9.13-src
42 # tar cjf adaptx-0.9.13-src.tar.bz2 adaptx-0.9.13-src
43 Source0: %{name}-%{version}-src.tar.bz2
44
45 Patch0: %{name}-%{version}-xsl.patch
46 Patch1: %{name}-%{version}-missingstubs.patch
47 Url: http://castor.codehaus.org/
48 BuildRequires: ant >= 0:1.6
49 BuildRequires: java-rpmbuild >= 0:1.6
50 BuildRequires: log4j
51 BuildRequires: xml-commons-jaxp-1.3-apis
52 BuildRequires: xerces-j2
53 Requires: log4j
54 Requires: xml-commons-jaxp-1.3-apis
55 Requires: xerces-j2
56 Requires(pre): jpackage-utils
57 Requires(postun): jpackage-utils
58 %if ! %{gcj_support}
59 BuildArch: noarch
60 %endif
61 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
62
63 %if %{gcj_support}
64 BuildRequires: java-gcj-compat-devel
65 %endif
66
67 %description
68 Adaptx is an XSLT processor and XPath engine.
69
70 %package javadoc
71 Group: Development/Java
72 Summary: Javadoc for %{name}
73 Requires(post): /bin/rm,/bin/ln
74 Requires(postun): /bin/rm
75
76 %description javadoc
77 Javadoc for %{name}.
78
79 %package doc
80 Summary: Documentation for %{name}
81 Group: Development/Java
82
83 %description doc
84 Documentation for %{name}.
85
86 %prep
87 %setup -q -n %{name}-%{version}-src
88 # remove CVS internal files
89 for dir in `find . -type d -name CVS`; do rm -rf $dir; done
90 # remove all binary libs
91 for j in $(find . -name "*.jar"); do
92 %{__rm} $j
93 done
94
95 %patch0
96 %patch1
97
98 # (walluck): fix javadoc parsing
99 for file in `%{__grep} -rl 'enum[\\. ]' *`; do
100 %{__perl} -pi -e 's/enum/en/g' $file
101 done
102
103 %build
104 perl -p -i -e 's|classic|modern|' src/build.xml
105 export CLASSPATH=$(build-classpath xml-commons-jaxp-1.3-apis log4j xerces-j2)
106 %{ant} -buildfile src/build.xml jar javadoc
107 CLASSPATH=$CLASSPATH:dist/adaptx_%{version}.jar
108 %{ant} -buildfile src/build.xml doc
109
110 %install
111 rm -rf $RPM_BUILD_ROOT
112
113 # jar
114 install -d -m 755 $RPM_BUILD_ROOT%{_javadir}
115 install -m 644 dist/%{name}_%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
116 (cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}.jar; do ln -sf ${jar} ${jar/-%{version}/}; done)
117 # javadoc
118 install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
119 cp -pr build/doc/javadoc/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
120 (cd %{buildroot}%{_javadocdir} && %{__ln_s} %{name}-%{version} %{name})
121 rm -rf build/doc/javadoc
122
123 %if %{gcj_support}
124 %{_bindir}/aot-compile-rpm
125 %endif
126
127 %clean
128 rm -rf $RPM_BUILD_ROOT
129
130 %if %{gcj_support}
131 %post
132 %{update_gcjdb}
133
134 %postun
135 %{clean_gcjdb}
136 %endif
137
138 %files
139 %defattr(0664,root,root,0755)
140 %doc src/etc/{CHANGELOG,contributors.html,LICENSE}
141 %{_javadir}/*
142
143 %if %{gcj_support}
144 %dir %{_libdir}/gcj/%{name}
145 %attr(-,root,root) %{_libdir}/gcj/%{name}/*
146 %endif
147
148 %files javadoc
149 %defattr(0664,root,root,0755)
150 %{_javadocdir}/%{name}-%{version}
151 %dir %{_javadocdir}/%{name}
152
153 %files doc
154 %defattr(0664,root,root,0755)
155 %doc build/doc/*
156
157

  ViewVC Help
Powered by ViewVC 1.1.30