[Jpackage-commits] dist/bouncycastle/devel .cvsignore, 1.1, 1.2 bouncycastle.spec, NONE, 1.1 sources, 1.1, 1.2

jpackage jpackage at ryu.zarb.org
Wed May 28 19:50:00 CEST 2008


Update of /home/projects/jpackage/cvs/dist/bouncycastle/devel
In directory ryu.zarb.org:/tmp/cvs-serv9421/devel

Modified Files:
	.cvsignore sources 
Added Files:
	bouncycastle.spec 
Log Message:
Import from JPP 5.0

Index: .cvsignore
===================================================================
RCS file: /home/projects/jpackage/cvs/dist/bouncycastle/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -C 2 -d -r1.1 -r1.2
*** .cvsignore	28 May 2008 17:49:03 -0000	1.1
--- .cvsignore	28 May 2008 17:49:58 -0000	1.2
***************
*** 0 ****
--- 1,27 ----
+ bcmail-jdk14-137.jar
+ bcmail-jdk14-137.tar.gz
+ bcmail-jdk15-137.jar
+ bcmail-jdk15-137.tar.gz
+ bcmail-jdk16-137.jar
+ bcmail-jdk16-137.tar.gz
+ bcpg-jdk14-137.jar
+ bcpg-jdk14-137.tar.gz
+ bcpg-jdk15-137.jar
+ bcpg-jdk15-137.tar.gz
+ bcpg-jdk16-137.jar
+ bcpg-jdk16-137.tar.gz
+ bcprov-jdk14-137.jar
+ bcprov-jdk14-137.tar.gz
+ bcprov-jdk15-137.jar
+ bcprov-jdk15-137.tar.gz
+ bcprov-jdk16-137.jar
+ bcprov-jdk16-137.tar.gz
+ bctsp-jdk14-137.jar
+ bctsp-jdk14-137.tar.gz
+ bctsp-jdk15-137.jar
+ bctsp-jdk15-137.tar.gz
+ bctsp-jdk16-137.jar
+ bctsp-jdk16-137.tar.gz
+ lcrypto-jdk14-137.tar.gz
+ lcrypto-jdk15-137.tar.gz
+ lcrypto-jdk16-137.tar.gz

Index: sources
===================================================================
RCS file: /home/projects/jpackage/cvs/dist/bouncycastle/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -C 2 -d -r1.1 -r1.2
*** sources	28 May 2008 17:49:03 -0000	1.1
--- sources	28 May 2008 17:49:58 -0000	1.2
***************
*** 0 ****
--- 1,27 ----
+ 824e3d4e1c333b5e98a6578bd91285dc  bcmail-jdk14-137.jar
+ b802105780c4a464a3ed2d056911bf1e  bcmail-jdk14-137.tar.gz
+ d068283bea3240cb93c9ead5678bb5d6  bcmail-jdk15-137.jar
+ 9d7f47de7894588d57f659b95db3e641  bcmail-jdk15-137.tar.gz
+ 797d74a7116893c8d09cbd4b15c24423  bcmail-jdk16-137.jar
+ 2252097959e4e9b9ec2f2c7995b2fd01  bcmail-jdk16-137.tar.gz
+ 047245e6392284c4dba4793c7de2f1ff  bcpg-jdk14-137.jar
+ b10887eb2fcd0866b8cb87e105468ed7  bcpg-jdk14-137.tar.gz
+ 3ad96d86029c6c70d939f549eac7d11b  bcpg-jdk15-137.jar
+ 1c306229a18f2b27341ecc9324d46605  bcpg-jdk15-137.tar.gz
+ f75b131cb31f7542e1a45ba94f14bce9  bcpg-jdk16-137.jar
+ bc5f114e53325eb738eafa299ec24bd5  bcpg-jdk16-137.tar.gz
+ 1c1912991f90687489857afd1f4079bb  bcprov-jdk14-137.jar
+ 11222f408f80384925b9e414d8b27ec6  bcprov-jdk14-137.tar.gz
+ 7cdb436aaa4b222db7fc02495dfcde51  bcprov-jdk15-137.jar
+ a4cd0061eba23c7b1ffaee062d5f3501  bcprov-jdk15-137.tar.gz
+ 15a07516456a3fecd561074c7cf761a1  bcprov-jdk16-137.jar
+ 9b9d13bc0e2c7c14acc4b2a7c484e756  bcprov-jdk16-137.tar.gz
+ b767ccd151e046461cd318329798c28e  bctsp-jdk14-137.jar
+ 0baceccdc9c7ca9aef5988f9b548394e  bctsp-jdk14-137.tar.gz
+ fec2402e60a55c3e6b193398d5806572  bctsp-jdk15-137.jar
+ 3b5991e54bb4d3a4fbac6651ac2e1596  bctsp-jdk15-137.tar.gz
+ 0502f9a8f2e42f8370a339a2bef56fd0  bctsp-jdk16-137.jar
+ b42a7f4f9bd9fadbacf63066b6397061  bctsp-jdk16-137.tar.gz
+ fa0bf0dbfd593c4fb0ef4dc7fa781d09  lcrypto-jdk14-137.tar.gz
+ 4419a94ab19c73bbfb6bd407457dab88  lcrypto-jdk15-137.tar.gz
+ 3b230706006b911d808facfd69030606  lcrypto-jdk16-137.tar.gz

--- NEW FILE: bouncycastle.spec ---
# Copyright (c) 2000-2007, JPackage Project
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
#    notice, this list of conditions and the following disclaimer in the
#    documentation and/or other materials provided with the
#    distribution.
# 3. Neither the name of the JPackage Project nor the names of its
#    contributors may be used to endorse or promote products derived
#    from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#

%define section free
%define archivever 137

Summary:        Bouncy Castle Crypto Package for Java
Name:           bouncycastle
Version:        1.37
Release:        5jpp
Epoch:          0
Group:          Security/Cryptography
License:        BSD
URL:            http://www.bouncycastle.org/
BuildArch:      noarch
Source0:        http://www.bouncycastle.org/download/bcmail-jdk14-%{archivever}.tar.gz
Source1:        http://www.bouncycastle.org/download/bcmail-jdk15-%{archivever}.tar.gz
Source2:        http://www.bouncycastle.org/download/bcmail-jdk16-%{archivever}.tar.gz
Source3:        http://www.bouncycastle.org/download/bcpg-jdk14-%{archivever}.tar.gz
Source4:        http://www.bouncycastle.org/download/bcpg-jdk15-%{archivever}.tar.gz
Source5:        http://www.bouncycastle.org/download/bcpg-jdk16-%{archivever}.tar.gz
Source6:        http://www.bouncycastle.org/download/bcprov-jdk14-%{archivever}.tar.gz
Source7:        http://www.bouncycastle.org/download/bcprov-jdk15-%{archivever}.tar.gz
Source8:        http://www.bouncycastle.org/download/bcprov-jdk16-%{archivever}.tar.gz
Source9:        http://www.bouncycastle.org/download/lcrypto-jdk14-%{archivever}.tar.gz
Source10:        http://www.bouncycastle.org/download/lcrypto-jdk15-%{archivever}.tar.gz
Source11:        http://www.bouncycastle.org/download/lcrypto-jdk16-%{archivever}.tar.gz
Source12:        http://www.bouncycastle.org/download/bctsp-jdk14-%{archivever}.tar.gz
Source13:        http://www.bouncycastle.org/download/bctsp-jdk15-%{archivever}.tar.gz
Source14:        http://www.bouncycastle.org/download/bctsp-jdk16-%{archivever}.tar.gz
# FIXME: Just sign the jar
# We keep original 1.4 provider since java 1.4 wants it to be signed
# This sucks big time - should we add jar signing infrastructure to
# jpackage in || to rpm signing? Sun seems much less user-friendly than
# your average Linux distribution
Source15:       http://www.bouncycastle.org/download/bcprov-jdk14-%{archivever}.jar
Source16:       http://www.bouncycastle.org/download/bcprov-jdk15-%{archivever}.jar
Source17:       http://www.bouncycastle.org/download/bcprov-jdk16-%{archivever}.jar
Source18:       http://www.bouncycastle.org/download/bcmail-jdk14-%{archivever}.jar
Source19:       http://www.bouncycastle.org/download/bcmail-jdk15-%{archivever}.jar
Source20:       http://www.bouncycastle.org/download/bcmail-jdk16-%{archivever}.jar
Source21:       http://www.bouncycastle.org/download/bctsp-jdk14-%{archivever}.jar
Source22:       http://www.bouncycastle.org/download/bctsp-jdk15-%{archivever}.jar
Source23:       http://www.bouncycastle.org/download/bctsp-jdk16-%{archivever}.jar
Source24:       http://www.bouncycastle.org/download/bcpg-jdk14-%{archivever}.jar
Source25:       http://www.bouncycastle.org/download/bcpg-jdk15-%{archivever}.jar
Source26:       http://www.bouncycastle.org/download/bcpg-jdk16-%{archivever}.jar

BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root
Vendor: %{?_vendorinfo:%{_vendorinfo}}%{!?_vendorinfo:%{_vendor}}
Distribution: %{?_distribution:%{_distribution}}%{!?_distribution:%{_vendor}}
Requires:       %{name}-jdk1.5 = %{epoch}:%{version}-%{release}
Requires:       jpackage-utils >= 0:1.7.3

BuildRequires:  jaf
BuildRequires:  javamail
BuildRequires:  junit
BuildRequires:  java-devel >= 0:1.4.2
BuildRequires:  java-devel >= 0:1.5.0
BuildRequires:  java-devel >= 0:1.6.0
BuildRequires:  java-devel < 0:1.5.0
BuildRequires:  java-devel < 0:1.6.0
BuildRequires:  java-devel < 0:1.7.0
BuildRequires:  jpackage-utils >= 0:1.7.3

%description
The Bouncy Castle Crypto APIs consist of the following:
- A lightweight cryptography API in Java.
- A provider for the JCE and JCA.
- A clean room implementation of the JCE 1.2.1.
- Generators for Version 1 and Version 3 X.509 certificates and PKCS12 files.
- A signed jar version suitable for JDK 1.4 and the Sun JCE.

%package jdk1.4
Group:          Security/Cryptography
Summary:        Bouncy Castle JCE APIs for Java 1.4.x
Requires:       %{name} = %{epoch}:%{version}
Requires:       jaf
Requires:       javamail
Requires:       java >= 0:1.4.0
Requires:       java < 0:1.5.0
BuildRequires:  java-devel >= 0:1.4.0
BuildRequires:  java-devel < 0:1.5.0
Provides:       %{name}-provider = %{epoch}:%{version}

%description jdk1.4
Bouncy Castle JCE API's for Java 1.4.

%package jdk1.5
Group:          Security/Cryptography
Summary:        Bouncy Castle JCE APIs for Java 1.5.x
Requires:       %{name} = %{epoch}:%{version}
Requires:       jaf
Requires:       javamail
Requires:       java >= 0:1.5.0
Requires:       java < 0:1.6.0
BuildRequires:  java-devel >= 0:1.5.0
BuildRequires:  java-devel < 0:1.6.0
BuildRequires:  java < 0:1.6.0
Provides:       %{name}-provider = %{epoch}:%{version}

%description jdk1.5
Bouncy Castle JCE API's for Java 1.5.

%package jdk1.6
Group:          Security/Cryptography
Summary:        Bouncy Castle JCE APIs for Java 1.6.x
Requires:       %{name} = %{epoch}:%{version}
Requires:       jaf
Requires:       javamail
Requires:       java >= 0:1.6.0
Requires:       java < 0:1.7.0
BuildRequires:  java-devel >= 0:1.6.0
BuildRequires:  java-devel < 0:1.7.0
BuildRequires:  java < 0:1.7.0
Provides:       %{name}-provider = %{epoch}:%{version}

%description jdk1.6
Bouncy Castle JCE API's for Java 1.6.

%package javadoc-jdk1.4
Group:          Documentation
Summary:        Java 1.4 javadoc for %{name}
Requires(post):   /bin/rm,/bin/ln
Requires(postun): /bin/rm

%description javadoc-jdk1.4
Java 1.4 javadocs for %{name}.

%package javadoc-jdk1.5
Group:          Documentation
Summary:        Java 1.5 javadoc for %{name}
Requires(post):   /bin/rm,/bin/ln
Requires(postun): /bin/rm

%description javadoc-jdk1.5
Java 1.5 javadocs for %{name}.

%package javadoc-jdk1.6
Group:          Documentation
Summary:        Java 1.6 javadoc for %{name}
Requires(post):   /bin/rm,/bin/ln
Requires(postun): /bin/rm

%description javadoc-jdk1.6
Java 1.6 javadocs for %{name}.

%prep
%setup -q -c -T -a 0
%setup -q -D -T -a 1
%setup -q -D -T -a 2
%setup -q -D -T -a 3
%setup -q -D -T -a 4
%setup -q -D -T -a 5
%setup -q -D -T -a 6
%setup -q -D -T -a 7
%setup -q -D -T -a 8
%setup -q -D -T -a 9
%setup -q -D -T -a 10
%setup -q -D -T -a 11
%setup -q -D -T -a 12
%setup -q -D -T -a 13
%setup -q -D -T -a 14

for d in \
bcmail-jdk14-%{archivever} \
bcmail-jdk15-%{archivever} \
bcmail-jdk16-%{archivever} \
bcpg-jdk14-%{archivever} \
bcpg-jdk15-%{archivever} \
bcpg-jdk16-%{archivever} \
bcprov-jdk14-%{archivever} \
bcprov-jdk15-%{archivever} \
bcprov-jdk16-%{archivever} \
bctsp-jdk14-%{archivever} \
bctsp-jdk15-%{archivever} \
bctsp-jdk16-%{archivever} \
; do
  mkdir $d/src
  pushd $d/src
    unzip -q ../src.zip
  popd
done
# Remove provided binaries
find . -type f -name "*.class" -exec %__rm -f {} \;
find . -type f -name "*.jar" -exec %__rm -f {} \;
find . -type f -name "*.zip" -exec %__rm -f {} \;

%build
deps="jaf javamail/mailapi junit"
dirs14="bcprov-jdk14-%{archivever} bcmail-jdk14-%{archivever} bcpg-jdk14-%{archivever} lcrypto-jdk14-%{archivever} bctsp-jdk14-%{archivever}"
dirs15="bcprov-jdk15-%{archivever} bcmail-jdk15-%{archivever} bcpg-jdk15-%{archivever} lcrypto-jdk15-%{archivever} bctsp-jdk15-%{archivever}"
dirs16="bcprov-jdk16-%{archivever} bcmail-jdk16-%{archivever} bcpg-jdk16-%{archivever} lcrypto-jdk16-%{archivever} bctsp-jdk16-%{archivever}"

export LANG=en_US.UTF-8
# 1.4
unset JAVA_HOME
for javaver in 1.4.0 1.4.1 1.4.2; do
  [ -d "%{_jvmdir}/java-${javaver}" ] && \
  export JAVA_HOME=%{_jvmdir}/java-${javaver}
done
[ -z "$JAVA_HOME" ] && exit 1

export CLASSPATH=$(build-classpath $deps)
CLASSPATH=$CLASSPATH:$RPM_BUILD_DIR/%{name}-%{version}/bcprov-jdk14-%{archivever}/bcprov-jdk14-%{version}.jar:.
CLASSPATH=$CLASSPATH:$RPM_BUILD_DIR/%{name}-%{version}/bcmail-jdk14-%{archivever}/bcmail-jdk14-%{version}.jar
CLASSPATH=$CLASSPATH:.

javac=$JAVA_HOME/bin/javac
jar=$JAVA_HOME/bin/jar
javadoc=$JAVA_HOME/bin/javadoc

for i in $dirs14; do
  pushd $i/src
  $javac `find . -type f -name "*.java"`
  jar2="../`basename $i -%{archivever}`-%{version}.jar"
  files="`find . -type f -name "*.class"`"
  test ! -d classes && mf="" || mf="`find classes/ -type f -name "*.mf" 2>/dev/null`"
  test -n "$mf" && $jar cvfm $jar2 $mf $files || $jar cvf $jar2 $files
  popd
done

# 1.5
unset JAVA_HOME
for javaver in 1.5.0; do
  [ -d "%{_jvmdir}/java-${javaver}" ] && \
  export JAVA_HOME=%{_jvmdir}/java-${javaver}
done
[ -z "$JAVA_HOME" ] && exit 1

export CLASSPATH=$(build-classpath $deps)
CLASSPATH=$CLASSPATH:$RPM_BUILD_DIR/%{name}-%{version}/bcprov-jdk15-%{archivever}/bcprov-jdk15-%{version}.jar:.
CLASSPATH=$CLASSPATH:$RPM_BUILD_DIR/%{name}-%{version}/bcmail-jdk15-%{archivever}/bcmail-jdk15-%{version}.jar
CLASSPATH=$CLASSPATH:.

javac=$JAVA_HOME/bin/javac
jar=$JAVA_HOME/bin/jar
javadoc=$JAVA_HOME/bin/javadoc

for i in $dirs15; do
  pushd $i/src
  $javac `find . -type f -name "*.java"`
  jar2="../`basename $i -%{archivever}`-%{version}.jar"
  files="`find . -type f -name "*.class"`"
  test ! -d classes && mf="" || mf="`find classes -type f -name "*.mf" 2>/dev/null`"
  test -n "$mf" && $jar cvfm $jar2 $mf $files || $jar cvf $jar2 $files
  popd
done

# 1.6
unset JAVA_HOME
for javaver in 1.6.0; do
  [ -d "%{_jvmdir}/java-${javaver}" ] && \
  export JAVA_HOME=%{_jvmdir}/java-${javaver}
done
[ -z "$JAVA_HOME" ] && exit 1

export CLASSPATH=$(build-classpath $deps)
CLASSPATH=$CLASSPATH:$RPM_BUILD_DIR/%{name}-%{version}/bcprov-jdk16-%{archivever}/bcprov-jdk16-%{version}.jar:.
CLASSPATH=$CLASSPATH:$RPM_BUILD_DIR/%{name}-%{version}/bcmail-jdk16-%{archivever}/bcmail-jdk16-%{version}.jar
CLASSPATH=$CLASSPATH:.

javac=$JAVA_HOME/bin/javac
jar=$JAVA_HOME/bin/jar
javadoc=$JAVA_HOME/bin/javadoc

for i in $dirs16; do
  pushd $i/src
  $javac `find . -type f -name "*.java"`
  jar2="../`basename $i -%{archivever}`-%{version}.jar"
  files="`find . -type f -name "*.class"`"
  test ! -d classes && mf="" || mf="`find classes -type f -name "*.mf" 2>/dev/null`"
  test -n "$mf" && $jar cvfm $jar2 $mf $files || $jar cvf $jar2 $files
  popd
done


# 1.4, 1.5 and 1.6 javadocs
dirs="$dirs14 $dirs15 $dirs16"

for i in $dirs; do
  pushd $i
  for j in *.html; do
    %__mv -f $j $i-$j
  done

  %__mv -f *.html ../

  pushd src
  $javadoc -d ../docs `find . -type f -name "*.java"`
  popd
  popd
done

%install
%__rm -rf %{buildroot}

# jars
jars=`find . -type f -name "*.jar"`

for i in $jars; do
  %__mv -f $i .
done

# Replace built 1.4, 1.5 and 1.6 providers with original one
%__rm -f bcprov-jdk14-%{version}.jar
%__rm -f bcprov-jdk15-%{version}.jar
%__rm -f bcprov-jdk16-%{version}.jar
%__cp -a %{SOURCE15} bcprov-jdk14-%{version}.jar
%__cp -a %{SOURCE16} bcprov-jdk15-%{version}.jar
%__cp -a %{SOURCE17} bcprov-jdk16-%{version}.jar

# Replace built 1.4, 1.5 and 1.6 bcmail with original one
%__rm -f bcmail-jdk14-%{version}.jar
%__rm -f bcmail-jdk15-%{version}.jar
%__rm -f bcmail-jdk16-%{version}.jar
%__cp -a %{SOURCE18} bcmail-jdk14-%{version}.jar
%__cp -a %{SOURCE19} bcmail-jdk15-%{version}.jar
%__cp -a %{SOURCE20} bcmail-jdk16-%{version}.jar

# Replace built 1.4, 1.5 and 1.6 bctsp with original one
%__rm -f bctsp-jdk14-%{version}.jar
%__rm -f bctsp-jdk15-%{version}.jar
%__rm -f bctsp-jdk16-%{version}.jar
%__cp -a %{SOURCE21} bctsp-jdk14-%{version}.jar
%__cp -a %{SOURCE22} bctsp-jdk15-%{version}.jar
%__cp -a %{SOURCE23} bctsp-jdk16-%{version}.jar

# Replace built 1.4, 1.5 and 1.6 bcpg with original one
%__rm -f bcpg-jdk14-%{version}.jar
%__rm -f bcpg-jdk15-%{version}.jar
%__rm -f bcpg-jdk16-%{version}.jar
%__cp -a %{SOURCE24} bcpg-jdk14-%{version}.jar
%__cp -a %{SOURCE25} bcpg-jdk15-%{version}.jar
%__cp -a %{SOURCE26} bcpg-jdk16-%{version}.jar

# Java 1.4
%__mkdir_p %{buildroot}%{_javadir}-{ext/%{name}-jdk1.4,1.4.0,1.4.1,1.4.2}

for jar14 in *-jdk14-%{version}.jar; do
   jar=$(echo $jar14 | %__sed s+-jdk14++g)
   %__install -m 644 $jar14 %{buildroot}%{_javadir}-ext/%{name}-jdk1.4/$jar
done

pushd %{buildroot}%{_javadir}-ext/%{name}-jdk1.4
   for jar in *-%{version}.jar; do
      %__ln_s $jar $(echo $jar | %__sed s+-%{version}\.jar+.jar+g)
   done
popd

for javaver in 1.4.0 1.4.1 1.4.2; do
   # FIXME: This should be relative
   (cd %{buildroot}%{_javadir}-${javaver} && %__ln_s %{_javadir}-ext/%{name}-jdk1.4 %{name})
done

# Java 1.5
%__mkdir_p %{buildroot}%{_javadir}-{ext/%{name}-jdk1.5,1.5.0}

for jar15 in *-jdk15-%{version}.jar; do
   jar=$(echo $jar15 | %__sed s+-jdk15++g)
   %__install -m 644 $jar15 %{buildroot}%{_javadir}-ext/%{name}-jdk1.5/$jar
done

pushd %{buildroot}%{_javadir}-ext/%{name}-jdk1.5
  for jar in *-%{version}.jar; do
    %__ln_s $jar $(echo $jar | %__sed s+-%{version}\.jar+.jar+g)
  done
popd

for javaver in 1.5.0; do
  # FIXME: This should be relative
  (cd %{buildroot}%{_javadir}-${javaver} && %__ln_s %{_javadir}-ext/%{name}-jdk1.5 %{name})
done

# Java 1.6
%__mkdir_p %{buildroot}%{_javadir}-{ext/%{name}-jdk1.6,1.6.0}

for jar16 in *-jdk16-%{version}.jar; do
   jar=$(echo $jar16 | %__sed s+-jdk16++g)
   %__install -m 644 $jar16 %{buildroot}%{_javadir}-ext/%{name}-jdk1.6/$jar
done

pushd %{buildroot}%{_javadir}-ext/%{name}-jdk1.6
  for jar in *-%{version}.jar; do
    %__ln_s $jar $(echo $jar | %__sed s+-%{version}\.jar+.jar+g)
  done
popd

for javaver in 1.6.0; do
  # FIXME: This should be relative
  (cd %{buildroot}%{_javadir}-${javaver} && %__ln_s %{_javadir}-ext/%{name}-jdk1.6 %{name})
done

# javadoc
%__mkdir_p %{buildroot}%{_javadocdir}/%{name}-{jdk16,jdk15,jdk14}-%{version}
(cd %{buildroot}%{_javadocdir} && %__ln_s %{name}-jdk16-%{version} %{name}-jdk16)
(cd %{buildroot}%{_javadocdir} && %__ln_s %{name}-jdk15-%{version} %{name}-jdk15)
(cd %{buildroot}%{_javadocdir} && %__ln_s %{name}-jdk14-%{version} %{name}-jdk14)

for javaver in 14 15 16; do
  for javadoc in $(find . -type d -name docs | grep jdk${javaver}); do
    dest=$(echo $javadoc | %__sed s+-jdk${javaver}-%{version}++g | %__sed s+/docs++g)
    dest=$(echo $dest | %__sed 's+-%{archivever}++')
    %__cp -a $javadoc %{buildroot}%{_javadocdir}/%{name}-jdk${javaver}-%{version}/$dest
  done
done

find . -type d -name docs | xargs %__rm -rf

%clean
%__rm -rf %{buildroot}

%post javadoc-jdk1.6
%__rm -f %{_javadocdir}/%{name}-jdk16
%__ln_s %{name}-jdk16-%{version} %{_javadocdir}/%{name}-jdk16

%postun javadoc-jdk1.6
if [ $1 -eq 0 ]; then
  %__rm -f %{_javadocdir}/%{name}-jdk16
fi

%post javadoc-jdk1.5
%__rm -f %{_javadocdir}/%{name}-jdk15
%__ln_s %{name}-jdk15-%{version} %{_javadocdir}/%{name}-jdk15

%postun javadoc-jdk1.5
if [ $1 -eq 0 ]; then
  %__rm -f %{_javadocdir}/%{name}-jdk15
fi

%post javadoc-jdk1.4
%__rm -f %{_javadocdir}/%{name}-jdk14
%__ln_s %{name}-jdk14-%{version} %{_javadocdir}/%{name}-jdk14

%postun javadoc-jdk1.4
if [ $1 -eq 0 ]; then
  %__rm -f %{_javadocdir}/%{name}-jdk1.4
fi

%files
%defattr(0644,root,root,0755)
%doc *.html

%files jdk1.4
%defattr(0644,root,root,0755)
%dir %{_javadir}-ext/%{name}-jdk1.4
%{_javadir}-ext/%{name}-jdk1.4/*.jar
%{_javadir}-1.4.0/%{name}
%{_javadir}-1.4.1/%{name}
%{_javadir}-1.4.2/%{name}

%files jdk1.5
%defattr(0644,root,root,0755)
%dir %{_javadir}-ext/%{name}-jdk1.5
%{_javadir}-ext/%{name}-jdk1.5/*.jar
%{_javadir}-1.5.0/%{name}

%files jdk1.6
%defattr(0644,root,root,0755)
%dir %{_javadir}-ext/%{name}-jdk1.6
%{_javadir}-ext/%{name}-jdk1.6/*.jar
%{_javadir}-1.6.0/%{name}

%files javadoc-jdk1.4
%defattr(0644,root,root,0755)
%dir %{_javadocdir}/%{name}-jdk14-%{version}
%{_javadocdir}/%{name}-jdk14-%{version}/*
%ghost %{_javadocdir}/%{name}-jdk14

%files javadoc-jdk1.5
%defattr(0644,root,root,0755)
%dir %{_javadocdir}/%{name}-jdk15-%{version}
%{_javadocdir}/%{name}-jdk15-%{version}/*
%ghost %{_javadocdir}/%{name}-jdk15

%files javadoc-jdk1.6
%defattr(0644,root,root,0755)
%dir %{_javadocdir}/%{name}-jdk16-%{version}
%{_javadocdir}/%{name}-jdk16-%{version}/*
%ghost %{_javadocdir}/%{name}-jdk16

%changelog
* Thu Nov 01 2007 Ralph Apel <r.apel at r-apel.de> 0:1.37-5jpp
- Bump release

* Tue Oct 31 2007 Ralph Apel <r.apel at r-apel.de> 0:1.37-4jpp
- Explicitly Require bouncycastle-jdk1.5 in main package

* Tue Oct 30 2007 Ralph Apel <r.apel at r-apel.de> 0:1.37-3jpp
- Build jdk1.4 thru jdk1.6 packages for JPP-5.0

* Tue Oct 30 2007 Ralph Apel <r.apel at r-apel.de> 0:1.37-2jpp
- Build jdk1.4 packages for JPP-1.7

* Wed Jul 11 2007 Ralph Apel <r.apel at r-apel.de> 0:1.37-1jpp
- Upgrade to 1.37
- Add bctsp
- Add more original (i.e. signed) jars
- Require java, java-devel < 1.6.0

* Mon Feb 21 2005 David Walluck <david at jpackage.org> 0:1.27-1jpp
- 1.27
- "fix" requires-on-release
- change license to BSD (style)
- fix duplicate requires

* Thu Jan 20 2005 David Walluck <david at jpackage.org> 0:1.26-1jpp
- 1.26

* Sat Oct 09 2004 David Walluck <david at jpackage.org> 0:1.25-1jpp
- 1.25
- jdk 1.3.x support out, jdk 1.5.0 support in

* Sun Feb 08 2004 David Walluck <david at anti-microsoft.org> 0:1.25-1jpp
- 1.25
- fix javadocs and javadoc dirs
- clean up BuildRequires/Requires
- CLASSPATH doesn't need jce

* Tue Jan 20 2004 David Walluck <david at anti-microsoft.org> 0:1.21-1jpp
- 1.21

* Fri Oct 10 2003 David Walluck <david at anti-microsoft.org> 0:1.20-2jpp
- fix javadoc symlinks

* Fri Oct 10 2003 David Walluck <david at anti-microsoft.org> 0:1.20-1jpp
- 1.20
- add epochs
- %%ghost symlinks
- maybe bouncycastle should consider using ant so that it
  doesn't take over three hours to script the build process
- oh, and maybe a single source archive, thanks

* Sun Sep 09 2003 David Walluck <david at anti-microsoft.org> 0:1.19-2jpp 
- build bcmail.jar for jdk1.4 package
- add Epoch
- Requires: jpackage-utils >= 0:1.5

* Fri Jun 27 2003 Nicolas Mailhot <Nicolas.Mailhot at laPoste.net> 1.19-1jpp
- First jpackage 1.5 release
- use upstream 1.4 binary due to Sun braindamage

* Sun Sep  8 2002 Ville Skyttä <ville.skytta at iki.fi> 1.15-1jpp
- First JPackage release.





More information about the JPackage-commits mailing list