[cobertura] Update to upstream version 2.0

Mikolaj Izdebski mizdebsk at fedoraproject.org
Tue Mar 24 08:37:37 UTC 2015


commit fb638e8c3f855372ac5a6a983d5becb9459d9c5a
Author: Mikolaj Izdebski <mizdebsk at redhat.com>
Date:   Wed Feb 4 12:13:37 2015 +0100

    Update to upstream version 2.0

 .gitignore                                 |   1 +
 cobertura-fail-build-on-test-failure.patch |  25 ------
 cobertura-unmappable-characters.patch      |  67 ---------------
 cobertura.spec                             | 134 ++++++++++++-----------------
 create-tarball.sh                          |  22 ++---
 sources                                    |   4 +-
 6 files changed, 65 insertions(+), 188 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 9cc8537..50ab2fc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,3 +9,4 @@ cobertura-1.9.3-src.tar.gz
 /cobertura-runtime-2.0.pom
 /cobertura-2.0-clean.tar.gz
 /cobertura-2.0.pom
+/cobertura-2.0.3.tar.bz2
diff --git a/cobertura.spec b/cobertura.spec
index 3d54eda..477edcf 100644
--- a/cobertura.spec
+++ b/cobertura.spec
@@ -1,5 +1,5 @@
 Name:           cobertura
-Version:        2.0
+Version:        2.0.3
 Release:        1%{?dist}
 Summary:        Java tool that calculates the percentage of code accessed by tests
 
@@ -10,44 +10,43 @@ Summary:        Java tool that calculates the percentage of code accessed by tes
 # rest is mix of GPLv2+ and ASL 1.1
 License:        ASL 1.1 and GPLv2+ and MPL and ASL 2.0 and GPL+
 URL:            http://cobertura.sourceforge.net/
+BuildArch:      noarch
 
-# ./create-tarball.sh %%{version}
-Source0:        %{name}-%{version}-clean.tar.gz
+# ./create-tarball.sh %%{version} 6b7431daa0
+Source0:        %{name}-%{version}.tar.bz2
 # POMs based from those available from the Maven repository
-Source1:        http://repo1.maven.org/maven2/net/sourceforge/%{name}/%{name}/%{version}/%{name}-%{version}.pom
-Source2:        http://repo1.maven.org/maven2/net/sourceforge/%{name}/%{name}-runtime/%{version}/%{name}-runtime-%{version}.pom
 Source3:        http://www.apache.org/licenses/LICENSE-1.1.txt
 Source4:        http://www.apache.org/licenses/LICENSE-2.0.txt
 Source5:        create-tarball.sh
 
-Patch0:         %{name}-unmappable-characters.patch
-Patch1:         %{name}-fail-build-on-test-failure.patch
-
-BuildRequires:  ant
-BuildRequires:  ant-junit
-BuildRequires:  antlr
-BuildRequires:  apache-commons-cli
-BuildRequires:  groovy
-BuildRequires:  java-devel
-BuildRequires:  jakarta-oro
-BuildRequires:  jaxen
-BuildRequires:  jdom
-BuildRequires:  junit
-BuildRequires:  log4j
-BuildRequires:  objectweb-asm
-BuildRequires:  tomcat-servlet-3.0-api
-BuildRequires:  xalan-j2
-BuildRequires:  xerces-j2
-BuildRequires:  xml-commons-jaxp-1.3-apis
-
-Requires:       ant
-Requires:       java-headless
-Requires:       jakarta-oro
-Requires:       junit
-Requires:       log4j
-Requires:       objectweb-asm
+BuildRequires:  maven-local
+BuildRequires:  mvn(commons-io:commons-io)
+BuildRequires:  mvn(com.sun:tools)
+BuildRequires:  mvn(javax.servlet:javax.servlet-api)
+BuildRequires:  mvn(jaxen:jaxen)
+BuildRequires:  mvn(junit:junit)
+BuildRequires:  mvn(log4j:log4j)
+BuildRequires:  mvn(net.java.dev.javacc:javacc)
+BuildRequires:  mvn(net.sourceforge.cobertura:cobertura)
+BuildRequires:  mvn(org.apache.ant:ant)
+BuildRequires:  mvn(org.apache.ant:ant-junit)
+BuildRequires:  mvn(org.apache.maven.plugins:maven-assembly-plugin)
+BuildRequires:  mvn(org.apache.maven.plugins:maven-clean-plugin)
+BuildRequires:  mvn(org.apache.maven.plugins:maven-failsafe-plugin)
+BuildRequires:  mvn(org.apache.maven.plugins:maven-release-plugin)
+BuildRequires:  mvn(org.apache.maven.plugins:maven-war-plugin)
+BuildRequires:  mvn(org.codehaus.groovy:groovy-all)
+BuildRequires:  mvn(org.codehaus.mojo:javacc-maven-plugin)
+BuildRequires:  mvn(org.ow2.asm:asm)
+BuildRequires:  mvn(org.ow2.asm:asm-analysis)
+BuildRequires:  mvn(org.ow2.asm:asm-commons)
+BuildRequires:  mvn(org.ow2.asm:asm-tree)
+BuildRequires:  mvn(org.ow2.asm:asm-util)
+BuildRequires:  mvn(org.sonatype.oss:oss-parent:pom:)
+BuildRequires:  mvn(oro:oro)
+BuildRequires:  mvn(xalan:xalan)
+BuildRequires:  mvn(xerces:xercesImpl)
 
-BuildArch:      noarch
 
 %description
 Cobertura is a free Java tool that calculates the percentage of code
@@ -62,71 +61,50 @@ This package contains the API documentation for %{name}.
 
 %prep
 %setup -q
-%patch0 -p1
-%patch1 -p1
 
 cp %{SOURCE3} LICENSE-ASL-1.1
 cp %{SOURCE4} LICENSE-ASL-2.0
 
-sed -i 's/\r//' ChangeLog COPYING COPYRIGHT README
+%pom_remove_plugin :buildversion-plugin cobertura
+%pom_remove_plugin :maven-java-formatter-plugin cobertura
+%pom_remove_plugin :findbugs-maven-plugin cobertura
+%pom_remove_plugin :maven-pmd-plugin cobertura
 
-%build
-pushd lib
-  ln -s $(build-classpath jaxen) .
-  ln -s $(build-classpath jdom) .
-  ln -s $(build-classpath junit) .
-  ln -s $(build-classpath log4j) .
-  ln -s $(build-classpath objectweb-asm/asm-all) .
-  ln -s $(build-classpath oro) .
-  ln -s $(build-classpath xalan-j2) .
-  ln -s $(build-classpath tomcat-servlet-3.0-api) servlet-api.jar
-  ln -s $(build-classpath apache-commons-cli) commons-cli.jar
-  pushd xerces
-    ln -s $(build-classpath xalan-j2) .
-    ln -s $(build-classpath xml-commons-jaxp-1.3-apis) .
-  popd
-popd
-
-build-jar-repository antLibrary/common groovy
-
-export CLASSPATH=$(build-classpath objectweb-asm/asm-all commons-cli antlr junit)
-# Tests fail, TODO: fix and enable them
-%ant -Djetty.dir=. -Dlib.dir=. compile jar javadoc
+# Full Jetty 6 is not needed, only servlet API
+%pom_remove_dep org.mortbay.jetty: cobertura
+%pom_add_dep javax.servlet:javax.servlet-api:3.1.0 cobertura
 
-%install
-# jars
-install -d -m 755 %{buildroot}%{_javadir}
-install -p -m 644 %{name}.jar %{buildroot}%{_javadir}/%{name}.jar
-(cd %{buildroot}%{_javadir} && ln -s %{name}.jar %{name}-runtime.jar)
+# com.sun:tools shoud not be system-scoped
+%pom_remove_dep com.sun:tools cobertura
+%pom_add_dep com.sun:tools cobertura
 
-# pom
-install -d -m 755 %{buildroot}%{_mavenpomdir}
-install -p -m 644 %{SOURCE1} %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
-install -p -m 644 %{SOURCE2} %{buildroot}%{_mavenpomdir}/JPP-%{name}-runtime.pom
+%mvn_alias ":{*}" cobertura:@1
 
-# depmap
-%add_maven_depmap JPP-%{name}.pom %{name}.jar -a "%{name}:%{name}"
-%add_maven_depmap JPP-%{name}-runtime.pom %{name}-runtime.jar -a "%{name}:%{name}-runtime"
+%build
+# Tests require Jetty 6
+%mvn_build -f
+
+%install
+%mvn_install
 
 # ant config
 install -d -m 755  %{buildroot}%{_sysconfdir}/ant.d
 cat > %{buildroot}%{_sysconfdir}/ant.d/%{name} << EOF
-ant cobertura junit log4j oro xerces-j2
+ant cobertura/cobertura junit log4j oro xerces-j2
 EOF
 
-# javadoc
-install -d -m 755 %{buildroot}%{_javadocdir}/%{name}
-cp -rp build/api/* %{buildroot}%{_javadocdir}/%{name}
-
 %files -f .mfiles
-%doc ChangeLog COPYING COPYRIGHT README LICENSE-ASL-1.1 LICENSE-ASL-2.0
+%doc README.markdown
+%license LICENSE.txt LICENSE-ASL-1.1 LICENSE-ASL-2.0
 %config %{_sysconfdir}/ant.d/%{name}
 
-%files javadoc
-%doc COPYING COPYRIGHT LICENSE-ASL-1.1 LICENSE-ASL-2.0
-%{_javadocdir}/%{name}
+%files javadoc -f .mfiles-javadoc
+%license LICENSE.txt LICENSE-ASL-1.1 LICENSE-ASL-2.0
 
 %changelog
+* Wed Feb  4 2015 Mikolaj Izdebski <mizdebsk at redhat.com> - 2.0.3-1
+- Update to upstream version 2.0.3
+
 * Wed Feb  4 2015 Mikolaj Izdebski <mizdebsk at redhat.com> - 2.0-1
 - Update to upstream version 2.0
 
diff --git a/create-tarball.sh b/create-tarball.sh
index efd3fcd..7131155 100755
--- a/create-tarball.sh
+++ b/create-tarball.sh
@@ -1,23 +1,15 @@
 #!/bin/bash
 
-if [ $# -ne 1 ]; then
-    echo "Usage: ./create-tarball.sh VERSION"
+if [ $# -ne 2 ]; then
+    echo "Usage: ./create-tarball.sh VERSION COMMIT"
     exit 1
 fi
 
 VERSION=${1}
+COMMIT=${2}
 NAME="cobertura"
 
-wget http://downloads.sourceforge.net/${NAME}/${NAME}-${VERSION}-src.tar.bz2
-tar xvf ${NAME}-${VERSION}-src.tar.bz2
-rm ${NAME}-${VERSION}-src.tar.bz2
-# remove unneeded stuff
-find ./${NAME}-${VERSION}/lib/ -type f -delete
-find ./${NAME}-${VERSION}/antLibrary/common -type f -delete
-# this directory contains some files under non-free license (#850481)
-# these files are probably not copyrightable, but since we don't need them,
-# we can remove them
-find ./${NAME}-${VERSION}/etc/dtds/ -type f -delete
-
-tar czvf ${NAME}-${VERSION}-clean.tar.gz ./${NAME}-${VERSION}
-
+rm -rf cobertura.git
+git clone --bare git://github.com/cobertura/cobertura.git
+git --git-dir cobertura.git archive ${COMMIT} --prefix ${NAME}-${VERSION}/ | lbzip2 -u >${NAME}-${VERSION}.tar.bz2
+rm -rf cobertura.git
diff --git a/sources b/sources
index a3784de..8697021 100644
--- a/sources
+++ b/sources
@@ -1,5 +1,3 @@
 92afa66b413bb09a3bbd590091a836f5  LICENSE-1.1.txt
-54c42b3007a55dcd074587582a86940d  cobertura-2.0.pom
-af1a5d79404261b6d516390e8815313b  cobertura-runtime-2.0.pom
-8b5987cc7dec47d256e9a93d82b240d6  cobertura-2.0-clean.tar.gz
 3b83ef96387f14655fc854ddc3c6bd57  LICENSE-2.0.txt
+901e62324f991d91931127a171143051  cobertura-2.0.3.tar.bz2


More information about the scm-commits mailing list