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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 665567 - (show annotations) (download)
Tue Aug 19 11:57:45 2014 UTC (9 years, 8 months ago) by luigiwalser
File size: 4545 byte(s)
- remove old java stuff due to gcj retirement
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 9
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
62 %if %{gcj_support}
63 BuildRequires: java-gcj-compat-devel
64 %endif
65
66 %description
67 Adaptx is an XSLT processor and XPath engine.
68
69 %package javadoc
70 Group: Development/Java
71 Summary: Javadoc for %{name}
72
73 %description javadoc
74 Javadoc for %{name}.
75
76 %package doc
77 Summary: Documentation for %{name}
78 Group: Development/Java
79
80 %description doc
81 Documentation for %{name}.
82
83 %prep
84 %setup -q -n %{name}-%{version}-src
85 # remove CVS internal files
86 for dir in `find . -type d -name CVS`; do rm -rf $dir; done
87 # remove all binary libs
88 for j in $(find . -name "*.jar"); do
89 %{__rm} $j
90 done
91
92 %patch0
93 %patch1
94
95 # (walluck): fix javadoc parsing
96 for file in `%{__grep} -rl 'enum[\\. ]' *`; do
97 %{__perl} -pi -e 's/enum/en/g' $file
98 done
99
100 %build
101 perl -p -i -e 's|classic|modern|' src/build.xml
102 export CLASSPATH=$(build-classpath xml-commons-jaxp-1.3-apis log4j xerces-j2)
103 %{ant} -buildfile src/build.xml jar javadoc
104 CLASSPATH=$CLASSPATH:dist/adaptx_%{version}.jar
105 %{ant} -buildfile src/build.xml doc
106
107 %install
108 # jar
109 install -d -m 755 %{buildroot}%{_javadir}
110 install -m 644 dist/%{name}_%{version}.jar %{buildroot}%{_javadir}/%{name}-%{version}.jar
111 (cd %{buildroot}%{_javadir} && for jar in *-%{version}.jar; do ln -sf ${jar} ${jar/-%{version}/}; done)
112 # javadoc
113 install -d -m 755 %{buildroot}%{_javadocdir}/%{name}-%{version}
114 cp -pr build/doc/javadoc/* %{buildroot}%{_javadocdir}/%{name}-%{version}
115 (cd %{buildroot}%{_javadocdir} && %{__ln_s} %{name}-%{version} %{name})
116 rm -rf build/doc/javadoc
117
118 %if %{gcj_support}
119 %{_bindir}/aot-compile-rpm
120 %endif
121
122 %clean
123 rm -rf %{buildroot}
124
125 %if %{gcj_support}
126 %post
127 %{update_gcjdb}
128
129 %postun
130 %{clean_gcjdb}
131 %endif
132
133 %files
134 %doc src/etc/{CHANGELOG,contributors.html,LICENSE}
135 %{_javadir}/*
136
137 %if %{gcj_support}
138 %dir %{_libdir}/gcj/%{name}
139 %attr(-,root,root) %{_libdir}/gcj/%{name}/*
140 %endif
141
142 %files javadoc
143 %{_javadocdir}/%{name}-%{version}
144 %{_javadocdir}/%{name}
145
146 %files doc
147 %doc build/doc/*

  ViewVC Help
Powered by ViewVC 1.1.30