forked from pool/apache-commons-email
68 lines
1.8 KiB
RPMSpec
68 lines
1.8 KiB
RPMSpec
![]() |
%global base_name email
|
||
|
%global short_name commons-%{base_name}
|
||
|
|
||
|
Name: apache-%{short_name}
|
||
|
Version: 1.2
|
||
|
Release: 0
|
||
|
Summary: Apache Commons Email Package
|
||
|
Group: Development/Libraries/Java
|
||
|
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
|
||
|
Source1: build.xml.tar.bz2
|
||
|
BuildArch: noarch
|
||
|
|
||
|
BuildRequires: ant
|
||
|
BuildRequires: java-devel >= 1.6.0
|
||
|
BuildRequires: jpackage-utils
|
||
|
BuildRequires: javamail
|
||
|
Requires: javamail
|
||
|
Requires: java >= 1.6.0
|
||
|
Requires: jpackage-utils
|
||
|
Requires(post): jpackage-utils
|
||
|
Requires(postun): jpackage-utils
|
||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||
|
|
||
|
%description
|
||
|
Commons-Email aims to provide an API for sending email. It is built on top of
|
||
|
the JavaMail API, which it aims to simplify.
|
||
|
|
||
|
%package javadoc
|
||
|
Summary: Javadoc for %{name}
|
||
|
Group: Documentation
|
||
|
Requires: jpackage-utils
|
||
|
|
||
|
%description javadoc
|
||
|
This package contains the API documentation for %{name}.
|
||
|
|
||
|
|
||
|
%prep
|
||
|
%setup -q -n %{short_name}-%{version}-src
|
||
|
tar xpvf %SOURCE1
|
||
|
|
||
|
%build
|
||
|
ant -Dmaven.mode.offline=true -Dmaven.test.skip=true \
|
||
|
-lib %{_javadir} javadoc package
|
||
|
|
||
|
%install
|
||
|
# jars
|
||
|
install -d -m 0755 %{buildroot}%{_javadir}
|
||
|
install -m 644 target/%{short_name}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar
|
||
|
ln -sf %{name}.jar %{buildroot}%{_javadir}/%{short_name}.jar
|
||
|
|
||
|
# javadoc
|
||
|
install -d -m 0755 %{buildroot}%{_javadocdir}/%{name}
|
||
|
cp -pr target/site/api*/* %{buildroot}%{_javadocdir}/%{name}
|
||
|
|
||
|
%files
|
||
|
%defattr(-,root,root,-)
|
||
|
%doc LICENSE.txt RELEASE-NOTES.txt NOTICE.txt
|
||
|
%{_javadir}/*
|
||
|
|
||
|
%files javadoc
|
||
|
%defattr(-,root,root,-)
|
||
|
%doc LICENSE.txt NOTICE.txt
|
||
|
%doc %{_javadocdir}/%{name}
|
||
|
|
||
|
%changelog
|