packages java-refactory.spec
      Pages: < 1 >  DOWNLOAD      
%define        javahome   /usr/lib/jvm/java
Name:          java-refactory
Version:       2.9.19
Release:       5mamba
Summary:       a refactoring tool for the Java programming language
Group:         Development/Libraries/Java
Vendor:        openmamba
Distribution:  openmamba
Packager:      gil <puntogil@...>
URL:           http://jrefactory.sourceforge.net/
Source0:       http://garr.dl.sourceforge.net/sourceforge/jrefactory/jrefactory-%{version}-full.zip
#Source1:       jrefactory.script
Patch:         java-refactory-2.9.19-savejpg.patch
License:       Apache License Version 1.1, BSD, GPL
BuildRequires: apache-ant
BuildRequires: jakarta-bcel
BuildRequires: javacc
BuildRequires: java-dom4j
#BuildRequires: java-findbugs
BuildRequires: java-jaxen
BuildRequires: java-openjdk
BuildRequires: java-saxpath
BuildRequires: java-sun-jai
BuildRequires: jpackage-utils
BuildRequires: xalan-j2
Requires:      jpackage-utils
# package com.symantec.itools.vcafe.openapi package com.elixirtech.fx
# http://www.elixirtech.com/download/NetBeans.html
BuildRoot:     %{_tmppath}/%{name}-%{version}-root

%description
A refactoring tool for the Java programming language, it includes the
JavaStyle pretty printer,a UML java class diagram viewer, a coding
standards checker and computes program metrics.Plugins for jEdit,
Netbeans, JBuilder and other IDEs available.

%package tools
Group:	  Development/Libraries/Java
Summary:  %{name} tools

%description tools
A refactoring tool for the Java programming language, it includes the
JavaStyle pretty printer,a UML java class diagram viewer, a coding
standards checker and computes program metrics.Plugins for jEdit,
Netbeans, JBuilder and other IDEs available..

This package contains %{name} tools.

%package javadoc
Group:	  Documentation
Summary:  Javadoc for %{name}

%description javadoc
A refactoring tool for the Java programming language, it includes the
JavaStyle pretty printer,a UML java class diagram viewer, a coding
standards checker and computes program metrics.Plugins for jEdit,
Netbeans, JBuilder and other IDEs available.

This package contains javadoc for %{name}

%prep

%setup -q -c -n %{name}-%{version}
mv settings/.Refactory settings/sample
%patch -p1

#rm -f src/org/acm/seguin/pmd/swingui/PMDLookAndFeel.java

for j in $(find . -name "*.jar"); do
  mv $j $j.no
done

pushd jar
  ln -sf $(build-classpath bcel) bcel.jar
# required fundbugs 0.x
# ln -sf $(build-classpath findbugs) findbugs.jar
  mv findbugs.jar.no findbugs.jar
# ln -sf $(build-classpath findbugs) findbugsGUI.jar
  mv findbugsGUI.jar.no findbugsGUI.jar
# ln -sf $(build-classpath findbugs) coreplugin.jar
  mv coreplugin.jar.no coreplugin.jar
  ln -sf $(build-classpath saxpath) saxpath-1.0-fcs.jar
  ln -sf $(build-classpath xalan-j2) xalan.jar
  ln -sf $(build-classpath ant) ant.jar
  ln -sf $(build-classpath jaxen) jaxen-core-1.0-fcs.jar
  ln -sf $(build-classpath dom4j) dom4j-full.jar
popd


# remove classes that don't build without said jarfiles
#find -name '*.java' | xargs grep -l '^import \(edu\|org\.\(jaxen\|saxpath\)\)\.' | xargs rm

%build
perl -p -i -e 's|^Class-Path:.*||' src/meta-inf/refactory.mf
export JAVA_HOME=%javahome
export CLASSPATH=$(build-classpath jai/jai ant)
ant jar javadocs

%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"

mkdir -p %{buildroot}%{_javadir}/jrefactory-tools
install -m 644 ant.build/lib/jrefactory.jar \
  %{buildroot}%{_javadir}/jrefactory-%{version}.jar

(
  cd %{buildroot}%{_javadir}
  for jar in *-%{version}.jar; do
    ln -sf ${jar} ${jar/-%{version}/}
  done
)

install -m 644 ant.build/lib/PrettyPrinter-%{version}.jar \
  %{buildroot}%{_javadir}/jrefactory-tools/PrettyPrinter-%{version}.jar
install -m 644 ant.build/lib/jrefactory_x.jar \
  %{buildroot}%{_javadir}/jrefactory-tools/jrefactory_x-%{version}.jar
install -m 644 ant.build/lib/JRefactoryModule.jar \
  %{buildroot}%{_javadir}/jrefactory-tools/JRefactoryModule-%{version}.jar

(
  cd %{buildroot}%{_javadir}/jrefactory-tools
  for jar in *-%{version}.jar; do
    ln -sf ${jar} ${jar/-%{version}/}
  done
)

#mkdir -p %{buildroot}%{_bindir}
#install -pm 755 %{SOURCE1} %{buildroot}%{_bindir}/jrefactory

mkdir -p %{buildroot}%{_javadocdir}/jrefactory-%{version}
cp -pr  docs/api/* %{buildroot}%{_javadocdir}/jrefactory-%{version}
ln -s jrefactory-%{version} %{buildroot}%{_javadocdir}/jrefactory
rm -rf docs/api

#%{_bindir}/aot-compile-rpm

%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"

%files
%defattr(-,root,root)
#%{_bindir}/jrefactory
%{_javadir}/jrefactory-%{version}.jar
%{_javadir}/jrefactory.jar
%doc docs/{*.html,*.jpg,*.gif,*.txt} settings/sample

%files tools
%defattr(-,root,root)
%{_javadir}/jrefactory-tools/PrettyPrinter-%{version}.jar
%{_javadir}/jrefactory-tools/PrettyPrinter.jar
%{_javadir}/jrefactory-tools/JRefactoryModule-%{version}.jar
%{_javadir}/jrefactory-tools/JRefactoryModule.jar
%{_javadir}/jrefactory-tools/jrefactory_x-%{version}.jar
%{_javadir}/jrefactory-tools/jrefactory_x.jar

%files  javadoc
%defattr(-,root,root)
%{_javadocdir}/jrefactory-%{version}
%{_javadocdir}/jrefactory

%changelog
* Sun Mar 27 2011 gil <puntogil@...> 2.9.19-5mamba
- rebuilt with java-openjdk support

* Fri Nov 05 2010 gil <puntogil@...> 2.9.19-4mamba
- rebuilt devel

* Mon Mar 29 2010 gil <puntogil@...> 2.9.19-3mamba
- removed scripts

* Mon Mar 29 2010 gil <puntogil@...> 2.9.19-2mamba
- edit spec file

* Tue Mar 10 2009 gil <puntogil@...> 2.9.19-1mamba
- package created by autospec