commit 2c026eff42406ff6daa0b5c21d75eb253115acda
Author: spike <spike(a)fedoraproject.org>
Date: Fri Oct 19 23:58:01 2012 +0200
Updated to 1.4.0
Switched build tool from ant to maven
Updated to latest java packaging guidelines
Dropped oro BR/R
.gitignore | 1 +
apache-commons-validator.spec | 81 ++++++++++++-----------------------------
sources | 2 +-
3 files changed, 25 insertions(+), 59 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index d3d1a2c..2963820 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
/commons-validator-1.3.1-src.tar.gz
+/commons-validator-1.4.0-src.tar.gz
diff --git a/apache-commons-validator.spec b/apache-commons-validator.spec
index 6c2acf4..a659c45 100644
--- a/apache-commons-validator.spec
+++ b/apache-commons-validator.spec
@@ -2,39 +2,28 @@
%global short_name commons-%{base_name}
Name: apache-%{short_name}
-Version: 1.3.1
-Release: 9%{?dist}
+Version: 1.4.0
+Release: 1%{?dist}
Summary: Apache Commons Validator
Group: Development/Libraries
License: ASL 2.0
URL:
http://commons.apache.org/%{base_name}/
Source0:
http://www.apache.org/dist/commons/%{base_name}/source/%{short_name}-%{ve...
-Patch0: commons-validator-1.3.1-crosslink.patch
-#
https://issues.apache.org/jira/browse/VALIDATOR-303
-Patch1: commons-validator-1.3.1-srcencoding.patch
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: java-devel >= 1:1.6.0
BuildRequires: jpackage-utils
-BuildRequires: ant
BuildRequires: apache-commons-beanutils
BuildRequires: apache-commons-digester
BuildRequires: apache-commons-logging
-BuildRequires: jakarta-oro
+BuildRequires: maven
BuildRequires: junit
Requires: apache-commons-beanutils
Requires: apache-commons-digester
Requires: apache-commons-logging
-Requires: jakarta-oro
Requires: java >= 1:1.6.0
Requires: jpackage-utils
-Requires(post): jpackage-utils
-Requires(postun): jpackage-utils
-# This should go away with F-17 after maven-shared-reporting-impl is fixed.
-Provides: jakarta-%{short_name} = 0:%{version}-%{release}
-Obsoletes: jakarta-%{short_name} < 0:1.3.1-2
%description
A common issue when receiving data either electronically or from user input is
@@ -47,79 +36,55 @@ development and maintenance of validation rules.
%package javadoc
Summary: Javadoc for %{name}
Group: Documentation
-BuildRequires: java-javadoc
-Requires: java-javadoc
+Requires: jpackage-utils
+
%description javadoc
This package contains the API documentation for %{name}.
%prep
%setup -q -n %{short_name}-%{version}-src
-%patch0 -p1
-%patch1 -p1
sed -i 's/\r//' LICENSE.txt
sed -i 's/\r//' RELEASE-NOTES.txt
sed -i 's/\r//' NOTICE.txt
-# use textui instead of awtui (not available in junit4+)
-sed -i 's:junit.awtui.TestRunner.main:junit.textui.TestRunner.main:g' \
- src/test/org/apache/commons/validator/*java
%build
-# TODO: Use Maven for building as soon as upstream provides proper build.xml.
-# Currently upstream build.xml uses antrun plugin to build, so downloads
-# during build process can't be prohibited.
-
-export CLASSPATH=$(build-classpath \
- apache-commons-logging \
- apache-commons-digester \
- apache-commons-beanutils \
- junit \
- jakarta-oro )
+mvn-rpmbuild install javadoc:aggregate
-ant -Dskip.download=true -Dbuild.sysclasspath=first dist
-
-%check
-export CLASSPATH=$(build-classpath \
- apache-commons-logging \
- apache-commons-digester \
- apache-commons-beanutils \
- junit \
- jakarta-oro )
-
-ant -Dskip.download=true -Dbuild.sysclasspath=first test
%install
-rm -rf %{buildroot}
-
# jars
install -d -m 0755 %{buildroot}%{_javadir}
-install -pm 644 dist/%{short_name}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar
-ln -s %{name}.jar %{buildroot}%{_javadir}/%{short_name}.jar
+install -pm 644 target/%{short_name}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar
+
+# pom
+install -d -m 755 %{buildroot}%{_mavenpomdir}
+install -pm 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
+%add_maven_depmap JPP-%{name}.pom %{name}.jar -a "%{short_name}:%{short_name}"
# javadoc
install -d -m 0755 %{buildroot}%{_javadocdir}/%{name}
-cp -pr dist/docs/api*/* %{buildroot}%{_javadocdir}/%{name}/
-
-%clean
-rm -rf %{buildroot}
-
-%pre javadoc
-# workaround for rpm bug, can be removed in F-18
-[ $1 -gt 1 ] && [ -L %{_javadocdir}/%{name} ] && \
-rm -rf $(readlink -f %{_javadocdir}/%{name}) %{_javadocdir}/%{name} || :
+cp -pr target/site/api*/* %{buildroot}%{_javadocdir}/%{name}/
%files
-%defattr(-,root,root,-)
%doc LICENSE.txt NOTICE.txt RELEASE-NOTES.txt
-%{_javadir}/*%{short_name}.jar
+%{_javadir}/*
+%{_mavenpomdir}/*
+%{_mavendepmapfragdir}/*
%files javadoc
-%defattr(-,root,root,-)
%doc LICENSE.txt
%{_javadocdir}/%{name}
+
%changelog
+* Fri Oct 19 2012 Chris Spike <spike(a)fedoraproject.org> 1.4.0-1
+- Updated to 1.4.0
+- Switched build tool from ant to maven
+- Updated to latest java packaging guidelines
+- Dropped oro BR/R
+
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> -
1.3.1-9
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
diff --git a/sources b/sources
index cf72b22..334cffe 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-ac5b8d6f67982859fe77225ab7fe6548 commons-validator-1.3.1-src.tar.gz
+f1e9418095cd1e99a00cb67747078277 commons-validator-1.4.0-src.tar.gz