LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File javamail.spec of Package javamail (Project DISCONTINUED:openSUSE:11.1:NonFree)

#
# spec file for package javamail (Version 1.4)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild


Name:           javamail
BuildRequires:  ant jaf java-1_5_0-gcj-compat-devel jpackage-utils unzip
%define name		javamail
%define version		1.4
%define cvs_version	1_4
%define release		2jpp
%define section		non-free
Version:        1.4
Release:        252
Summary:        The JavaMail(TM) API
License:        Other uncritical OpenSource License
Url:            http://java.sun.com/products/javamail/
Group:          Development/Libraries/Java
# Check out source code with a CVS client. The last three checkouts are for updated files:
# cvs -d :pserver:guest@cvs.dev.java.net:/cvs login
# cvs -d :pserver:guest@cvs.dev.java.net:/cvs checkout -r JAVAMAIL-1_4 glassfish/mail
# cvs -d :pserver:guest@cvs.dev.java.net:/cvs checkout glassfish/mail/src/java/com/sun/mail/imap/protocol/UIDSet.java
# cvs -d :pserver:guest@cvs.dev.java.net:/cvs checkout glassfish/mail/src/java/com/sun/mail/imap/AppendUID.java
# cvs -d :pserver:guest@cvs.dev.java.net:/cvs checkout glassfish/mail/src/java/overview.html
# tar -jcf glassfish.tar.bz2 glassfish
Source0:        glassfish.tar.bz2
Source1:        LICENSE.txt
BuildArch:      noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
The JavaMail(TM) 1.3 API provides a set of abstract classes that model
a mail system. The API provides a platform independent and protocol
independent framework to build Java technology-based mail and messaging
applications. The JavaMail(TM) API is implemented as a Java platform
optional package and is also available as part of the Java 2 platform,
Enterprise Edition. Sun provides a royalty-free reference
implementation, in binary form, that developers will be able to use and
ship.



%package manual
License:        Other uncritical OpenSource License
Summary:        Manual for javamail
Group:          Development/Libraries/Java

%description manual
Documentation for javamail.



%package javadoc
License:        Other uncritical OpenSource License
Summary:        Javadoc documentation for javamail.
Group:          Development/Libraries/Java
PreReq:         coreutils

%description javadoc
Javadoc documentation for javamail.



%package demo
License:        Other uncritical OpenSource License
Summary:        Demonstrations and samples for javamail.
Requires:       %{name} = %{version}
Group:          Development/Libraries/Java

%description demo
Demonstrations and samples for javamail.



%package monolithic
License:        Other uncritical OpenSource License
Summary:        All javamail in one monolithic jar.
Group:          Development/Libraries/Java

%description monolithic
All javamail in one monolithic jar.



%prep
%setup -c javamail
# fix files perms
chmod -R go=u-w *
cp %{SOURCE1} .

%build
pushd glassfish/mail
CLASSPATH=$(build-classpath activation) ant release
ZIP_FILE=$(readlink -f javamail.zip)
popd
unzip $ZIP_FILE
mv javamail/* .

%install
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}
install -m 644 mail.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
(cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed  "s|-%{version}||g"`; done)
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}/%{name}
install -m 644 lib/mailapi.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/mailapi-%{version}.jar
install -m 644 lib/imap.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/imap-%{version}.jar
install -m 644 lib/pop3.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/pop3-%{version}.jar
install -m 644 lib/smtp.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/smtp-%{version}.jar
(cd $RPM_BUILD_ROOT%{_javadir}/%{name} && for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed  "s|-%{version}||g"`; done)
# javadoc
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-sun-%{version}
cp -pr docs/javadocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
cp -pr *.txt           $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} || :
rm -rf docs/javadocs
# data
install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/%{name}
cp -pr demo $RPM_BUILD_ROOT%{_datadir}/%{name}

%clean
rm -rf $RPM_BUILD_ROOT

%post javadoc
rm -f %{_javadocdir}/%{name}
ln -s %{name}-%{version} %{_javadocdir}/%{name}

%postun javadoc
if [ "$1" = "0" ]; then
    rm -f %{_javadocdir}/%{name}
fi

%files
%defattr(0644,root,root,0755)
%doc *.txt
%{_javadir}/%{name}
#% files manual
#% defattr(0644,root,root,0755)
#% doc docs/*

%files javadoc
%defattr(0644,root,root,0755)
%{_javadocdir}/%{name}-%{version}

%files demo
%defattr(0644,root,root,0755)
%{_datadir}/%{name}

%files monolithic
%defattr(0644,root,root,0755)
%{_javadir}/%{name}-%{version}.jar
%{_javadir}/%{name}.jar

%changelog
* Wed Oct 01 2008 mvyskocil@suse.cz
- use a gcj instead of java-devel for build
* Fri Mar 30 2007 dbornkessel@suse.de
- replaced files with wrong license by cddl-licensed files (Bug #256299)
* Fri Mar 30 2007 ro@suse.de
- added unzip to buildreq
* Tue Mar 20 2007 dbornkessel@suse.de
- building from source now (new license)
- manual not longer included (not included in the source code)
* Mon Sep 25 2006 dbornkessel@suse.de
- update to version 1.4
* Mon Apr 24 2006 dbornkessel@suse.de
- added license text (Bug #168815)
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Mon Jan 16 2006 dbornkessel@suse.de
- updated to v. 1.3.3_01
* Thu Sep 29 2005 dmueller@suse.de
- add norootforbuild
* Thu Sep 16 2004 skh@suse.de
- Fix Prerequires of javadoc subpackage
* Wed Sep 15 2004 kukuk@suse.de
- Fix Requires of javamail-demo
* Thu Sep 09 2004 skh@suse.de
- Remove broken Obsoletes: and Provides:
* Thu Sep 02 2004 skh@suse.de
- Initial package with version 1.3.1 created (JPackage 1.5)