packages java-patricia-trie.spec
      Pages: < 1 >  DOWNLOAD      
Name:          java-patricia-trie
Version:       0.2
Release:       1mamba
Summary:       Practical Algorithm to Retrieve Information Coded in Alphanumeric
Group:         Development/Libraries/Java
Vendor:        openmamba
Distribution:  openmamba
Packager:      gil <puntogil@...>
URL:           http://code.google.com/p/patricia-trie/
# svn export -r108 http://patricia-trie.googlecode.com/svn/trunk@108 patricia-trie
# tar czf patricia-trie-0.2-src-svn.tar.gz patricia-trie
Source0:       patricia-trie-%{version}-src-svn.tar.gz
License:       Apache Software License 2.0
BuildRequires: apache-ant
BuildRequires: java-junit48
BuildRequires: jpackage-utils
Requires:      jpackage-utils
BuildRoot:     %{_tmppath}/%{name}-%{version}-root

%description
This is a general purpose implementation of a PATRICIA Trie in Java.
It implements the SortedMap interface and integrates well with the
Java Collections Framework. You can use any kind of Objects for Keys as
long as they can be accessed bit-wise. You can find examples in the
wiki and there is a blog post with some additional information about the
implementation.

The PATRICIA Trie is also known under the names Radix and Crit Bit Tree. 

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

%description javadoc
PATRICIA Trie - Java prefix tree library.

This package contains Javadoc for %{name}.

%prep
%setup -q -n patricia-trie

for j in $(find . -name "*.jar" -o -name "*.class"); do
  rm -rf $j
done

ln -sf $(build-classpath junit48) lib/test/java/junit-4.5.jar

%build

ant

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

mkdir -p %{buildroot}%{_javadir}
install -pm 644 dist/patricia-trie-%{version}/patricia-trie-%{version}.jar \
  %{buildroot}%{_javadir}/patricia-trie-%{version}.jar

(
  cd %{buildroot}%{_javadir}
  for jar in *-%{version}.jar; do
    ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`
  done
)

mkdir -p %{buildroot}%{_javadocdir}/patricia-trie
cp -pr dist/patricia-trie-%{version}/api/* %{buildroot}%{_javadocdir}/patricia-trie

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

%files
%defattr(-,root,root)
%{_javadir}/patricia-trie-%{version}.jar
%{_javadir}/patricia-trie.jar
%doc dist/patricia-trie-%{version}/*.txt

%files javadoc
%defattr(-,root,root)
%{_javadocdir}/patricia-trie

%changelog
* Sat Jan 08 2011 gil <puntogil@...> 0.2-1mamba
- package created by autospec