From d5952b4c28b5be4c0b03391c360701e24948297e Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Fri, 21 Jun 2013 12:18:38 +0200 Subject: [PATCH] Update to current packaging guidelines Fix test failures --- .gitignore | 1 + jdependency-asm.patch | 11 +++++++ jdependency.spec | 75 +++++++++++-------------------------------- sources | 2 +- 4 files changed, 32 insertions(+), 57 deletions(-) create mode 100644 jdependency-asm.patch diff --git a/.gitignore b/.gitignore index 77fc27d..3e9f688 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /tcurdt-jdependency-jdependency-0.6-0-g165c94a.tar.gz /tcurdt-jdependency-jdependency-0.7-0-g0d9d058.tar.gz +/jdependency-0.7.tar.gz diff --git a/jdependency-asm.patch b/jdependency-asm.patch new file mode 100644 index 0000000..eb7327b --- /dev/null +++ b/jdependency-asm.patch @@ -0,0 +1,11 @@ +--- src/main/java/org/vafer/jdependency/utils/DependencyUtils.java~ 2011-02-10 00:12:41.000000000 +0100 ++++ src/main/java/org/vafer/jdependency/utils/DependencyUtils.java 2013-06-21 12:24:40.238864615 +0200 +@@ -66,7 +66,7 @@ + + public static Set getDependenciesOfClass( final InputStream pInputStream ) throws IOException { + final DependenciesClassAdapter v = new DependenciesClassAdapter(); +- new ClassReader( pInputStream ).accept( v, 0 ); ++ new ClassReader( pInputStream ).accept( v, ClassReader.EXPAND_FRAMES ); + final Set depNames = v.getDependencies(); + return depNames; + } diff --git a/jdependency.spec b/jdependency.spec index 2a1e631..09d3d6b 100644 --- a/jdependency.spec +++ b/jdependency.spec @@ -1,88 +1,51 @@ -%global githash g0d9d058 -%global foldhash 5e52ede - Name: jdependency Version: 0.7 -Release: 7%{?dist} +Release: 8%{?dist} Summary: This project provides an API to analyse class dependencies - -Group: Development/Libraries License: ASL 2.0 -URL: http://github.com/tcurdt/jdependency -# wget http://github.com/tcurdt/jdependency/tarball/jdependency-0.7 -Source0: tcurdt-jdependency-jdependency-%{version}-0-%{githash}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +URL: http://github.com/tcurdt/%{name} +BuildArch: noarch -BuildArch: noarch +Source0: http://github.com/tcurdt/%{name}/archive/%{name}-%{version}.tar.gz +# Upstream uses different version of objectweb-asm than Fedora has. +Patch0: %{name}-asm.patch -BuildRequires: maven-local -BuildRequires: maven-compiler-plugin -BuildRequires: maven-install-plugin -BuildRequires: maven-jar-plugin -BuildRequires: maven-javadoc-plugin -BuildRequires: maven-resources-plugin -BuildRequires: maven-surefire-plugin - -BuildRequires: jpackage-utils -BuildRequires: java-devel +BuildRequires: maven-local BuildRequires: objectweb-asm BuildRequires: apache-commons-io -Requires: objectweb-asm >= 3.2 -Requires: apache-commons-io -Requires: java - %description -jdependency is small library that helps you analyze class level +%{name} is small library that helps you analyze class level dependencies, clashes and missing classes. %package javadoc -Group: Documentation Summary: API documentation for %{name} -Requires: jpackage-utils %description javadoc %{summary}. %prep -%setup -q -n tcurdt-jdependency-%{foldhash} +%setup -q -n %{name}-%{name}-%{version} +%patch0 +%mvn_file : %{name} %build -mvn-rpmbuild -Dmaven.test.failure.ignore=true \ - install javadoc:javadoc +%mvn_build %install -# Jar -mkdir -p %{buildroot}%{_javadir} -install -Dpm 644 target/%{name}-%{version}.jar \ - %{buildroot}%{_javadir}/%{name}.jar +%mvn_install - -# Javadoc -mkdir -p %{buildroot}%{_javadocdir}/%{name} -cp -pr target/site/api*/* %{buildroot}%{_javadocdir}/%{name}/ -rm -rf target/site/api* - - -# poms -install -Dpm 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP-jdependency.pom - -%add_maven_depmap JPP-%{name}.pom %{name}.jar - -%clean -rm -rf %{buildroot} - -%files -%{_javadir}/* -%{_mavenpomdir}/* -%{_mavendepmapfragdir}/* +%files -f .mfiles %doc LICENSE.txt README.md -%files javadoc -%{_javadocdir}/%{name} +%files javadoc -f .mfiles-javadoc %doc LICENSE.txt %changelog +* Fri Jun 21 2013 Mikolaj Izdebski - 0.7-8 +- Update to current packaging guidelines +- Fix test failures + * Mon Apr 29 2013 Mikolaj Izdebski - 0.7-7 - Remove unneeded BR: maven-idea-plugin diff --git a/sources b/sources index 1451896..720a0a8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -8d951c6f221429ac00181695b761ea4b tcurdt-jdependency-jdependency-0.7-0-g0d9d058.tar.gz +0e1c381761ed81a033d0d8b635657298 jdependency-0.7.tar.gz