From 647848549be6c9e75eb2e4aee6c43f812f58173f Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Fri, 5 Jan 2024 20:28:17 +0100 Subject: [PATCH] install under directory recognized by build-classpath [release 1.3.1-2mamba;Sun Apr 06 2014] --- README.md | 3 + ...he-commons-validator-1.3.1-build_xml.patch | 11 ++ apache-commons-validator-1.3.1.catalog | 8 + apache-commons-validator.spec | 145 ++++++++++++++++++ jakarta-commons-validator-1.1.4-build.patch | 11 ++ 5 files changed, 178 insertions(+) create mode 100644 apache-commons-validator-1.3.1-build_xml.patch create mode 100644 apache-commons-validator-1.3.1.catalog create mode 100644 apache-commons-validator.spec create mode 100644 jakarta-commons-validator-1.1.4-build.patch diff --git a/README.md b/README.md index e164ab9..537a50d 100644 --- a/README.md +++ b/README.md @@ -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. + diff --git a/apache-commons-validator-1.3.1-build_xml.patch b/apache-commons-validator-1.3.1-build_xml.patch new file mode 100644 index 0000000..c272f84 --- /dev/null +++ b/apache-commons-validator-1.3.1-build_xml.patch @@ -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 @@ + + + +- + + diff --git a/apache-commons-validator-1.3.1.catalog b/apache-commons-validator-1.3.1.catalog new file mode 100644 index 0000000..99346d1 --- /dev/null +++ b/apache-commons-validator-1.3.1.catalog @@ -0,0 +1,8 @@ +-- Jakarta commons-validator DTD catalog -- +-- JPackage Project -- + +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 diff --git a/apache-commons-validator.spec b/apache-commons-validator.spec new file mode 100644 index 0000000..0a4b70d --- /dev/null +++ b/apache-commons-validator.spec @@ -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 +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 1.3.1-2mamba +- install under directory recognized by build-classpath + +* Sun Apr 12 2009 gil 1.3.1-1mamba +- update to 1.3.1 +- renamed to legacy apache-commons-validator (ex jakarta) + +* Sat Mar 07 2009 gil 1.1.4-1mamba +- package created by autospec diff --git a/jakarta-commons-validator-1.1.4-build.patch b/jakarta-commons-validator-1.1.4-build.patch new file mode 100644 index 0000000..d38e38f --- /dev/null +++ b/jakarta-commons-validator-1.1.4-build.patch @@ -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 @@ + + +- + +