/[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 45360 - (show annotations) (download)
Mon Jan 31 17:05:29 2011 UTC (13 years, 2 months ago) by dmorgan
File size: 4956 byte(s)
Add java-rpmbuild as buildrequires
1 # Copyright (c) 2000-2010, 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 Name: junit4
32 Version: 4.8.2
33 Release: %mkrel 16
34 Summary: Java regression test package
35 License: CPL
36 URL: http://www.junit.org/
37 Group: Development/Java
38 # git clone --bare git://github.com/KentBeck/junit.git junit.git
39 # mkdir junit-4.8.2
40 # git --git-dir=junit.git --work-tree=junit-4.8.2 checkout r4.8.2
41 # tar cjf junit-4.8.2.tar.bz2 junit-4.8.2/
42 Source0: junit-%{version}.tar.bz2
43 Requires(post): jpackage-utils >= 1.7.3
44 Requires(postun): jpackage-utils >= 1.7.3
45 Requires: hamcrest
46 Requires: java >= 0:1.6.0
47 BuildRequires: ant
48 BuildRequires: jpackage-utils >= 1.7.3
49 BuildRequires: java-rpmbuild
50 BuildRequires: java-devel >= 0:1.6.0
51 BuildRequires: hamcrest
52 BuildArch: noarch
53 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
54
55 %description
56 JUnit is a regression testing framework written by Erich Gamma and Kent Beck.
57 It is used by the developer who implements unit tests in Java. JUnit is Open
58 Source Software, released under the Common Public License Version 1.0 and
59 JUnit is Open Source Software, released under the IBM Public License and
60 hosted on SourceForge.
61
62 %package manual
63 Group: Development/Java
64 Summary: Manual for %{name}
65
66 %description manual
67 Documentation for %{name}.
68
69 %package javadoc
70 Group: Development/Java
71 Summary: Javadoc for %{name}
72 Requires: jpackage-utils
73
74 %description javadoc
75 Javadoc for %{name}.
76
77 %package demo
78 Group: Development/Java
79 Summary: Demos for %{name}
80 Requires: %{name} = %{version}-%{release}
81
82 %description demo
83 Demonstrations and samples for %{name}.
84
85 %prep
86 %setup -q -n junit-%{version}
87 %{_bindir}/find -type f -name "*.jar" | %{_bindir}/xargs -t %{__rm}
88 ln -s $(build-classpath hamcrest/core) lib/hamcrest-core-1.1.jar
89 perl -pi -e 's/\r$//g' stylesheet.css
90
91 %build
92 export CLASSPATH=
93 export OPT_JAR_LIST=:
94 %{ant} -Dant.build.javac.source=1.5 dist
95
96 %install
97
98 # jars
99 install -d -m 755 %{buildroot}%{_javadir}
100 install -p -m 644 junit%{version}/junit-%{version}.jar %{buildroot}%{_javadir}/%{name}-%{version}.jar
101 pushd %{buildroot}%{_javadir}
102 ln -s %{name}-%{version}.jar %{name}.jar
103 popd
104
105 # pom
106 install -d -m 755 %{buildroot}%{_datadir}/maven2/poms
107 install -p -m 644 pom.xml %{buildroot}%{_datadir}/maven2/poms/JPP-%{name}.pom
108 %add_to_maven_depmap junit junit %{version} JPP %{name}
109
110 # javadoc
111 install -d -m 755 %{buildroot}%{_javadocdir}/%{name}-%{version}
112 cp -pr junit%{version}/javadoc/* %{buildroot}%{_javadocdir}/%{name}-%{version}
113 ln -s %{name}-%{version} %{buildroot}%{_javadocdir}/%{name}
114
115 # demo
116 install -d -m 755 %{buildroot}%{_datadir}/%{name}/demo/junit # Not using %%name for last part because it is
117 # part of package name
118 cp -pr junit%{version}/junit/* %{buildroot}%{_datadir}/%{name}/demo/junit
119
120 %clean
121 rm -rf %{buildroot}
122
123 %post
124 %update_maven_depmap
125
126 %postun
127 %update_maven_depmap
128
129 %files
130 %defattr(0644,root,root,0755)
131 %doc cpl-v10.html README.html
132 %{_javadir}*/%{name}.jar
133 %{_javadir}*/%{name}-%{version}.jar
134 %{_datadir}/maven2/poms/JPP-%{name}.pom
135 %{_mavendepmapfragdir}/%{name}
136
137 %files demo
138 %defattr(0644,root,root,0755)
139 %{_datadir}/%{name}
140
141 %files javadoc
142 %defattr(0644,root,root,0755)
143 %{_javadocdir}/%{name}-%{version}
144 %{_javadocdir}/%{name}
145
146 %files manual
147 %defattr(0644,root,root,0755)
148 %doc junit%{version}/doc/*
149

  ViewVC Help
Powered by ViewVC 1.1.30