Switch to mvn_install
This commit is contained in:
parent
4356aaf89e
commit
427ef030ab
@ -1,21 +1,6 @@
|
|||||||
diff --git a/build.xml b/build.xml
|
--- build.xml.orig 2014-12-31 16:43:56.000000000 +0000
|
||||||
index b24eaf0..956cd72 100644
|
+++ build.xml 2015-06-22 09:20:12.859059775 +0100
|
||||||
--- a/build.xml
|
@@ -81,6 +81,7 @@
|
||||||
+++ b/build.xml
|
|
||||||
@@ -44,6 +44,12 @@
|
|
||||||
<property name="maven.repository.dir" value="${basedir}/maven/repository" />
|
|
||||||
|
|
||||||
<path id="compile.classpath">
|
|
||||||
+ <fileset dir="/usr/share/java">
|
|
||||||
+ <include name="hamcrest/core.jar" />
|
|
||||||
+ <include name="junit.jar" />
|
|
||||||
+ <include name="objenesis.jar" />
|
|
||||||
+ <include name="cglib.jar" />
|
|
||||||
+ </fileset>
|
|
||||||
<fileset dir="${lib.dir.run}" includes="*.jar" />
|
|
||||||
<fileset dir="${lib.dir.compile}" includes="*.jar" />
|
|
||||||
<fileset dir="${lib.dir.repackaged}" includes="*.jar" />
|
|
||||||
@@ -81,6 +87,7 @@
|
|
||||||
<target name="compile" depends="clean, prepare">
|
<target name="compile" depends="clean, prepare">
|
||||||
<javac srcdir="src" destdir="${src.classes.dir}" source="1.5" target="1.5" debug="true" deprecation="true" nowarn="true">
|
<javac srcdir="src" destdir="${src.classes.dir}" source="1.5" target="1.5" debug="true" deprecation="true" nowarn="true">
|
||||||
<classpath refid="compile.classpath" />
|
<classpath refid="compile.classpath" />
|
||||||
@ -23,7 +8,7 @@ index b24eaf0..956cd72 100644
|
|||||||
</javac>
|
</javac>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
@@ -207,18 +214,14 @@
|
@@ -207,18 +208,14 @@
|
||||||
<delete file="${target.dir}/${jar.core.osgified}" />
|
<delete file="${target.dir}/${jar.core.osgified}" />
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
@ -45,7 +30,7 @@ index b24eaf0..956cd72 100644
|
|||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="sources" >
|
<target name="sources" >
|
||||||
@@ -319,53 +322,10 @@
|
@@ -319,53 +316,10 @@
|
||||||
<h1><a href="org/mockito/Mockito.html">Click to see examples</a>. Mockito ${version} API.</h1>
|
<h1><a href="org/mockito/Mockito.html">Click to see examples</a>. Mockito ${version} API.</h1>
|
||||||
]]>
|
]]>
|
||||||
</doctitle>
|
</doctitle>
|
||||||
|
35
mockito.spec
35
mockito.spec
@ -1,6 +1,6 @@
|
|||||||
Name: mockito
|
Name: mockito
|
||||||
Version: 1.10.19
|
Version: 1.10.19
|
||||||
Release: 2%{?dist}
|
Release: 3%{?dist}
|
||||||
Summary: A Java mocking framework
|
Summary: A Java mocking framework
|
||||||
|
|
||||||
License: MIT
|
License: MIT
|
||||||
@ -9,14 +9,14 @@ Source0: mockito-%{version}.tar.xz
|
|||||||
Source1: make-mockito-sourcetarball.sh
|
Source1: make-mockito-sourcetarball.sh
|
||||||
Patch0: fixup-ant-script.patch
|
Patch0: fixup-ant-script.patch
|
||||||
Patch1: fix-bnd-config.patch
|
Patch1: fix-bnd-config.patch
|
||||||
Patch2: %{name}-matcher.patch
|
Patch2: mockito-matcher.patch
|
||||||
# Workaround for NPE in setting NamingPolicy in cglib
|
# Workaround for NPE in setting NamingPolicy in cglib
|
||||||
Patch3: setting-naming-policy.patch
|
Patch3: setting-naming-policy.patch
|
||||||
# because we have old objenesis
|
# because we have old objenesis
|
||||||
Patch4: fix-incompatible-types.patch
|
Patch4: fix-incompatible-types.patch
|
||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
BuildRequires: jpackage-utils
|
BuildRequires: javapackages-local
|
||||||
BuildRequires: java-devel
|
BuildRequires: java-devel
|
||||||
BuildRequires: ant
|
BuildRequires: ant
|
||||||
BuildRequires: objenesis
|
BuildRequires: objenesis
|
||||||
@ -25,7 +25,6 @@ BuildRequires: junit
|
|||||||
BuildRequires: hamcrest
|
BuildRequires: hamcrest
|
||||||
BuildRequires: aqute-bnd
|
BuildRequires: aqute-bnd
|
||||||
|
|
||||||
Requires: jpackage-utils
|
|
||||||
Requires: objenesis
|
Requires: objenesis
|
||||||
Requires: cglib
|
Requires: cglib
|
||||||
Requires: junit
|
Requires: junit
|
||||||
@ -39,14 +38,13 @@ errors.
|
|||||||
|
|
||||||
%package javadoc
|
%package javadoc
|
||||||
Summary: Javadocs for %{name}
|
Summary: Javadocs for %{name}
|
||||||
Requires: jpackage-utils
|
|
||||||
|
|
||||||
%description javadoc
|
%description javadoc
|
||||||
This package contains the API documentation for %{name}.
|
This package contains the API documentation for %{name}.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch0 -p1
|
%patch0
|
||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
# Set Bundle-Version properly
|
# Set Bundle-Version properly
|
||||||
sed -i 's/Bundle-Version= ${version}/Bundle-Version= %{version}/' conf/mockito-core.bnd
|
sed -i 's/Bundle-Version= ${version}/Bundle-Version= %{version}/' conf/mockito-core.bnd
|
||||||
@ -59,38 +57,33 @@ find . -name "*.java" -exec sed -i "s|org\.mockito\.cglib|net\.sf\.cglib|g" {} +
|
|||||||
mkdir -p lib/compile
|
mkdir -p lib/compile
|
||||||
|
|
||||||
%build
|
%build
|
||||||
build-jar-repository lib/compile objenesis
|
build-jar-repository lib/compile objenesis cglib junit hamcrest/core
|
||||||
ant jar javadoc
|
ant jar javadoc
|
||||||
# Convert to OSGi bundle
|
# Convert to OSGi bundle
|
||||||
pushd target
|
pushd target
|
||||||
java -jar $(build-classpath aqute-bnd) wrap -output mockito-core-%{version}.bar -properties ../conf/mockito-core.bnd mockito-core-%{version}.jar
|
java -jar $(build-classpath aqute-bnd) wrap -output mockito-core-%{version}.bar -properties ../conf/mockito-core.bnd mockito-core-%{version}.jar
|
||||||
|
mv mockito-core-%{version}.bar mockito-core-%{version}.jar
|
||||||
popd
|
popd
|
||||||
|
|
||||||
%install
|
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_javadir}
|
|
||||||
sed -i -e "s|@version@|%{version}|g" maven/mockito-core.pom
|
sed -i -e "s|@version@|%{version}|g" maven/mockito-core.pom
|
||||||
cp -p target/mockito-core-%{version}.bar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar
|
%mvn_artifact maven/mockito-core.pom target/mockito-core-%{version}.jar
|
||||||
|
%mvn_alias org.mockito:mockito-core org.mockito:mockito-all
|
||||||
|
|
||||||
install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir}
|
%install
|
||||||
install -pm 644 maven/mockito-core.pom \
|
%mvn_install -J target/javadoc
|
||||||
$RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{name}.pom
|
|
||||||
|
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name}
|
|
||||||
cp -rp target/javadoc/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}
|
|
||||||
|
|
||||||
%add_maven_depmap JPP-%{name}.pom %{name}.jar -a "org.mockito:mockito-all"
|
|
||||||
|
|
||||||
%files -f .mfiles
|
%files -f .mfiles
|
||||||
%{_javadir}/%{name}.jar
|
|
||||||
%doc NOTICE
|
%doc NOTICE
|
||||||
%doc LICENSE
|
%doc LICENSE
|
||||||
|
|
||||||
%files javadoc
|
%files javadoc -f .mfiles-javadoc
|
||||||
%{_javadocdir}/%{name}
|
|
||||||
%doc LICENSE
|
%doc LICENSE
|
||||||
%doc NOTICE
|
%doc NOTICE
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Jun 22 2015 Mat Booth <mat.booth@redhat.com> - 1.10.19-3
|
||||||
|
- Switch to mvn_install
|
||||||
|
|
||||||
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.10.19-2
|
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.10.19-2
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user