Sophie

Sophie

distrib > Arklinux > devel > i586 > media > main-src > by-pkgid > 22994d8d42352d973bddc9ebe8b2696d > files > 3

commons-codec-1.3-3ark.src.rpm

Name: commons-codec
Version: 1.3
Release: 3ark
Summary: Implementations of common encoders and decoders such as Base64 and Hex
URL: http://jakarta.apache.org/commons/codec
Source: %name-%version-src.tar.bz2
Patch: commons-codec-1.3-build.patch
License: GPL
Group: Libraries/Java
BuildRoot: %_tmppath/%name-root
BuildRequires: ecj ant toolsjar

%description
Codec was formed as an attempt to focus development effort on one definitive
implementation of the Base64 encoder. At the time of Codec's proposal, there
were approximately 34 different Java classes that dealt with Base64 encoding
spread over the Foundation's CVS repository.

Developers in the Jakarta Tomcat project had implemented an original version
of the Base64 codec which had been copied by the Commons HttpClient and Apache
XML project's XML-RPC subproject.

After almost one year, the two forked versions of Base64 had significantly
diverged from one another. XML-RPC had applied numerous fixes and patches
which were not applied to the Commons HttpClient Base64. Different subprojects
had differing implementations at various levels of compliance with the
RFC 2045.

Out of that confusing duplication of effort sprang this simple attempt to
encourage code reuse among various projects.
While this package contains a abstract framework for the creation of encoders
and decoders, Codec itself is primarily focused on providing functional
utilities for working with common encodings.

%package precompiled
Summary: Precompiled binaries for %name
Group: Libraries/Java
Requires: %name = %version-%release

%description precompiled
%summary

%package        javadoc
Summary:        Javadoc for %{name}
Group:          Libraries/Java
Requires: %name = %version-%release

%description    javadoc
Javadoc for %{name}.

%prep
%setup -q -c %name-%version
%patch -p1 -b .build~

%build
ant dist javadoc
cd dist
gcj-dbtool -n %name.db 128
for i in *.jar; do
	aot-compile $i lib${i/.jar/.so} "$RPM_OPT_FLAGS -fPIC"
	gcj-dbtool -f %name.db $i %_libdir/lib${i/.jar/.so}
done

%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%_javadir $RPM_BUILD_ROOT`gcj-dbtool -p %_libdir`.d
install -c -m 644 dist/*.jar $RPM_BUILD_ROOT%_javadir
install -c -m 755 dist/lib*.so* $RPM_BUILD_ROOT%_libdir
install -c -m 644 dist/*.db $RPM_BUILD_ROOT`gcj-dbtool -p %_libdir`.d
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
cp -a dist/docs/api/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}

%files
%defattr(-,root,root)
%_javadir/*

%files javadoc
%defattr(-,root,root)
%_javadocdir/%name-%version

%files precompiled
%defattr(-,root,root)
%_libdir/*
%_libdir/gcj-*/*/*.db

%post precompiled
%_bindir/rebuild-gcj-db %_libdir

%postun precompiled
%_bindir/rebuild-gcj-db %_libdir

%clean
rm -rf $RPM_BUILD_ROOT $RPM_BUILD_DIR/%name-%version

%changelog
* Sat Aug 19 2006 Bernhard Rosenkraenzer <bero@arklinux.org> 1.3-3ark
- gcj 4.2

* Fri Jan 20 2006 Bernhard Rosenkraenzer <bero@arklinux.org> 1.3-2ark
- gcj 4.1
- Fix classmap db

* Mon Jul 18 2005 Bernhard Rosenkraenzer <bero@arklinux.org> 1.3-1ark
- initial RPM