install under directory recognized by build-classpath [release 1.3.1-2mamba;Sun Apr 06 2014]

This commit is contained in:
Silvan Calarco 2024-01-05 20:28:17 +01:00
parent 7d2469d535
commit 647848549b
5 changed files with 178 additions and 0 deletions

View File

@ -1,2 +1,5 @@
# apache-commons-validator
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.

View File

@ -0,0 +1,11 @@
--- commons-validator-1.3.1-src/build.xml 2006-11-28 23:31:49.000000000 +0100
+++ commons-validator-1.3.1-src/build.xml-gil 2009-04-12 22:19:15.000000000 +0200
@@ -194,7 +194,7 @@
</target>
- <target name="prepare" depends="init,download-dependencies"
+ <target name="prepare" depends="init"
description="Prepare build directory">
<mkdir dir="${build.home}"/>
<mkdir dir="${build.home}/classes"/>

View File

@ -0,0 +1,8 @@
-- Jakarta commons-validator DTD catalog --
-- JPackage Project <http://www.jpackage.org/> --
PUBLIC "-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.0//EN"
validator_1_0.dtd
PUBLIC "-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.0.1//EN"
validator_1_0_1.dtd

View File

@ -0,0 +1,145 @@
Name: apache-commons-validator
Version: 1.3.1
Release: 2mamba
Summary: Commons Validator Package
Group: Development/Libraries/Java
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://commons.apache.org/validator/
Source0: http://archive.apache.org/dist/commons/validator/source/commons-validator-%{version}-src.tar.gz
# svn export http://svn.apache.org/repos/asf/commons/proper/validator/tags/VALIDATOR_1_3_1/conf/
# tar cjf apache-commons-validator-1.3.1-conf.tar.gz conf
Source1: apache-commons-validator-1.3.1-conf.tar.gz
Source2: apache-commons-validator-1.3.1.catalog
Patch0: jakarta-commons-validator-1.1.4-build.patch
Patch1: apache-commons-validator-1.3.1-build_xml.patch
License: Apache License 2.0
BuildRequires: apache-ant
BuildRequires: apache-commons-beanutils
BuildRequires: apache-commons-digester18
BuildRequires: jakarta-commons-collections
BuildRequires: jakarta-commons-logging
BuildRequires: jakarta-oro
BuildRequires: java-gcj-compat
BuildRequires: java-junit3
BuildRequires: jpackage-utils
BuildRequires: java-rhino
BuildRequires: xml-commons-apis
Requires: apache-commons-beanutils
Requires: apache-commons-digester18
Requires: jakarta-commons-collections
Requires: jakarta-commons-logging
Requires: jakarta-oro
Requires: jpackage-utils
Requires: xml-commons-apis
Obsoletes: jakarta-commons-validator
Provides: jakarta-commons-validator
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%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.
%package javadoc
Group: Documentation
Summary: Javadoc for %{name}
%description javadoc
Jakarta Commons Validator Package
This package contains javadoc for %{name}.
%prep
%setup -q -n commons-validator-%{version}-src -a 1
for j in $(find . -name "*.jar"); do
mv $j ${j}.no
done
cp -p %{S:2} conf/share/catalog
#%patch0 -p1
# for system libs
%patch1 -p1
mkdir -p lib
pushd lib
ln -sf $(build-classpath xml-commons-apis)
ln -sf $(build-classpath oro)
ln -sf $(build-classpath junit-3.8.2 )
ln -sf $(build-classpath commons-logging)
ln -sf $(build-classpath digester/commons-digester18)
ln -sf $(build-classpath beanutils/commons-beanutils)
ln -sf $(build-classpath rhino)
ln -sf $(build-classpath commons-collections)
popd
%build
export CLASSPATH=$(build-classpath xml-commons-apis oro junit-3.8.2 \
jakarta-commons-logging digester/commons-digester18 beanutils/commons-beanutils rhino jakarta-commons-collections)
ant -Dbuild.sysclasspath=first \
-Ddojo_custom_rhino.jar=$(build-classpath rhino) \
test dist
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
mkdir -p %{buildroot}%{_javadir}/validator
install -p -m 644 dist/commons-validator-%{version}.jar \
%{buildroot}%{_javadir}/%{name}-%{version}.jar
(
cd %{buildroot}%{_javadir}
for jar in *-%{version}*; do
ln -sf ${jar} `echo $jar| sed "s|apache-||g"`
done
)
(
cd %{buildroot}%{_javadir}
for jar in *-%{version}*; do
ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`
done
)
mkdir -p %{buildroot}%{_datadir}/sgml/%{name}
install -pm 644 conf/share/*.dtd \
%{buildroot}%{_datadir}/sgml/%{name}
install -pm 644 conf/share/catalog \
%{buildroot}%{_datadir}/sgml/%{name}
mkdir -p %{buildroot}%{_javadocdir}/%{name}-%{version}
cp -pr dist/docs/apidocs/* %{buildroot}%{_javadocdir}/%{name}-%{version}
#%{_bindir}/aot-compile-rpm
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%files
%defattr(-,root,root)
%{_javadir}/commons-validator-%{version}.jar
%{_javadir}/commons-validator.jar
%{_javadir}/apache-commons-validator-%{version}.jar
%{_javadir}/apache-commons-validator.jar
%{_datadir}/sgml/%{name}
%doc dist/LICENSE.txt
%files javadoc
%defattr(-,root,root)
%{_javadocdir}/%{name}-%{version}
%doc dist/NOTICE.txt dist/RELEASE-NOTES.txt
%doc dist/commons-validator-%{version}*.js
%changelog
* Sun Apr 06 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 1.3.1-2mamba
- install under directory recognized by build-classpath
* Sun Apr 12 2009 gil <puntogil@libero.it> 1.3.1-1mamba
- update to 1.3.1
- renamed to legacy apache-commons-validator (ex jakarta)
* Sat Mar 07 2009 gil <puntogil@libero.it> 1.1.4-1mamba
- package created by autospec

View File

@ -0,0 +1,11 @@
--- commons-validator-1.1.4/build.xml 2004-11-12 17:36:40.000000000 +0100
+++ commons-validator-1.1.4/build.xml-gil 2009-03-07 14:06:39.000000000 +0100
@@ -266,7 +266,7 @@
<mkdir dir="${dist.home}"/>
<copy file="LICENSE.txt"
todir="${dist.home}"/>
- <copy file="RELEASE-NOTES.readme"
+ <copy file="NOTICE.txt"
todir="${dist.home}"/>
<mkdir dir="${build.home}/classes/META-INF"/>
<copy file="LICENSE.txt"