Sophie

Sophie

distrib > Arklinux > devel > x86_64 > by-pkgid > 619c50ebd78849ba5abe37d174265387 > files > 3

commons-validator-1.2.0-1ark.src.rpm

Name: commons-validator
Version: 1.2.0
Release: 1ark
Summary: Data integrity validator
URL: http://jakarta.apache.org/commons/validator/
Source: %name-%version-src.tar.bz2
Source1: %name-1.1.3-conf.tar.bz2
License: Apache
Group: Libraries/Java
BuildRoot: %_tmppath/%name-root
BuildRequires: ecj ant toolsjar jakarta-oro
Requires: jakarta-oro

%description
A common issue when receiving data either electronically or from user input is
verifying the integrity of the data. This work is repetitive and becomes even
more complicated when different sets of validation rules need to be applied to
the same set of data based on locale. Error messages may also vary by locale.
This package addresses some of these issues to speed development and
maintenance of validation rules. 

In order to use the Validator, the following basic steps are required: 
* Create a new instance of the org.apache.commons.validator.Validator class.
  Currently Validator instances may be safely reused if the current
  ValidatorResources are the same, as long as you have completed any previous
  validation, and you do not try to utilize a particular Validator instance
  from more than one thread at a time. 
* Add any resources needed to perform the validations, such as the JavaBean to
  validate. 
* Call the validate method on org.apache.commons.validator.Validator.

%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 -a 1
touch RELEASE-NOTES.readme

%build
export CLASSPATH=%_javadir/jakarta-oro.jar:%_javadir/ecj.jar
ant dist
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
cd dist
install -c -m 644 *.jar $RPM_BUILD_ROOT%_javadir
install -c -m 755 lib*.so* $RPM_BUILD_ROOT%_libdir
install -c -m 644 *.db $RPM_BUILD_ROOT`gcj-dbtool -p %_libdir`.d
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
cp -pr 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
* Fri Jan 20 2006 Bernhard Rosenkraenzer <bero@arklinux.org> 1.2.0-1ark
- 1.2.0
- gcj 4.1
- Fix gcj classmap

* Fri Sep 23 2005 Bernhard Rosenkraenzer <bero@arklinux.org> 1.1.4-1ark
- initial RPM