Accepting request 671538 from Java:packages
Add OSGi manifest + package manual + correct license tag to correspond to reality OBS-URL: https://build.opensuse.org/request/show/671538 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/junit?expand=0&rev=24
This commit is contained in:
commit
4dc94867f4
35
build.xml
35
build.xml
@ -8,6 +8,7 @@
|
|||||||
<property name="target" location="target" />
|
<property name="target" location="target" />
|
||||||
<property name="bin" location="${target}/main" />
|
<property name="bin" location="${target}/main" />
|
||||||
<property name="version-base" value="4.12" />
|
<property name="version-base" value="4.12" />
|
||||||
|
<property name="version-bundle" value="${version-base}.0" />
|
||||||
<property name="version-status" value="-SNAPSHOT" />
|
<property name="version-status" value="-SNAPSHOT" />
|
||||||
<property name="version" value="${version-base}${version-status}" />
|
<property name="version" value="${version-base}${version-status}" />
|
||||||
<property name="dist" value="junit${version}" />
|
<property name="dist" value="junit${version}" />
|
||||||
@ -35,6 +36,9 @@
|
|||||||
|
|
||||||
<property name="maven.deploy.goal" value="org.apache.maven.plugins:maven-gpg-plugin:1.1:sign-and-deploy-file" />
|
<property name="maven.deploy.goal" value="org.apache.maven.plugins:maven-gpg-plugin:1.1:sign-and-deploy-file" />
|
||||||
|
|
||||||
|
<property name="compiler.source" value="1.6" />
|
||||||
|
<property name="compiler.target" value="${compiler.source}" />
|
||||||
|
|
||||||
<target name="init">
|
<target name="init">
|
||||||
<tstamp/>
|
<tstamp/>
|
||||||
</target>
|
</target>
|
||||||
@ -72,8 +76,8 @@
|
|||||||
debug="on"
|
debug="on"
|
||||||
classpath="@{classpath}"
|
classpath="@{classpath}"
|
||||||
includeantruntime="false"
|
includeantruntime="false"
|
||||||
source="1.6"
|
source="${compiler.source}"
|
||||||
target="1.6"
|
target="${compiler.target}"
|
||||||
>
|
>
|
||||||
<compilerarg value="-Xlint:unchecked" />
|
<compilerarg value="-Xlint:unchecked" />
|
||||||
</javac>
|
</javac>
|
||||||
@ -96,8 +100,29 @@
|
|||||||
<jar
|
<jar
|
||||||
jarfile="${dist}/${binjar}"
|
jarfile="${dist}/${binjar}"
|
||||||
basedir="${bin}"
|
basedir="${bin}"
|
||||||
excludes="${unjarred}, **/*.java, build.xml"
|
excludes="${unjarred}, **/*.java, build.xml">
|
||||||
/>
|
<manifest>
|
||||||
|
<attribute name="Bundle-Description" value="JUnit is a unit testing framework for Java, created by Erich Gamma and Kent Beck."/>
|
||||||
|
<attribute name="Bundle-DocURL" value="http://www.junit.org"/>
|
||||||
|
<attribute name="Bundle-License" value="http://www.eclipse.org/legal/epl-v10.html"/>
|
||||||
|
<attribute name="Bundle-ManifestVersion" value="2"/>
|
||||||
|
<attribute name="Bundle-Name" value="JUnit"/>
|
||||||
|
<attribute name="Bundle-SymbolicName" value="org.junit"/>
|
||||||
|
<attribute name="Bundle-Vendor" value="JUnit"/>
|
||||||
|
<attribute name="Bundle-Version" value="${version-bundle}"/>
|
||||||
|
<attribute name="Export-Package" value="org.junit;version="${version-bundle}",org.junit.experimental.max;version="${version-bundle}",org.junit.experimental;version="${version-bundle}",org.junit.experimental.runners;version="${version-bundle}",org.junit.experimental.categories;version="${version-bundle}",org.junit.experimental.theories;version="${version-bundle}",org.junit.experimental.theories.suppliers;version="${version-bundle}",org.junit.experimental.results;version="${version-bundle}",org.junit.runners;version="${version-bundle}",org.junit.runners.model;version="${version-bundle}",org.junit.runners.parameterized;version="${version-bundle}",org.junit.matchers;version="${version-bundle}",org.junit.runner;version="${version-bundle}",org.junit.runner.manipulation;version="${version-bundle}",org.junit.runner.notification;version="${version-bundle}",org.junit.rules;version="${version-bundle}",org.junit.validator;version="${version-bundle}",junit.framework;version="${version-bundle}",junit.runner;version="${version-bundle}",junit.extensions;version="${version-bundle}",junit.textui;version="${version-bundle}",org.junit.experimental.theories.internal;x-internal:=true;version="${version-bundle}",org.junit.internal;x-internal:=true;version="${version-bundle}",org.junit.internal.builders;x-internal:=true;version="${version-bundle}",org.junit.internal.matchers;x-internal:=true;version="${version-bundle}",org.junit.internal.requests;x-internal:=true;version="${version-bundle}",org.junit.internal.runners;x-internal:=true;version="${version-bundle}",org.junit.internal.runners.model;x-internal:=true;version="${version-bundle}",org.junit.internal.runners.rules;x-internal:=true;version="${version-bundle}",org.junit.internal.runners.statements;x-internal:=true;version="${version-bundle}""/>
|
||||||
|
<attribute name="Implementation-Title" value="JUnit"/>
|
||||||
|
<attribute name="Implementation-URL" value="http://junit.org"/>
|
||||||
|
<attribute name="Implementation-Vendor" value="JUnit"/>
|
||||||
|
<attribute name="Implementation-Vendor-Id" value="junit"/>
|
||||||
|
<attribute name="Implementation-Version" value="${version-base}"/>
|
||||||
|
<attribute name="Import-Package" value="junit.extensions,junit.framework,junit.runner,org.hamcrest;version="[1.3,2)";core=split,org.hamcrest.core;version="[1.3,2)",org.junit,org.junit.experimental.theories,org.junit.experimental.theories.internal,org.junit.internal,org.junit.internal.builders,org.junit.internal.matchers,org.junit.internal.requests,org.junit.internal.runners,org.junit.internal.runners.model,org.junit.internal.runners.rules,org.junit.internal.runners.statements,org.junit.matchers,org.junit.rules,org.junit.runner,org.junit.runner.manipulation,org.junit.runner.notification,org.junit.runners,org.junit.runners.model,org.junit.runners.parameterized,org.junit.validator"/>
|
||||||
|
<attribute name="JavaPackages-ArtifactId" value="junit"/>
|
||||||
|
<attribute name="JavaPackages-GroupId" value="junit"/>
|
||||||
|
<attribute name="JavaPackages-Version" value="${version-base}"/>
|
||||||
|
<attribute name="Require-Capability" value="osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=${compiler.target}))""/>
|
||||||
|
</manifest>
|
||||||
|
</jar>
|
||||||
<jar
|
<jar
|
||||||
jarfile="${dist}/${depjar}"
|
jarfile="${dist}/${depjar}"
|
||||||
basedir="${bin}"
|
basedir="${bin}"
|
||||||
@ -129,7 +154,7 @@
|
|||||||
|
|
||||||
<target name="javadoc">
|
<target name="javadoc">
|
||||||
<javadoc destdir="${javadocdir}"
|
<javadoc destdir="${javadocdir}"
|
||||||
source="1.6"
|
source="${compiler.source}"
|
||||||
author="false"
|
author="false"
|
||||||
version="false"
|
version="false"
|
||||||
use="false"
|
use="false"
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Feb 4 17:16:22 UTC 2019 - Fridrich Strba <fstrba@suse.com>
|
||||||
|
|
||||||
|
- Add OSGi manifest to the jar file
|
||||||
|
- Package the manual
|
||||||
|
- BuildRequire and Require hamcrest-core, since the package does
|
||||||
|
strictly depend on hamcrest-core only.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Jan 21 23:36:15 UTC 2019 - Jan Engelhardt <jengelh@inai.de>
|
Mon Jan 21 23:36:15 UTC 2019 - Jan Engelhardt <jengelh@inai.de>
|
||||||
|
|
||||||
|
74
junit.spec
74
junit.spec
@ -20,25 +20,25 @@ Name: junit
|
|||||||
Version: 4.12
|
Version: 4.12
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Java regression test package
|
Summary: Java regression test package
|
||||||
License: CPL-1.0
|
License: EPL-1.0
|
||||||
Group: Development/Libraries/Java
|
Group: Development/Libraries/Java
|
||||||
Url: http://www.junit.org/
|
URL: http://www.junit.org/
|
||||||
Source0: https://github.com/junit-team/junit/archive/r%{version}.tar.gz
|
Source0: https://github.com/junit-team/junit/archive/r%{version}.tar.gz
|
||||||
Source1: build.xml
|
Source1: build.xml
|
||||||
Patch0: junit-jdk10.patch
|
Patch0: junit-jdk10.patch
|
||||||
Patch1: junit-jdk11.patch
|
Patch1: junit-jdk11.patch
|
||||||
BuildRequires: ant
|
BuildRequires: ant
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: hamcrest >= 1.3
|
BuildRequires: hamcrest-core >= 1.3
|
||||||
BuildRequires: java-devel >= 1.6.0
|
BuildRequires: java-devel >= 1.6
|
||||||
BuildRequires: javapackages-local
|
BuildRequires: javapackages-local
|
||||||
BuildRequires: perl(Digest::MD5)
|
Requires: mvn(org.hamcrest:hamcrest-core)
|
||||||
Requires: hamcrest
|
Provides: %{name}-demo = %{version}-%{release}
|
||||||
Requires: java >= 1.6
|
Obsoletes: %{name}-demo < %{version}-%{release}
|
||||||
Requires(post): javapackages-tools
|
Provides: %{name}4-demo = %{version}-%{release}
|
||||||
Requires(postun): javapackages-tools
|
Obsoletes: %{name}4-demo < %{version}-%{release}
|
||||||
Provides: junit4 = %{version}
|
Provides: %{name}4 = %{version}-%{release}
|
||||||
Obsoletes: junit4 <= 4.10
|
Obsoletes: %{name}4 < %{version}-%{release}
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -48,22 +48,23 @@ It is used by the developer who implements unit tests in Java.
|
|||||||
%package javadoc
|
%package javadoc
|
||||||
Summary: Javadoc for %{name}
|
Summary: Javadoc for %{name}
|
||||||
Group: Documentation/HTML
|
Group: Documentation/HTML
|
||||||
Provides: junit4-javadoc = %{version}
|
Provides: %{name}4-javadoc = %{version}-%{release}
|
||||||
Obsoletes: junit4-javadoc <= 4.10
|
Obsoletes: %{name}4-javadoc < %{version}-%{release}
|
||||||
Provides: junit4-manual = %{version}
|
|
||||||
Obsoletes: junit4-manual <= 4.10
|
|
||||||
Provides: junit4-demo = %{version}
|
|
||||||
Obsoletes: junit4-demo <= 4.10
|
|
||||||
Provides: %{name}-manual = %{version}
|
|
||||||
Obsoletes: %{name}-manual < %{version}
|
|
||||||
Provides: %{name}-demo = %{version}
|
|
||||||
Obsoletes: %{name}-demo < %{version}
|
|
||||||
|
|
||||||
%description javadoc
|
%description javadoc
|
||||||
Javadoc for %{name}.
|
Javadoc for %{name}.
|
||||||
|
|
||||||
|
%package manual
|
||||||
|
Summary: Manual for %{name}
|
||||||
|
Group: Documentation/Other
|
||||||
|
Provides: %{name}4-manual = %{version}-%{release}
|
||||||
|
Obsoletes: %{name}4-manual < %{version}-%{release}
|
||||||
|
|
||||||
|
%description manual
|
||||||
|
Documentation for %{name}.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n junit4-r%{version}
|
%setup -q -n %{name}4-r%{version}
|
||||||
cp %{SOURCE1} .
|
cp %{SOURCE1} .
|
||||||
%patch0 -p1
|
%patch0 -p1
|
||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
@ -79,18 +80,18 @@ ant jars javadoc -Dversion-status=
|
|||||||
%install
|
%install
|
||||||
# jars
|
# jars
|
||||||
install -d -m 755 %{buildroot}%{_javadir}
|
install -d -m 755 %{buildroot}%{_javadir}
|
||||||
install -m 644 junit%{version}/junit-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar
|
install -m 644 %{name}%{version}/%{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar
|
||||||
# compat symlink
|
# compat symlink
|
||||||
ln -sf %{_javadir}/%{name}.jar %{buildroot}%{_javadir}/junit4.jar
|
ln -sf %{_javadir}/%{name}.jar %{buildroot}%{_javadir}/%{name}4.jar
|
||||||
|
|
||||||
# pom
|
# pom
|
||||||
install -d -m 755 %{buildroot}%{_mavenpomdir}
|
install -d -m 755 %{buildroot}%{_mavenpomdir}
|
||||||
install -m 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
|
install -m 644 pom.xml %{buildroot}%{_mavenpomdir}/%{name}.pom
|
||||||
%add_maven_depmap
|
%add_maven_depmap %{name}.pom %{name}.jar
|
||||||
|
|
||||||
# javadoc
|
# javadoc
|
||||||
install -d -m 755 %{buildroot}%{_javadocdir}/%{name}
|
install -d -m 755 %{buildroot}%{_javadocdir}/%{name}
|
||||||
cp -pr junit%{version}/javadoc/* %{buildroot}%{_javadocdir}/%{name}
|
cp -pr %{name}%{version}/javadoc/* %{buildroot}%{_javadocdir}/%{name}
|
||||||
%fdupes -s %{buildroot}%{_javadocdir}/%{name}
|
%fdupes -s %{buildroot}%{_javadocdir}/%{name}
|
||||||
|
|
||||||
%check
|
%check
|
||||||
@ -109,18 +110,17 @@ javac -cp %{buildroot}/%{_javadir}/%{name}.jar test.java
|
|||||||
java -cp %{buildroot}/%{_javadir}/%{name}.jar: test 2>&1 | \
|
java -cp %{buildroot}/%{_javadir}/%{name}.jar: test 2>&1 | \
|
||||||
grep 'Exception in thread "main" java.lang.AssertionError: Hello world from junit'
|
grep 'Exception in thread "main" java.lang.AssertionError: Hello world from junit'
|
||||||
|
|
||||||
%files
|
%files -f .mfiles
|
||||||
%doc CODING_STYLE.txt LICENSE-junit.txt README.md acknowledgements.txt
|
%license LICENSE-junit.txt
|
||||||
%{_javadir}/%{name}.jar
|
%doc CODING_STYLE.txt README.md acknowledgements.txt
|
||||||
%{_javadir}/junit4.jar
|
%{_javadir}/%{name}4.jar
|
||||||
%{_mavenpomdir}/*
|
|
||||||
%if %{defined _maven_repository}
|
|
||||||
%{_mavendepmapfragdir}/%{name}
|
|
||||||
%else
|
|
||||||
%{_datadir}/maven-metadata/%{name}.xml*
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%files javadoc
|
%files javadoc
|
||||||
|
%license LICENSE-junit.txt
|
||||||
%{_javadocdir}/%{name}
|
%{_javadocdir}/%{name}
|
||||||
|
|
||||||
|
%files manual
|
||||||
|
%license LICENSE-junit.txt
|
||||||
|
%doc doc/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Loading…
Reference in New Issue
Block a user