Build with xmvn
- Update to current packaging guidelines
This commit is contained in:
parent
de4de36c97
commit
35f024bb82
@ -3,7 +3,7 @@
|
||||
|
||||
Name: apache-%{short_name}
|
||||
Version: 2.4
|
||||
Release: 3%{?dist}
|
||||
Release: 4%{?dist}
|
||||
Epoch: 1
|
||||
Summary: Utilities to assist with developing IO functionality
|
||||
License: ASL 2.0
|
||||
@ -12,15 +12,12 @@ URL: http://commons.apache.org/%{base_name}
|
||||
Source0: http://archive.apache.org/dist/commons/%{base_name}/source/%{short_name}-%{version}-src.tar.gz
|
||||
BuildArch: noarch
|
||||
|
||||
BuildRequires: java-devel >= 1:1.6.0
|
||||
BuildRequires: jpackage-utils
|
||||
BuildRequires: junit4
|
||||
BuildRequires: maven
|
||||
BuildRequires: maven-surefire-provider-junit4
|
||||
BuildRequires: java-devel >= 1:1.6
|
||||
BuildRequires: xmvn >= 0.2.1
|
||||
BuildRequires: javapackages-tools >= 0.10.0
|
||||
BuildRequires: apache-commons-parent
|
||||
BuildRequires: maven-surefire-provider-junit
|
||||
|
||||
Requires: java >= 1:1.6.0
|
||||
Requires: jpackage-utils
|
||||
Provides: jakarta-%{short_name} = %{epoch}:%{version}-%{release}
|
||||
Obsoletes: jakarta-%{short_name} < %{epoch}:%{version}-%{release}
|
||||
|
||||
@ -32,48 +29,34 @@ to assist with developing IO functionality.
|
||||
%package javadoc
|
||||
Summary: API documentation for %{name}
|
||||
Group: Documentation
|
||||
Requires: jpackage-utils
|
||||
Provides: jakarta-%{short_name}-javadoc = %{epoch}:%{version}-%{release}
|
||||
Obsoletes: jakarta-%{short_name}-javadoc < %{epoch}:%{version}-%{release}
|
||||
|
||||
%description javadoc
|
||||
This package contains the API documentation for %{name}.
|
||||
This package provides %{summary}.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{short_name}-%{version}-src
|
||||
sed -i 's/\r//' *.txt
|
||||
|
||||
%build
|
||||
mvn-rpmbuild install javadoc:javadoc
|
||||
%mvn_file : %{short_name} %{name}
|
||||
%mvn_alias : org.apache.commons:
|
||||
%mvn_build
|
||||
|
||||
%install
|
||||
%mvn_install
|
||||
|
||||
# jars
|
||||
install -d -m 755 %{buildroot}%{_javadir}
|
||||
install -p -m 644 target/%{short_name}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar
|
||||
ln -sf %{name}.jar %{buildroot}%{_javadir}/%{short_name}.jar
|
||||
|
||||
# pom
|
||||
install -d -m 755 %{buildroot}%{_mavenpomdir}
|
||||
install -pm 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{short_name}.pom
|
||||
|
||||
%add_maven_depmap JPP-%{short_name}.pom %{short_name}.jar -a "org.apache.commons:commons-io"
|
||||
|
||||
# javadoc
|
||||
install -d -m 755 %{buildroot}%{_javadocdir}/%{name}
|
||||
cp -pr target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}
|
||||
|
||||
%files
|
||||
%files -f .mfiles
|
||||
%doc LICENSE.txt NOTICE.txt RELEASE-NOTES.txt
|
||||
%{_javadir}/*.jar
|
||||
%{_mavenpomdir}/JPP-%{short_name}.pom
|
||||
%{_mavendepmapfragdir}/*
|
||||
|
||||
%files javadoc
|
||||
%files javadoc -f .mfiles-javadoc
|
||||
%doc LICENSE.txt NOTICE.txt
|
||||
%doc %{_javadocdir}/%{name}
|
||||
|
||||
%changelog
|
||||
* Tue Jan 8 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 1:2.4-4
|
||||
- Build with xmvn
|
||||
|
||||
* Mon Nov 19 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 1:2.4-3
|
||||
- Add Provides/Obsoletes for jakarta-commons-io
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user