packages java-csg-bytecode.spec
      Pages: < 1 >  DOWNLOAD      
%define        javahome /usr/lib/jvm/java
Name:          java-csg-bytecode
Version:       1.0.0
Release:       2mamba
Summary:       CSG Bytecode Package
Group:         Development/Libraries/Java
Vendor:        openmamba
Distribution:  openmamba
Packager:      gil <puntogil@...>
URL:           http://www.claritysys.com/products/bytecode/
Source:        http://www.claritysys.com/products/bytecode/csg-bytecode-%{version}-src.zip
License:       Apache Software License 2.0, BSD
BuildRequires: apache-ant
BuildRequires: java-csg-util
BuildRequires: java-openjdk
BuildRequires: java-junit3
BuildRequires: jpackage-utils
Requires:      java-csg-util
Requires:      jpackage-utils
BuildRoot:     %{_tmppath}/%{name}-%{version}-root

%description
This is a package for reading and writing Java .class files,
such as for building a compiler or disassembler. It includes a
disassembler as well.

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

%description javadoc
CSG Bytecode Package.

This package contains javadoc for %{name}.

%prep

%setup -q -n csg-bytecode-%{version}-src

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

pushd lib
  ln -sf $(build-classpath csg-util) csg-util.jar
  ln -sf $(build-classpath junit-3.8.2) junit.jar
popd

%build

export JAVA_HOME=%javahome
export CLASSPATH=$(build-classpath csg-util junit-3.8.2)
ant -DENV.CSG_SHARED_JARS=lib jar javadoc test

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

mkdir -p %{buildroot}%{_javadir}

install -m 644 build/csg-bytecode.jar \
  %{buildroot}%{_javadir}/csg-bytecode-%{version}.jar

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

mkdir -p %{buildroot}%{_javadocdir}/csg-bytecode-%{version}
cp -pr build/doc/api/* %{buildroot}%{_javadocdir}/csg-bytecode-%{version}
ln -s csg-bytecode-%{version} %{buildroot}%{_javadocdir}/csg-bytecode

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

%files
%defattr(-,root,root)
%{_javadir}/csg-bytecode-%{version}.jar
%{_javadir}/csg-bytecode.jar

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

%changelog
* Mon Mar 21 2011 gil <puntogil@...> 1.0.0-2mamba
- rebuilt in devel
- rebuilt with java-openjdk support

* Sat Jan 09 2010 gil <puntogil@...> 1.0.0-1mamba
- package created by autospec