2009-05-05 02:36:59 +00:00
|
|
|
#
|
2012-06-20 12:44:08 +00:00
|
|
|
# spec file for package jmock
|
2009-05-05 02:36:59 +00:00
|
|
|
#
|
2024-02-21 13:16:31 +00:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2009-05-05 02:36:59 +00:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2018-11-01 11:32:23 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2009-05-05 02:36:59 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
%define section free
|
|
|
|
Name: jmock
|
|
|
|
Version: 1.2.0
|
2012-06-20 12:44:08 +00:00
|
|
|
Release: 0
|
2009-05-05 02:36:59 +00:00
|
|
|
Summary: Test Java code using mock objects
|
2012-03-29 05:43:07 +00:00
|
|
|
License: BSD-3-Clause
|
2012-06-20 12:44:08 +00:00
|
|
|
Group: Development/Libraries/Java
|
2022-03-23 18:27:42 +00:00
|
|
|
URL: http://jmock.codehaus.org/license.html
|
2024-02-21 13:16:31 +00:00
|
|
|
Source0: %{name}-%{version}.tar.xz
|
|
|
|
Source1: https://repo1.maven.org/maven2/%{name}/%{name}/%{version}/%{name}-%{version}.pom
|
|
|
|
Source2: https://repo1.maven.org/maven2/jmock/%{name}-cglib/%{version}/%{name}-cglib-%{version}.pom
|
2009-05-05 02:36:59 +00:00
|
|
|
Patch0: jmock-1.2.0-AssertMo.patch
|
|
|
|
Patch1: jmock-1.2.0-build_xml.patch
|
|
|
|
BuildRequires: ant >= 1.6
|
|
|
|
BuildRequires: ant-junit
|
2012-06-20 12:44:08 +00:00
|
|
|
BuildRequires: cglib-nohook >= 2.1.3
|
2017-09-19 09:18:24 +00:00
|
|
|
BuildRequires: fdupes
|
2022-03-23 18:27:42 +00:00
|
|
|
BuildRequires: java-devel >= 1.8
|
2017-05-19 10:48:27 +00:00
|
|
|
BuildRequires: javapackages-local
|
|
|
|
BuildRequires: junit >= 3.8.1
|
|
|
|
BuildArch: noarch
|
2009-05-05 02:36:59 +00:00
|
|
|
|
|
|
|
%description
|
|
|
|
jMock is a library for testing Java code using mock objects. Mock
|
|
|
|
objects help you design and test the interactions between the
|
|
|
|
objects in your programs. The jMock package: * makes it quick and
|
|
|
|
easy to define mock objects, so you don't break the rhythm of
|
|
|
|
programming.
|
|
|
|
|
|
|
|
* lets you define flexible constraints over object interactions,
|
|
|
|
reducing the brittleness of your tests.
|
|
|
|
|
|
|
|
* is easy to extend.
|
|
|
|
|
|
|
|
%package javadoc
|
|
|
|
Summary: Test Java code using mock objects
|
|
|
|
Group: Development/Libraries/Java
|
|
|
|
|
|
|
|
%description javadoc
|
|
|
|
jMock is a library for testing Java code using mock objects. Mock
|
|
|
|
objects help you design and test the interactions between the
|
|
|
|
objects in your programs. The jMock package: * makes it quick and
|
|
|
|
easy to define mock objects, so you don't break the rhythm of
|
|
|
|
programming.
|
|
|
|
|
|
|
|
* lets you define flexible constraints over object interactions,
|
|
|
|
reducing the brittleness of your tests.
|
|
|
|
|
|
|
|
* is easy to extend.
|
|
|
|
|
|
|
|
%package demo
|
|
|
|
Summary: Test Java code using mock objects
|
|
|
|
Group: Development/Libraries/Java
|
|
|
|
|
|
|
|
%description demo
|
|
|
|
jMock is a library for testing Java code using mock objects. Mock
|
|
|
|
objects help you design and test the interactions between the
|
|
|
|
objects in your programs. The jMock package: * makes it quick and
|
|
|
|
easy to define mock objects, so you don't break the rhythm of
|
|
|
|
programming.
|
|
|
|
|
|
|
|
* lets you define flexible constraints over object interactions,
|
|
|
|
reducing the brittleness of your tests.
|
|
|
|
|
|
|
|
* is easy to extend.
|
|
|
|
|
|
|
|
%prep
|
2017-05-19 10:48:27 +00:00
|
|
|
%setup -q
|
2009-05-05 02:36:59 +00:00
|
|
|
find . -name "*.jar" | xargs rm
|
2024-02-21 13:16:31 +00:00
|
|
|
%patch -P 0
|
|
|
|
%patch -P 1
|
2009-05-05 02:36:59 +00:00
|
|
|
|
2012-06-20 12:44:08 +00:00
|
|
|
# needs net.sf.cglib.asm. classes fron dropped cglib-nohook
|
|
|
|
rm -rf src/test src/atest
|
|
|
|
|
2009-05-05 02:36:59 +00:00
|
|
|
%build
|
|
|
|
export OPT_JAR_LIST="ant/ant-junit junit"
|
2024-02-21 13:16:31 +00:00
|
|
|
export CLASSPATH=`pwd`/build/classes:$(build-classpath cglib)
|
2017-09-19 09:18:24 +00:00
|
|
|
ant \
|
2022-03-23 18:27:42 +00:00
|
|
|
-Dant.build.javac.source=1.8 -Dant.build.javac.target=1.8 \
|
2017-09-19 09:18:24 +00:00
|
|
|
-Dbuild.sysclasspath=only \
|
|
|
|
package
|
2009-05-05 02:36:59 +00:00
|
|
|
|
|
|
|
%install
|
|
|
|
install -Dpm 644 build/%{name}-core-%{version}.jar \
|
2017-05-19 10:48:27 +00:00
|
|
|
%{buildroot}%{_javadir}/%{name}.jar
|
2009-05-05 02:36:59 +00:00
|
|
|
install -pm 644 build/%{name}-cglib-%{version}.jar \
|
2017-05-19 10:48:27 +00:00
|
|
|
%{buildroot}%{_javadir}/%{name}-cglib.jar
|
2009-05-05 02:36:59 +00:00
|
|
|
install -pm 644 build/%{name}-tests-%{version}.jar \
|
2017-05-19 10:48:27 +00:00
|
|
|
%{buildroot}%{_javadir}/%{name}-tests.jar
|
2013-09-10 11:59:06 +00:00
|
|
|
|
2009-05-05 02:36:59 +00:00
|
|
|
# poms
|
2017-05-19 10:48:27 +00:00
|
|
|
install -d -m 755 %{buildroot}%{_mavenpomdir}
|
2024-02-21 13:16:31 +00:00
|
|
|
%{mvn_install_pom} %{SOURCE1} \
|
2017-05-19 10:48:27 +00:00
|
|
|
%{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
|
2024-02-21 13:16:31 +00:00
|
|
|
%add_maven_depmap JPP-%{name}.pom %{name}.jar
|
|
|
|
%{mvn_install_pom} %{SOURCE2} \
|
|
|
|
%{buildroot}%{_mavenpomdir}/JPP-%{name}-cglib.pom
|
|
|
|
%add_maven_depmap JPP-%{name}-cglib.pom %{name}-cglib.jar
|
2013-09-10 11:59:06 +00:00
|
|
|
|
2009-05-05 02:36:59 +00:00
|
|
|
#
|
2017-05-19 10:48:27 +00:00
|
|
|
install -dm 755 %{buildroot}%{_javadocdir}/%{name}
|
|
|
|
cp -pr build/javadoc-%{version}/* %{buildroot}%{_javadocdir}/%{name}
|
2017-09-19 09:18:24 +00:00
|
|
|
%fdupes -s %{buildroot}%{_javadocdir}/%{name}
|
2009-05-05 02:36:59 +00:00
|
|
|
#
|
2017-05-19 10:48:27 +00:00
|
|
|
install -dm 755 %{buildroot}%{_datadir}/%{name}-%{version}
|
|
|
|
cp -pr examples/* %{buildroot}%{_datadir}/%{name}-%{version}
|
2024-02-21 13:16:31 +00:00
|
|
|
%fdupes -s %{buildroot}%{_datadir}/%{name}-%{version}
|
2009-05-05 02:36:59 +00:00
|
|
|
|
2024-02-21 13:16:31 +00:00
|
|
|
%files -f .mfiles
|
|
|
|
%license LICENSE.txt
|
|
|
|
%doc overview.html
|
|
|
|
%{_javadir}/%{name}-tests.jar
|
2009-05-05 02:36:59 +00:00
|
|
|
|
|
|
|
%files javadoc
|
|
|
|
%{_javadocdir}/%{name}
|
|
|
|
|
|
|
|
%files demo
|
|
|
|
%{_datadir}/%{name}-%{version}
|
|
|
|
|
|
|
|
%changelog
|