Updated to 1.4.0
Switched build tool from ant to maven Updated to latest java packaging guidelines Dropped oro BR/R
This commit is contained in:
parent
93ebd30a3a
commit
2c026eff42
3 changed files with 25 additions and 59 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -1 +1,2 @@
|
|||
/commons-validator-1.3.1-src.tar.gz
|
||||
/commons-validator-1.4.0-src.tar.gz
|
||||
|
|
|
|||
|
|
@ -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}-%{version}-src.tar.gz
|
||||
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.
|
||||
mvn-rpmbuild install javadoc:aggregate
|
||||
|
||||
export CLASSPATH=$(build-classpath \
|
||||
apache-commons-logging \
|
||||
apache-commons-digester \
|
||||
apache-commons-beanutils \
|
||||
junit \
|
||||
jakarta-oro )
|
||||
|
||||
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@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@lists.fedoraproject.org> - 1.3.1-9
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
|
||||
|
||||
|
|
|
|||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
ac5b8d6f67982859fe77225ab7fe6548 commons-validator-1.3.1-src.tar.gz
|
||||
f1e9418095cd1e99a00cb67747078277 commons-validator-1.4.0-src.tar.gz
|
||||
|
|
|
|||
Reference in a new issue