packages java-cpptasks.spec
      Pages: < 1 >  DOWNLOAD      
%define        antver    1.0
%define        antlib    %(echo $ANT_HOME/lib)
Name:          java-cpptasks
Version:       1.0b5
Release:       3mamba
Summary:       Compile and link task
Group:         Development/Libraries/Java
Vendor:        openmamba
Distribution:  openmamba
Packager:      gil <puntogil@...>
URL:           http://ant-contrib.sourceforge.net/
Source0:       http://dfn.dl.sourceforge.net/sourceforge/ant-contrib/cpptasks-%{version}.tar.gz
Source1:       java-cpptasks-antlib.xml
Source2:       http://mirrors.ibiblio.org/pub/mirrors/maven2/ant-contrib/cpptasks/%{version}/cpptasks-%{version}.pom
License:       Apache Software License 2.0
BuildRequires: apache-ant
BuildRequires: apache-ant-junit
BuildRequires: apache-ant-nodeps
BuildRequires: apache-ant-trax
BuildRequires: jakarta-bcel
BuildRequires: java-junit3
BuildRequires: jpackage-utils
BuildRequires: sun-java
BuildRequires: xerces-j2
Requires:      apache-ant
Requires:      jakarta-bcel
Requires:      java-junit3
Requires:      jpackage-utils
Requires:      xerces-j2
BuildRoot:     %{_tmppath}/%{name}-%{version}-root

%description
The Ant-Contrib project is a collection of tasks (and at one point maybe types and
other tools) for Apache Ant.

This task can compile various source languages and produce executables, shared libraries 
(aka DLL's) and static libraries. Compiler adaptors are currently available for several 
C/C++ compilers, FORTRAN, MIDL and Windows Resource files.

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

%description javadoc
The Ant-Contrib project is a collection of tasks (and at one point maybe types and
other tools) for Apache Ant.

This package contains javadoc for %{name}.


%package manual
Group:          Documentation
Summary:        Manual for %{name}

%description manual
The Ant-Contrib project is a collection of tasks (and at one point maybe types and
other tools) for Apache Ant.

This package contains documentation for %{name}.

%prep

%setup -q -n cpptasks-%{version}

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

%build

export CLASSPATH=$(build-classpath xerces-j2 ant/ant-junit ant/ant-nodeps ant/ant-trax junit-3.8.2):target/classes
mkdir -p build/classes/net/sf/antcontrib/cpptasks
install -m 644 %{S:1} build/classes/net/sf/antcontrib/cpptasks/antlib.xml
ant jars javadocs

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

mkdir -p %{buildroot}%{antlib} \
	%{buildroot}%{_javadir} \
	%{buildroot}%{_datadir}/maven2/poms

install -pm 644 target/lib/cpptasks.jar \
      %{buildroot}%{_javadir}/cpptasks-%{antver}.jar

install -m 644 %{S:2} %{buildroot}%{_datadir}/maven2/poms/JPP-cpptasks.pom
%add_to_maven_depmap ant-contrib cpptasks %{version} JPP cpptasks

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

mkdir -p %{buildroot}%{_javadocdir}/cpptasks-%{antver}
cp -pr target/javadocs/* %{buildroot}%{_javadocdir}/cpptasks-%{antver}
ln -s cpptasks-%{antver} %{buildroot}%{_javadocdir}/cpptasks
rm -rf site/apidocs

for i in `find site/* -type f`; do
	perl -pi -e 's/\r$//g' $i
done

perl -pi -e 's/\r$//g' LICENSE NOTICE

# %{_bindir}/aot-compile-rpm

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

%files
%defattr(-,root,root)
%{antlib}/cpptasks-%{antver}.jar
%{antlib}/cpptasks.jar
%{_javadir}/cpptasks-%{antver}.jar
%{_javadir}/cpptasks.jar
%{_datadir}/maven2/poms
%{_mavendepmapfragdir}
%doc LICENSE NOTICE

%files javadoc
%defattr(-,root,root)
%{_javadocdir}/cpptasks-%{antver}
%{_javadocdir}/cpptasks

%files manual
%defattr(-,root,root)
%doc site

%changelog
* Thu Nov 04 2010 gil <puntogil@...> 1.0b5-3mamba
- rebuilt devel

* Fri Oct 23 2009 gil <puntogil@...> 1.0b5-2mamba
- add maven pom

* Wed Mar 04 2009 gil <puntogil@...> 1.0b5-1mamba
- package created by autospec