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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 21741 - (show annotations) (download)
Mon Jan 17 22:31:57 2011 UTC (13 years, 2 months ago) by dmorgan
File size: 5217 byte(s)
imported package junit4
1 # Copyright (c) 2000-2008, 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 gcj_support 1
32
33 Name: junit4
34 Version: 4.5
35 Release: %mkrel 3.0.2
36 Epoch: 0
37 Summary: Java regression test package
38 License: CPL
39 Url: http://www.junit.org/
40 Group: Development/Java
41 Source0: junit-4.5.tar.bz2
42 # steps to reproduce
43 # cvs -d:pserver:anonymous@junit.cvs.sourceforge.net:/cvsroot/junit login
44 # cvs -z3 -d:pserver:anonymous@junit.cvs.sourceforge.net:/cvsroot/junit export -r r44 junit
45 # mv junit junit-4.4
46 # tar czf junit-4.4.tar.gz junit-4.4/
47
48 # Source1: junit4.4-build.xml
49 Source2: junit-4.5.pom
50 BuildRequires: ant
51 BuildRequires: java-rpmbuild >= 0:1.6
52 BuildRequires: dos2unix
53 BuildRequires: hamcrest
54 %if %{gcj_support}
55 BuildRequires: java-gcj-compat-devel
56 %else
57 BuildArch: noarch
58 %endif
59 Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root
60
61 %description
62 JUnit is a regression testing framework written by Erich Gamma and Kent Beck.
63 It is used by the developer who implements unit tests in Java. JUnit is Open
64 Source Software, released under the Common Public License Version 1.0 and
65 JUnit is Open Source Software, released under the IBM Public License and
66 hosted on SourceForge.
67
68 %package manual
69 Group: Development/Java
70 Summary: Manual for %{name}
71
72 %description manual
73 Documentation for %{name}.
74
75 %package javadoc
76 Group: Development/Java
77 Summary: Javadoc for %{name}
78
79 %description javadoc
80 Javadoc for %{name}.
81
82 %package demo
83 Group: Development/Java
84 Summary: Demos for %{name}
85 Requires: %{name} = %{epoch}:%{version}-%{release}
86
87 %description demo
88 Demonstrations and samples for %{name}.
89
90 %prep
91 %setup -q -n junit-%{version}
92 %remove_java_binaries
93 ln -sf $(build-classpath hamcrest/core) lib/hamcrest-core-1.1.jar
94 #rm src/org/junit/tests/BothTest.java
95
96
97 %build
98 %{ant} dist
99
100 find -name \*.htm -o -name \*.html | xargs dos2unix
101
102 %install
103 %{__rm} -rf %{buildroot}
104
105 # jars
106 %{__mkdir_p} %{buildroot}%{_javadir}
107 %{__cp} -a junit%{version}/junit-4.5.jar %{buildroot}%{_javadir}/%{name}-%{version}.jar
108 (cd %{buildroot}%{_javadir} && for jar in *-%{version}*; do %{__ln_s} ${jar} ${jar/-%{version}/}; done)
109 # pom
110 install -d -m 755 %{buildroot}%{_datadir}/maven2/poms
111 install -m 644 %{SOURCE2} %{buildroot}%{_datadir}/maven2/poms/JPP-%{name}.pom
112 %add_to_maven_depmap junit junit %{version} JPP %{name}
113 %add_to_maven_depmap junit junit4 %{version} JPP %{name}
114 # javadoc
115 %{__mkdir_p} %{buildroot}%{_javadocdir}/%{name}-%{version}
116 %{__cp} -a junit%{version}/javadoc/* %{buildroot}%{_javadocdir}/%{name}-%{version}
117 (cd %{buildroot}%{_javadocdir} && %{__ln_s} %{name}-%{version} %{name})
118 # demo
119 %{__mkdir_p} %{buildroot}%{_datadir}/%{name}/demo/junit
120 %{__cp} -a junit%{version}/junit/* %{buildroot}%{_datadir}/%{name}/demo/junit
121
122 %{gcj_compile}
123
124 # fix end-of-line
125 %{__perl} -pi -e 's/\r$//g' README.html
126
127 for i in `find junit%{version}/doc -type f -name "*.htm*"`; do
128 %{__perl} -pi -e 's/\r$//g' $i
129 done
130
131 for i in `find %{buildroot}%{_datadir}/%{name} -type f -name "*.java"`; do
132 %{__perl} -pi -e 's/\r$//g' $i
133 done
134
135 %clean
136 %{__rm} -rf %{buildroot}
137
138 %post
139 %update_maven_depmap
140 %if %{gcj_support}
141 %{update_gcjdb}
142 %endif
143
144 %postun
145 %update_maven_depmap
146 %if %{gcj_support}
147 %{clean_gcjdb}
148 %endif
149
150 %files
151 %defattr(0644,root,root,0755)
152 %doc README.html
153 %{_javadir}/*
154 %{_datadir}/maven2
155 %{_mavendepmapfragdir}
156 %{gcj_files}
157 %dir %{_datadir}/%{name}
158
159 %files manual
160 %defattr(0644,root,root,0755)
161 %doc junit%{version}/doc/*
162
163 %files javadoc
164 %defattr(0644,root,root,0755)
165 %{_javadocdir}/%{name}-%{version}
166 %{_javadocdir}/%{name}
167
168 %files demo
169 %defattr(0644,root,root,0755)
170 %{_datadir}/%{name}/*
171
172

  ViewVC Help
Powered by ViewVC 1.1.30