geronimo-specs/geronimo-specs.spec

1238 lines
48 KiB
RPMSpec
Raw Normal View History

#
# spec file for package geronimo-specs (Version 1.1)
#
# 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
%define without_tests %{?_without_tests:1}%{!?_without_tests:0}
%define with_tests %{!?_without_tests:1}%{?_without_tests:0}
# build withouth maven
%define with_maven 0
%define bname geronimo
%define section free
Name: geronimo-specs
Version: 1.1
Release: 104
Summary: Geronimo J2EE server J2EE specifications
Url: http://geronimo.apache.org
Source0: %{name}-%{version}-src.tar.bz2
# svn export https://svn.apache.org/repos/asf/geronimo/specs/tags/1_1/
Source1: %{name}-jpp-depmap.xml
Source2: geronimo-spec-commonj-1.1-apis.build.xml
Source3: geronimo-spec-corba-1.0-apis.build.xml
Source4: geronimo-spec-corba-2.3-apis.build.xml
Source5: geronimo-spec-corba-3.0-apis.build.xml
Source6: geronimo-spec-ejb-2.1-api.build.xml
Source7: geronimo-spec-jacc-1.0-api.build.xml
Source8: geronimo-spec-jaf-1.0.2-api.build.xml
Source9: geronimo-spec-javamail-1.3.1-api.build.xml
Source10: geronimo-spec-jaxrpc-1.1-api.build.xml
Source11: geronimo-spec-jaxr-1.0-api.build.xml
Source12: geronimo-spec-jms-1.1-api.build.xml
Source13: geronimo-spec-jsp-2.0-api.build.xml
Source14: geronimo-spec-jta-1.0.1B-api.build.xml
Source15: geronimo-spec-j2ee-connector-1.5-api.build.xml
Source16: geronimo-spec-j2ee-deployment-1.1-api.build.xml
Source17: geronimo-spec-j2ee-management-1.0-api.build.xml
Source18: geronimo-spec-qname-1.1-api.build.xml
Source19: geronimo-spec-saaj-1.1-api.build.xml
Source20: geronimo-spec-servlet-2.4-api.build.xml
Patch1: geronimo-specs-j2ee-management-pom.patch
Patch2: geronimo-specs-pom_xml.patch
Patch3: geronimo-spec-javamail-sun-security.patch
License: The Apache Software License
Group: Development/Languages/Java
BuildRequires: jpackage-utils >= 1.7.2
%if %{with_maven}
BuildRequires: maven2 >= 2.0.4
BuildRequires: maven2-plugin-javadoc
BuildRequires: maven-shared-file-management
%else
BuildRequires: ant
BuildRequires: java-devel
%endif
BuildRequires: sed
BuildRequires: saxon
BuildRequires: saxon-scripts
%if %{with_maven}
BuildRequires: maven2-plugin-assembly
BuildRequires: maven2-plugin-compiler
BuildRequires: maven2-plugin-install
BuildRequires: maven2-plugin-jar
BuildRequires: maven2-plugin-one
BuildRequires: maven2-plugin-resources
BuildRequires: maven2-plugin-surefire
BuildRequires: excalibur-avalon-logkit
BuildRequires: mojo-maven2-plugin-idlj
BuildRequires: jacorb >= 2.2.3
BuildRequires: ws-scout
%if %{with_tests}
BuildRequires: junit >= 3.8.1
BuildRequires: mockobjects >= 0.09
BuildRequires: mockobjects < 0.10
BuildRequires: mockobjects-jdk1.4-j2ee1.4 >= 0.09
BuildRequires: mockobjects-jdk1.4-j2ee1.4 < 0.10
%endif
%endif
BuildRequires: mx4j >= 2.0.1
Requires: mx4j >= 2.0.1
%if %{with_maven}
Requires: avalon-logkit
Requires: ws-scout
%endif
# The main package has links to all specs, so it requires all subpackages
# except j2ee-schema (not linked) and javadocs
%if %defined suse_version
PreReq: coreutils
%endif
Requires: geronimo-commonj-1_1-apis = %{version}-%{release}
Requires: geronimo-jaf-1_0_2-api = %{version}-%{release}
Requires: geronimo-corba-1_0-apis = %{version}-%{release}
Requires: geronimo-corba-2_3-apis = %{version}-%{release}
#Requires: geronimo-corba-3_0-apis = %{version}-%{release}
Requires: geronimo-ejb-2_1-api = %{version}-%{release}
Requires: geronimo-j2ee-1_4-apis = %{version}-%{release}
Requires: geronimo-j2ee-connector-1_5-api = %{version}-%{release}
Requires: geronimo-j2ee-deployment-1_1-api = %{version}-%{release}
Requires: geronimo-jacc-1_0-api = %{version}-%{release}
Requires: geronimo-j2ee-management-1_0-api = %{version}-%{release}
Requires: geronimo-javamail-1_3_1-api = %{version}-%{release}
Requires: geronimo-jaxr-1_0-api = %{version}-%{release}
Requires: geronimo-jaxrpc-1_1-api = %{version}-%{release}
Requires: geronimo-jms-1_1-api = %{version}-%{release}
Requires: geronimo-jsp-2_0-api = %{version}-%{release}
Requires: geronimo-jta-1_0_1B-api = %{version}-%{release}
Requires: geronimo-qname-1_1-api = %{version}-%{release}
Requires: geronimo-saaj-1_1-api = %{version}-%{release}
Requires: geronimo-servlet-2_4-api = %{version}-%{release}
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Geronimo is Apache's ASF-licenced J2EE server project. These are the
J2EE-Specifications Note: You should use the subpackages for the
Specifications that you actually need. The ones installed by the main
package are deprecated and will disapear in future releases.
%if %{with_maven}
%package javadoc
Summary: Javadoc for %{name}
Group: Development/Documentation
%description javadoc
Javadoc for %{name}.
%endif
%package -n geronimo-commonj-1_1-apis
License: The Apache Software License
Summary: Geronimo J2EE server J2EE specifications
Group: Development/Languages/Java
Requires: %{name}-poms = %{version}-%{release}
%description -n geronimo-commonj-1_1-apis
Geronimo is Apache's ASF-licenced J2EE server project. These are the
J2EE-Specifications: CommonJ Spec
%package -n geronimo-jaf-1_0_2-api
License: The Apache Software License
Summary: Geronimo J2EE server J2EE specifications
Group: Development/Languages/Java
Provides: jaf = 1.0.2
Requires: %{name}-poms = %{version}-%{release}
# Don't obsolete jaf, classpathx-jaf provides it
# Don't even obsolete it versioned, as sun-jaf is at 1.1
#Obsoletes: jaf
Requires(preun): /usr/sbin/update-alternatives
Requires(post): /usr/sbin/update-alternatives
Conflicts: gnu-jaf
%description -n geronimo-jaf-1_0_2-api
Geronimo is Apache's ASF-licenced J2EE server project. These are the
J2EE-Specifications: Java Activation Framework
%package -n geronimo-corba-1_0-apis
License: The Apache Software License
Summary: Geronimo J2EE server J2EE specifications
Group: Development/Languages/Java
Requires: %{name}-poms = %{version}-%{release}
%description -n geronimo-corba-1_0-apis
Geronimo is Apache's ASF-licenced J2EE server project. These are the
J2EE-Specifications: CORBA 1.0 Spec
%package -n geronimo-corba-2_3-apis
License: The Apache Software License
Summary: Geronimo J2EE server J2EE specifications
Group: Development/Languages/Java
Requires: %{name}-poms = %{version}-%{release}
%description -n geronimo-corba-2_3-apis
Geronimo is Apache's ASF-licenced J2EE server project. These are the
J2EE-Specifications: CORBA 2.3 Spec
%package -n geronimo-ejb-2_1-api
License: The Apache Software License
Summary: Geronimo J2EE server J2EE specifications
Group: Development/Languages/Java
Provides: ejb = 2.1
Obsoletes: ejb
Requires: %{name}-poms = %{version}-%{release}
Requires(preun): /usr/sbin/update-alternatives
Requires(post): /usr/sbin/update-alternatives
%description -n geronimo-ejb-2_1-api
Geronimo is Apache's ASF-licenced J2EE server project. These are the
J2EE-Specifications: Enterprise JavaBeans Specification
%package -n geronimo-j2ee-1_4-apis
License: The Apache Software License
Summary: Geronimo J2EE server J2EE specifications
Group: Development/Languages/Java
Requires: %{name}-poms = %{version}-%{release}
%description -n geronimo-j2ee-1_4-apis
Geronimo is Apache's ASF-licenced J2EE server project. These are the
J2EE-Specifications: J2EE Specification (the complete set in one jar)
%package -n geronimo-j2ee-connector-1_5-api
License: The Apache Software License
Summary: Geronimo J2EE server J2EE specifications
Group: Development/Languages/Java
Provides: j2ee-connector = 1.5
Obsoletes: j2ee-connector
Requires: %{name}-poms = %{version}-%{release}
Requires(preun): /usr/sbin/update-alternatives
Requires(post): /usr/sbin/update-alternatives
%description -n geronimo-j2ee-connector-1_5-api
Geronimo is Apache's ASF-licenced J2EE server project. These are the
J2EE-Specifications: J2EE Connector Architecture Specification
%package -n geronimo-j2ee-deployment-1_1-api
License: The Apache Software License
Summary: Geronimo J2EE server J2EE specifications
Group: Development/Languages/Java
Provides: j2ee-deployment = 1.1
Obsoletes: j2ee-deployment
Requires: %{name}-poms = %{version}-%{release}
Requires(preun): /usr/sbin/update-alternatives
Requires(post): /usr/sbin/update-alternatives
%description -n geronimo-j2ee-deployment-1_1-api
Geronimo is Apache's ASF-licenced J2EE server project. These are the
J2EE-Specifications: J2EE Application Deployment Specification
%package -n geronimo-jacc-1_0-api
License: The Apache Software License
Summary: Geronimo J2EE server J2EE specifications
Group: Development/Languages/Java
#Provides: geronimo-jacc-1.0-api
Provides: jacc = 1.0
Requires: %{name}-poms = %{version}-%{release}
Requires(preun): /usr/sbin/update-alternatives
Requires(post): /usr/sbin/update-alternatives
%description -n geronimo-jacc-1_0-api
Geronimo is Apache's ASF-licenced J2EE server project. These are the
J2EE-Specifications: Java Authorization Contract for Containers
Specification
%package -n geronimo-j2ee-management-1_0-api
License: The Apache Software License
Summary: Geronimo J2EE server J2EE specifications
Group: Development/Languages/Java
Provides: j2ee-management = 1.0
Obsoletes: j2ee-management
Requires: %{name}-poms = %{version}-%{release}
Requires(preun): /usr/sbin/update-alternatives
Requires(post): /usr/sbin/update-alternatives
%description -n geronimo-j2ee-management-1_0-api
Geronimo is Apache's ASF-licenced J2EE server project. These are the
J2EE-Specifications: J2EE Application Management Specification
%package -n geronimo-javamail-1_3_1-api
License: The Apache Software License
Summary: Geronimo J2EE server J2EE specifications
Group: Development/Languages/Java
Requires: %{name}-poms = %{version}-%{release}
# Do not provide it as this is just the API (is it?) and
# our 'javamail' alternative means the providers as well
# all in a single jar file called 'javamail.jar'
#Provides: javamail = 0:1.3.1
%description -n geronimo-javamail-1_3_1-api
Geronimo is Apache's ASF-licenced J2EE server project. These are the
J2EE-Specifications: JavaMail API
%package -n geronimo-jaxr-1_0-api
License: The Apache Software License
Summary: Geronimo J2EE server J2EE specifications
Group: Development/Languages/Java
Provides: jaxr = 1.0
Provides: jaxr-api
Obsoletes: jaxr-api
Requires: %{name}-poms = %{version}-%{release}
Requires(preun): /usr/sbin/update-alternatives
Requires(post): /usr/sbin/update-alternatives
%description -n geronimo-jaxr-1_0-api
Geronimo is Apache's ASF-licenced J2EE server project. These are the
J2EE-Specifications: Java API for XML Registries (JAXR)
%package -n geronimo-jaxrpc-1_1-api
License: The Apache Software License
Summary: Geronimo J2EE server J2EE specifications
Group: Development/Languages/Java
Provides: jaxrpc = 1.1
Requires: %{name}-poms = %{version}-%{release}
Requires(preun): /usr/sbin/update-alternatives
Requires(post): /usr/sbin/update-alternatives
%description -n geronimo-jaxrpc-1_1-api
Geronimo is Apache's ASF-licenced J2EE server project. These are the
J2EE-Specifications: Java API for XML-Based RPC (JAXRPC)
%package -n geronimo-jms-1_1-api
License: The Apache Software License
Summary: Geronimo J2EE server J2EE specifications
Group: Development/Languages/Java
Provides: jms = 1.1
Obsoletes: jms
Requires: %{name}-poms = %{version}-%{release}
Requires(preun): /usr/sbin/update-alternatives
Requires(post): /usr/sbin/update-alternatives
%description -n geronimo-jms-1_1-api
Geronimo is Apache's ASF-licenced J2EE server project. These are the
J2EE-Specifications: JMS Specification
%package -n geronimo-jsp-2_0-api
License: The Apache Software License
Summary: Geronimo J2EE server J2EE specifications
Group: Development/Languages/Java
Provides: jsp = 2.0
Requires: %{name}-poms = %{version}-%{release}
Requires(preun): /usr/sbin/update-alternatives
Requires(post): /usr/sbin/update-alternatives
%description -n geronimo-jsp-2_0-api
Geronimo is Apache's ASF-licenced J2EE server project. These are the
J2EE-Specifications: JavaServer Pages Specification
%package -n geronimo-jta-1_0_1B-api
License: The Apache Software License
Summary: Geronimo J2EE server J2EE specifications
Group: Development/Languages/Java
Provides: jta = 1.0.1B
# Don't obsolete jta, as this is provided by java-1.4.2-gcj-compat
#Obsoletes: jta
Requires: %{name}-poms = %{version}-%{release}
Requires(preun): /usr/sbin/update-alternatives
Requires(post): /usr/sbin/update-alternatives
%description -n geronimo-jta-1_0_1B-api
Geronimo is Apache's ASF-licenced J2EE server project. These are the
J2EE-Specifications: Java Transaction API Specification
%package -n geronimo-qname-1_1-api
License: The Apache Software License
Summary: Geronimo J2EE server J2EE specifications
Group: Development/Languages/Java
Requires: %{name}-poms = %{version}-%{release}
Requires(preun): /usr/sbin/update-alternatives
Requires(post): /usr/sbin/update-alternatives
%description -n geronimo-qname-1_1-api
Geronimo is Apache's ASF-licenced J2EE server project. These are the
J2EE-Specifications: javax.xml.namespace.QName API
%package -n geronimo-saaj-1_1-api
License: The Apache Software License
Summary: Geronimo J2EE server J2EE specifications
Group: Development/Languages/Java
Provides: saaj = 1.1
Requires: %{name}-poms = %{version}-%{release}
Requires(preun): /usr/sbin/update-alternatives
Requires(post): /usr/sbin/update-alternatives
%description -n geronimo-saaj-1_1-api
Geronimo is Apache's ASF-licenced J2EE server project. These are the
J2EE-Specifications: SOAP with Attachments API for Java (SAAJ)
%package -n geronimo-servlet-2_4-api
License: The Apache Software License
Summary: Geronimo J2EE server J2EE specifications
Group: Development/Languages/Java
Provides: servlet = 2.4
Requires: %{name}-poms = %{version}-%{release}
Requires(preun): /usr/sbin/update-alternatives
Requires(post): /usr/sbin/update-alternatives
%description -n geronimo-servlet-2_4-api
Geronimo is Apache's ASF-licenced J2EE server project. These are the
J2EE-Specifications: J2EE Servlet v2.4 API
%package poms
License: The Apache Software License
Summary: Geronimo J2EE server J2EE specifications
Group: Development/Languages/Java
%if %defined suse_version
PreReq: coreutils
%endif
Requires(post): jpackage-utils >= 1.7.3
Requires(postun): jpackage-utils >= 1.7.3
%description poms
Geronimo is Apache's ASF-licenced J2EE server project. These are the
J2EE-Specifications: The Project Object Model files for the
geronimo-specs modules.
%prep
%setup -q -n %{name}-%{version}
chmod -R go=u-w *
mkdir etc
cp %{bname}-spec-activation/LICENSE.txt etc
mkdir external_repo
ln -s %{_javadir} external_repo/JPP
%patch1 -b .sav
%patch2 -b .sav
%patch3 -b .sav3
%if ! %{with_maven}
cp %{SOURCE2} geronimo-spec-commonj/build.xml
cp %{SOURCE3} geronimo-spec-corba/build.xml
cp %{SOURCE4} geronimo-spec-corba-2.3/build.xml
cp %{SOURCE5} geronimo-spec-corba-3.0/build.xml
cp %{SOURCE6} geronimo-spec-ejb/build.xml
cp %{SOURCE7} geronimo-spec-j2ee-jacc/build.xml
cp %{SOURCE8} geronimo-spec-activation/build.xml
cp %{SOURCE9} geronimo-spec-javamail/build.xml
cp %{SOURCE10} geronimo-spec-jaxrpc/build.xml
cp %{SOURCE11} geronimo-spec-jaxr/build.xml
cp %{SOURCE12} geronimo-spec-jms/build.xml
cp %{SOURCE13} geronimo-spec-jsp/build.xml
cp %{SOURCE14} geronimo-spec-jta/build.xml
cp %{SOURCE15} geronimo-spec-j2ee-connector/build.xml
cp %{SOURCE16} geronimo-spec-j2ee-deployment/build.xml
cp %{SOURCE17} geronimo-spec-j2ee-management/build.xml
cp %{SOURCE18} geronimo-spec-qname/build.xml
cp %{SOURCE19} geronimo-spec-saaj/build.xml
cp %{SOURCE20} geronimo-spec-servlet/build.xml
%endif
# wrong end of line encoding
sed -i -e 's/.$//' geronimo-spec-jaxr/LICENSE.txt \
geronimo-spec-jaxrpc/LICENSE.txt \
geronimo-spec-corba-3.0/LICENSE.txt \
geronimo-spec-corba-3.0/LICENSE.txt \
geronimo-spec-corba-2.3/LICENSE.txt \
geronimo-spec-j2ee-connector/LICENSE.txt \
geronimo-spec-j2ee-jacc/LICENSE.txt \
geronimo-spec-qname/LICENSE.txt \
geronimo-spec-saaj/LICENSE.txt
%build
[ -z "$JAVA_HOME" ] && JAVA_HOME=%{_jvmdir}/java
export JAVA_HOME
# Mock objects is sort of a specia case since it does not reside in
# /usr/share/java. So we install it manually via maven.
%if %{with_maven}
export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
mkdir -p $MAVEN_REPO_LOCAL
mvn-jpp install:install-file \
-Dmaven.repo.local=$MAVEN_REPO_LOCAL \
-DgroupId=mockobjects \
-DartifactId=mockobjects-jdk1.4-j2ee1.3 \
-Dversion=0.09 \
-Dpackaging=jar \
-Dfile=$(build-classpath mockobjects-j2ee1.4)
# Start building
mvn-jpp \
-Dmaven.repo.local=$MAVEN_REPO_LOCAL \
-Dmaven.test.failure.ignore=true \
-Dmaven2.jpp.depmap.file=%{SOURCE1} \
%if %{without_tests}
-Dmaven.test.skip=true \
%endif
install javadoc:javadoc
pushd geronimo-spec-j2ee
mvn-jpp \
-Dmaven.repo.local=$MAVEN_REPO_LOCAL \
-Dmaven.test.failure.ignore=true \
-Dmaven2.jpp.depmap.file=%{SOURCE1} \
%if %{without_tests}
-Dmaven.test.skip=true \
%endif
install
popd
%else
# unconditional builds
for dir in activation commonj jms jta j2ee-connector j2ee-deployment qname servlet; do
pushd geronimo-spec-${dir}
ant
popd
done
# this function do not fail
# necessary for missing org.omg.CORBA.Environment
function idl_compile ()
{
if [[ ${2} == "" ]]; then
idlj -td ../java ${1}.idl || echo "Warning"
else
idlj -pkgPrefix ${2} ${1} -td ../java ${2}.idl || echo "Warning"
fi
}
export CLASSPATH=../geronimo-spec-jta/target/geronimo-jta_1.0.1B_spec-1.0.1.jar
for dir in corba corba-2.3; do
pushd geronimo-spec-${dir}
pushd src/main/idl
#idlj -pkgPrefix CosNaming org.omg -td src/main/java/ src/main/idl/CosNaming.idl
cp geronimo-orb.idl CORBA.idl
idl_compile org.omg CORBA
idl_compile org.omg CosNaming
idl_compile CosTransactions
idl_compile org.omg CosTransactions
idl_compile org.omg CosTSInteroperation
idl_compile org.omg CosTSPortability
idl_compile CSI
idl_compile org.omg CSI
idl_compile CSIIOP
idl_compile org.omg CSIIOP
idl_compile org.omg GIOP
idl_compile org.omg GSSUP
idl_compile org.omg IIOP
idl_compile IOP
idl_compile org.omg IOP
idl_compile Security
idl_compile org.omg Security
idl_compile org.omg SSLIOP
idl_compile TimeBase
idl_compile org.omg TimeBase
popd
ant
popd
done
pushd geronimo-spec-ejb
ant
popd
export CLASSPATH=../geronimo-spec-activation/target/geronimo-activation_1.0.2_spec-1.1.jar
pushd geronimo-spec-javamail
ant
popd
pushd geronimo-spec-jaxr
ant
popd
pushd geronimo-spec-saaj
ant
popd
export CLASSPATH=../geronimo-spec-servlet/target/geronimo-servlet_2.4_spec-1.0.1.jar
pushd geronimo-spec-jsp
ant
popd
pushd geronimo-spec-j2ee-jacc
ant
popd
export CLASSPATH=../geronimo-spec-saaj/target/geronimo-saaj_1.1_spec-1.0.1.jar:../geronimo-spec-servlet/target/geronimo-servlet_2.4_spec-1.0.1.jar
pushd geronimo-spec-jaxrpc
ant
popd
export CLASSPATH=../geronimo-spec-ejb/target/geronimo-ejb_2.1_spec-1.0.1.jar
pushd geronimo-spec-j2ee-management
ant
popd
#FIXME
#pushd geronimo-spec-corba-3.0
#ant
#popd
# j2ee-apis
pushd geronimo-spec-j2ee
mkdir build
mkdir target
pushd build
for jar in $(find ../../ -iname '*.jar'); do
jar -xf ${jar}
done
jar -cf ../target/geronimo-j2ee_1.4_spec-1.1.jar *
popd
popd
%endif
%install
export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
# Directory for poms
install -d -m 0755 $RPM_BUILD_ROOT%{_datadir}/maven2/poms
# subpackage jars
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}
install -p -m 0644 geronimo-spec-activation/target/geronimo-activation_1.0.2_spec-1.1.jar \
$RPM_BUILD_ROOT%{_javadir}/geronimo-jaf-1.0.2-api-%{version}.jar
pushd $RPM_BUILD_ROOT%{_javadir}
ln -sf geronimo-jaf-1.0.2-api-%{version}.jar geronimo-jaf-1.0.2-api.jar
popd
touch $RPM_BUILD_ROOT%{_javadir}/jaf.jar # for %ghost
%if %{with_maven}
cp $MAVEN_REPO_LOCAL/org/apache/geronimo/specs/geronimo-activation_1.0.2_spec/1.1/geronimo-activation_1.0.2_spec-1.1.pom \
$RPM_BUILD_ROOT/%{_datadir}/maven2/poms/JPP-geronimo-jaf-1.0.2-api.pom
%add_to_maven_depmap org.apache.geronimo.specs geronimo-activation_1.0.2_spec 1.1 JPP geronimo-jaf-1.0.2-api
%endif
install -p -m 0644 geronimo-spec-corba-2.3/target/geronimo-corba_2.3_spec-1.1.jar \
$RPM_BUILD_ROOT%{_javadir}/geronimo-corba-2.3-apis-%{version}.jar
pushd $RPM_BUILD_ROOT%{_javadir}
ln -sf geronimo-corba-2.3-apis-%{version}.jar geronimo-corba-2.3-apis.jar
popd
%if %{with_maven}
cp $MAVEN_REPO_LOCAL/org/apache/geronimo/specs/geronimo-corba_2.3_spec/1.1/geronimo-corba_2.3_spec-1.1.pom \
$RPM_BUILD_ROOT/%{_datadir}/maven2/poms/JPP-geronimo-corba-2.3-apis.pom
%add_to_maven_depmap org.apache.geronimo.specs geronimo-corba_2.3_spec 1.1 JPP geronimo-corba-2.3-apis
%endif
#install -p -m 0644 geronimo-spec-corba-3.0/target/geronimo-corba_3.0_spec-1.1.jar \
# $RPM_BUILD_ROOT%{_javadir}/geronimo-corba-3.0-apis-%{version}.jar
#pushd $RPM_BUILD_ROOT%{_javadir}
# ln -sf geronimo-corba-3.0-apis-%{version}.jar geronimo-corba-3.0-apis.jar
#popd
#cp $MAVEN_REPO_LOCAL/org/apache/geronimo/specs/geronimo-corba_3.0_spec/1.1/geronimo-corba_3.0_spec-1.1.pom \
# $RPM_BUILD_ROOT/%{_datadir}/maven2/poms/JPP-geronimo-corba-3.0-apis.pom
#%add_to_maven_depmap org.apache.geronimo.specs geronimo-corba_3.0_spec 1.1 JPP geronimo-corba-3.0-apis
install -p -m 0644 geronimo-spec-corba/target/geronimo-spec-corba-1.0.jar \
$RPM_BUILD_ROOT%{_javadir}/geronimo-corba-1.0-apis-%{version}.jar
pushd $RPM_BUILD_ROOT%{_javadir}
ln -sf geronimo-corba-1.0-apis-%{version}.jar geronimo-corba-1.0-apis.jar
popd
%if %{with_maven}
cp $MAVEN_REPO_LOCAL/geronimo-spec/geronimo-spec-corba/1.0/geronimo-spec-corba-1.0.pom \
$RPM_BUILD_ROOT/%{_datadir}/maven2/poms/JPP-geronimo-corba-1.0-apis.pom
%add_to_maven_depmap geronimo-spec geronimo-spec-corba 1.0 JPP geronimo-corba-1.0-apis
%endif
install -p -m 0644 geronimo-spec-ejb/target/geronimo-ejb_2.1_spec-1.0.1.jar \
$RPM_BUILD_ROOT%{_javadir}/geronimo-ejb-2.1-api-%{version}.jar
pushd $RPM_BUILD_ROOT%{_javadir}
ln -sf geronimo-ejb-2.1-api-%{version}.jar geronimo-ejb-2.1-api.jar
popd
touch $RPM_BUILD_ROOT%{_javadir}/ejb.jar # for %ghost
%if %{with_maven}
cp $MAVEN_REPO_LOCAL/org/apache/geronimo/specs/geronimo-ejb_2.1_spec/1.0.1/geronimo-ejb_2.1_spec-1.0.1.pom \
$RPM_BUILD_ROOT/%{_datadir}/maven2/poms/JPP-geronimo-ejb-2.1-api.pom
%add_to_maven_depmap org.apache.geronimo.specs geronimo-ejb_2.1_spec 1.0.1 JPP geronimo-ejb-2.1-api
%endif
install -p -m 0644 geronimo-spec-j2ee-connector/target/geronimo-j2ee-connector_1.5_spec-1.0.1.jar \
$RPM_BUILD_ROOT%{_javadir}/geronimo-j2ee-connector-1.5-api-%{version}.jar
pushd $RPM_BUILD_ROOT%{_javadir}
ln -sf geronimo-j2ee-connector-1.5-api-%{version}.jar \
geronimo-j2ee-connector-1.5-api.jar
popd
touch $RPM_BUILD_ROOT%{_javadir}/j2ee-connector.jar # for %ghost
%if %{with_maven}
cp $MAVEN_REPO_LOCAL/org/apache/geronimo/specs/geronimo-j2ee-connector_1.5_spec/1.0.1/geronimo-j2ee-connector_1.5_spec-1.0.1.pom \
$RPM_BUILD_ROOT/%{_datadir}/maven2/poms/JPP-geronimo-j2ee-connector-1.5-api.pom
%add_to_maven_depmap org.apache.geronimo.specs geronimo-j2ee-connector_1.5_spec 1.0.1 JPP geronimo-j2ee-connector-1.5-api
%endif
install -p -m 0644 geronimo-spec-j2ee-deployment/target/geronimo-j2ee-deployment_1.1_spec-1.0.1.jar \
$RPM_BUILD_ROOT%{_javadir}/geronimo-j2ee-deployment-1.1-api-%{version}.jar
pushd $RPM_BUILD_ROOT%{_javadir}
ln -sf geronimo-j2ee-deployment-1.1-api-%{version}.jar \
geronimo-j2ee-deployment-1.1-api.jar
popd
touch $RPM_BUILD_ROOT%{_javadir}/j2ee-deployment.jar # for %ghost
%if %{with_maven}
cp $MAVEN_REPO_LOCAL/org/apache/geronimo/specs/geronimo-j2ee-deployment_1.1_spec/1.0.1/geronimo-j2ee-deployment_1.1_spec-1.0.1.pom \
$RPM_BUILD_ROOT/%{_datadir}/maven2/poms/JPP-geronimo-j2ee-deployment-1.1-api.pom
%add_to_maven_depmap org.apache.geronimo.specs geronimo-j2ee-deployment_1.1_spec 1.0.1 JPP geronimo-j2ee-deployment-1.1-api
%endif
install -p -m 0644 geronimo-spec-j2ee-jacc/target/geronimo-j2ee-jacc_1.0_spec-1.0.1.jar \
$RPM_BUILD_ROOT%{_javadir}/geronimo-jacc-1.0-api-%{version}.jar
pushd $RPM_BUILD_ROOT%{_javadir}
ln -sf geronimo-jacc-1.0-api-%{version}.jar geronimo-jacc-1.0-api.jar
popd
touch $RPM_BUILD_ROOT%{_javadir}/jacc.jar # for %ghost
%if %{with_maven}
cp $MAVEN_REPO_LOCAL/org/apache/geronimo/specs/geronimo-j2ee-jacc_1.0_spec/1.0.1/geronimo-j2ee-jacc_1.0_spec-1.0.1.pom \
$RPM_BUILD_ROOT/%{_datadir}/maven2/poms/JPP-geronimo-jacc-1.0-api.pom
%add_to_maven_depmap org.apache.geronimo.specs geronimo-j2ee-jacc_1.0_spec 1.0.1 JPP geronimo-jacc-1.0-api
%endif
install -p -m 0644 geronimo-spec-j2ee-management/target/geronimo-j2ee-management_1.0_spec-1.0.1.jar \
$RPM_BUILD_ROOT%{_javadir}/geronimo-j2ee-management-1.0-api-%{version}.jar
pushd $RPM_BUILD_ROOT%{_javadir}
ln -sf geronimo-j2ee-management-1.0-api-%{version}.jar \
geronimo-j2ee-management-1.0-api.jar
popd
touch $RPM_BUILD_ROOT%{_javadir}/j2ee-management.jar # for %ghost
%if %{with_maven}
cp $MAVEN_REPO_LOCAL/org/apache/geronimo/specs/geronimo-j2ee-management_1.0_spec/1.0.1/geronimo-j2ee-management_1.0_spec-1.0.1.pom \
$RPM_BUILD_ROOT/%{_datadir}/maven2/poms/JPP-geronimo-j2ee-management-1.0-api.pom
%add_to_maven_depmap org.apache.geronimo.specs geronimo-j2ee-management_1.0_spec 1.0.1 JPP geronimo-j2ee-management-1.0-api
%endif
install -p -m 0644 geronimo-spec-javamail/target/geronimo-javamail_1.3.1_spec-1.1.jar \
$RPM_BUILD_ROOT%{_javadir}/geronimo-javamail-1.3.1-api-%{version}.jar
pushd $RPM_BUILD_ROOT%{_javadir}
ln -sf geronimo-javamail-1.3.1-api-%{version}.jar \
geronimo-javamail-1.3.1-api.jar
popd
# Do not provide it as this is just the API (is it?) and
# our 'javamail' alternative means the providers as well
# all in a single jar file called 'javamail.jar'
#touch $RPM_BUILD_ROOT%{_javadir}/javamail.jar # for %ghost
%if %{with_maven}
cp $MAVEN_REPO_LOCAL/org/apache/geronimo/specs/geronimo-javamail_1.3.1_spec/1.1/geronimo-javamail_1.3.1_spec-1.1.pom \
$RPM_BUILD_ROOT/%{_datadir}/maven2/poms/JPP-geronimo-javamail-1.3.1-api.pom
%add_to_maven_depmap org.apache.geronimo.specs geronimo-javamail_1.3.1_spec 1.1 JPP geronimo-javamail-1.3.1-api
%endif
install -p -m 0644 geronimo-spec-jaxr/target/geronimo-jaxr_1.0_spec-1.0.1.jar \
$RPM_BUILD_ROOT%{_javadir}/geronimo-jaxr-1.0-api-%{version}.jar
pushd $RPM_BUILD_ROOT%{_javadir}
ln -sf geronimo-jaxr-1.0-api-%{version}.jar geronimo-jaxr-1.0-api.jar
popd
touch $RPM_BUILD_ROOT%{_javadir}/jaxr.jar # for %ghost
%if %{with_maven}
cp $MAVEN_REPO_LOCAL/org/apache/geronimo/specs/geronimo-jaxr_1.0_spec/1.0.1/geronimo-jaxr_1.0_spec-1.0.1.pom \
$RPM_BUILD_ROOT/%{_datadir}/maven2/poms/JPP-geronimo-jaxr-1.0-api.pom
%add_to_maven_depmap org.apache.geronimo.specs geronimo-jaxr_1.0_spec 1.0.1 JPP geronimo-jaxr-1.0-api
%endif
install -p -m 0644 geronimo-spec-jaxrpc/target/geronimo-jaxrpc_1.1_spec-1.0.1.jar \
$RPM_BUILD_ROOT%{_javadir}/geronimo-jaxrpc-1.1-api-%{version}.jar
pushd $RPM_BUILD_ROOT%{_javadir}
ln -sf geronimo-jaxrpc-1.1-api-%{version}.jar geronimo-jaxrpc-1.1-api.jar
popd
touch $RPM_BUILD_ROOT%{_javadir}/jaxrpc.jar # for %ghost
%if %{with_maven}
cp $MAVEN_REPO_LOCAL/org/apache/geronimo/specs/geronimo-jaxrpc_1.1_spec/1.0.1/geronimo-jaxrpc_1.1_spec-1.0.1.pom \
$RPM_BUILD_ROOT/%{_datadir}/maven2/poms/JPP-geronimo-jaxrpc-1.1-api.pom
%add_to_maven_depmap org.apache.geronimo.specs geronimo-jaxrpc_1.1_spec 1.0.1 JPP geronimo-jaxrpc-1.1-api
%endif
install -p -m 0644 geronimo-spec-j2ee/target/geronimo-j2ee_1.4_spec-1.1.jar \
$RPM_BUILD_ROOT%{_javadir}/geronimo-j2ee-1.4-apis-%{version}.jar
pushd $RPM_BUILD_ROOT%{_javadir}
ln -sf geronimo-j2ee-1.4-apis-%{version}.jar geronimo-j2ee-1.4-apis.jar
popd
%if %{with_maven}
cp $MAVEN_REPO_LOCAL/org/apache/geronimo/specs/geronimo-j2ee_1.4_spec/1.1/geronimo-j2ee_1.4_spec-1.1.pom \
$RPM_BUILD_ROOT/%{_datadir}/maven2/poms/JPP-geronimo-j2ee-1.4-apis.pom
%add_to_maven_depmap org.apache.geronimo.specs geronimo-j2ee_1.4_spec 1.1 JPP geronimo-j2ee-1.4-apis
%endif
install -p -m 0644 geronimo-spec-jms/target/geronimo-jms_1.1_spec-1.0.1.jar \
$RPM_BUILD_ROOT%{_javadir}/geronimo-jms-1.1-api-%{version}.jar
pushd $RPM_BUILD_ROOT%{_javadir}
ln -sf geronimo-jms-1.1-api-%{version}.jar geronimo-jms-1.1-api.jar
popd
touch $RPM_BUILD_ROOT%{_javadir}/jms.jar # for %ghost
%if %{with_maven}
cp $MAVEN_REPO_LOCAL/org/apache/geronimo/specs/geronimo-jms_1.1_spec/1.0.1/geronimo-jms_1.1_spec-1.0.1.pom \
$RPM_BUILD_ROOT/%{_datadir}/maven2/poms/JPP-geronimo-jms-1.1-api.pom
%add_to_maven_depmap org.apache.geronimo.specs geronimo-jms_1.1_spec 1.0.1 JPP geronimo-jms-1.1-api
%endif
install -p -m 0644 geronimo-spec-jsp/target/geronimo-jsp_2.0_spec-1.0.1.jar \
$RPM_BUILD_ROOT%{_javadir}/geronimo-jsp-2.0-api-%{version}.jar
pushd $RPM_BUILD_ROOT%{_javadir}
ln -sf geronimo-jsp-2.0-api-%{version}.jar geronimo-jsp-2.0-api.jar
popd
touch $RPM_BUILD_ROOT%{_javadir}/jsp.jar # for %ghost
%if %{with_maven}
cp $MAVEN_REPO_LOCAL/org/apache/geronimo/specs/geronimo-jsp_2.0_spec/1.0.1/geronimo-jsp_2.0_spec-1.0.1.pom \
$RPM_BUILD_ROOT/%{_datadir}/maven2/poms/JPP-geronimo-jsp-2.0-api.pom
%add_to_maven_depmap org.apache.geronimo.specs geronimo-jsp_2.0_spec 1.0.1 JPP geronimo-jsp-2.0-api
%endif
install -p -m 0644 geronimo-spec-jta/target/geronimo-jta_1.0.1B_spec-1.0.1.jar \
$RPM_BUILD_ROOT%{_javadir}/geronimo-jta-1.0.1B-api-%{version}.jar
pushd $RPM_BUILD_ROOT%{_javadir}
ln -sf geronimo-jta-1.0.1B-api-%{version}.jar geronimo-jta-1.0.1B-api.jar
popd
touch $RPM_BUILD_ROOT%{_javadir}/jta.jar # for %ghost
%if %{with_maven}
cp $MAVEN_REPO_LOCAL/org/apache/geronimo/specs/geronimo-jta_1.0.1B_spec/1.0.1/geronimo-jta_1.0.1B_spec-1.0.1.pom \
$RPM_BUILD_ROOT/%{_datadir}/maven2/poms/JPP-geronimo-jta-1.0.1B-api.pom
%add_to_maven_depmap org.apache.geronimo.specs geronimo-jta_1.0.1B_spec 1.0.1 JPP geronimo-jta-1.0.1B-api
%endif
install -p -m 0644 geronimo-spec-qname/target/geronimo-qname_1.1_spec-1.0.1.jar \
$RPM_BUILD_ROOT%{_javadir}/geronimo-qname-1.1-api-%{version}.jar
pushd $RPM_BUILD_ROOT%{_javadir}
ln -sf geronimo-qname-1.1-api-%{version}.jar geronimo-qname-1.1-api.jar
popd
touch $RPM_BUILD_ROOT%{_javadir}/qname.jar # for %ghost
%if %{with_maven}
cp $MAVEN_REPO_LOCAL/org/apache/geronimo/specs/geronimo-qname_1.1_spec/1.0.1/geronimo-qname_1.1_spec-1.0.1.pom \
$RPM_BUILD_ROOT/%{_datadir}/maven2/poms/JPP-geronimo-qname-1.1-api.pom
%add_to_maven_depmap org.apache.geronimo.specs geronimo-qname_1.1_spec 1.0.1 JPP geronimo-qname-1.1-api
%endif
install -p -m 0644 geronimo-spec-saaj/target/geronimo-saaj_1.1_spec-1.0.1.jar \
$RPM_BUILD_ROOT%{_javadir}/geronimo-saaj-1.1-api-%{version}.jar
pushd $RPM_BUILD_ROOT%{_javadir}
ln -sf geronimo-saaj-1.1-api-%{version}.jar geronimo-saaj-1.1-api.jar
popd
touch $RPM_BUILD_ROOT%{_javadir}/saaj.jar # for %ghost
%if %{with_maven}
cp $MAVEN_REPO_LOCAL/org/apache/geronimo/specs/geronimo-saaj_1.1_spec/1.0.1/geronimo-saaj_1.1_spec-1.0.1.pom \
$RPM_BUILD_ROOT/%{_datadir}/maven2/poms/JPP-geronimo-saaj-1.1-api.pom
%add_to_maven_depmap org.apache.geronimo.specs geronimo-saaj_1.1_spec 1.0.1 JPP geronimo-saaj-1.1-api
%endif
install -p -m 0644 geronimo-spec-servlet/target/geronimo-servlet_2.4_spec-1.0.1.jar \
$RPM_BUILD_ROOT%{_javadir}/geronimo-servlet-2.4-api-%{version}.jar
pushd $RPM_BUILD_ROOT%{_javadir}
ln -sf geronimo-servlet-2.4-api-%{version}.jar geronimo-servlet-2.4-api.jar
popd
touch $RPM_BUILD_ROOT%{_javadir}/servlet.jar # for %ghost
%if %{with_maven}
cp $MAVEN_REPO_LOCAL/org/apache/geronimo/specs/geronimo-servlet_2.4_spec/1.0.1/geronimo-servlet_2.4_spec-1.0.1.pom \
$RPM_BUILD_ROOT/%{_datadir}/maven2/poms/JPP-geronimo-servlet-2.4-api.pom
%add_to_maven_depmap org.apache.geronimo.specs geronimo-servlet_2.4_spec 1.0.1 JPP geronimo-servlet-2.4-api
%endif
install -p -m 0644 geronimo-spec-commonj/target/geronimo-commonj_1.1_spec-1.0.jar \
$RPM_BUILD_ROOT%{_javadir}/geronimo-commonj-1.1-apis-%{version}.jar
pushd $RPM_BUILD_ROOT%{_javadir}
ln -sf geronimo-commonj-1.1-apis-%{version}.jar geronimo-commonj-1.1-apis.jar
popd
%if %{with_maven}
cp $MAVEN_REPO_LOCAL/org/apache/geronimo/specs/geronimo-commonj_1.1_spec/1.0/geronimo-commonj_1.1_spec-1.0.pom \
$RPM_BUILD_ROOT/%{_datadir}/maven2/poms/JPP-geronimo-commonj-1.1-apis.pom
%add_to_maven_depmap org.apache.geronimo.specs geronimo-commonj_1.1_spec 1.0 JPP geronimo-commonj-1.1-apis
%endif
# Add the parent geronimo-specs pom
%if %{with_maven}
cp $MAVEN_REPO_LOCAL/org/apache/geronimo/specs/specs/1.1/specs-1.1.pom \
$RPM_BUILD_ROOT/%{_datadir}/maven2/poms/JPP-geronimo-specs.pom
%add_to_maven_depmap org.apache.geronimo.specs specs 1.1 JPP geronimo-specs
%endif
# main package jars
install -d -m 0755 $RPM_BUILD_ROOT%{_javadir}/geronimo
pushd $RPM_BUILD_ROOT%{_javadir}/geronimo
ln -sf ../geronimo-commonj-1.1-apis-%{version}.jar spec-commonj-1.1-%{version}.jar
ln -sf spec-commonj-1.1-%{version}.jar spec-commonj-1.1.jar
ln -sf ../geronimo-jaf-1.0.2-api-%{version}.jar spec-jaf-1.0.2-%{version}.jar
ln -sf spec-jaf-1.0.2-%{version}.jar spec-jaf-1.0.2.jar
ln -sf ../geronimo-ejb-2.1-api-%{version}.jar spec-ejb-2.1-%{version}.jar
ln -sf spec-ejb-2.1-%{version}.jar spec-ejb-2.1.jar
ln -sf ../geronimo-j2ee-connector-1.5-api-%{version}.jar \
spec-j2ee-connector-1.5-%{version}.jar
ln -sf spec-j2ee-connector-1.5-%{version}.jar spec-j2ee-connector-1.5.jar
ln -sf ../geronimo-j2ee-deployment-1.1-api-%{version}.jar \
spec-j2ee-deployment-1.1-%{version}.jar
ln -sf spec-j2ee-deployment-1.1-%{version}.jar spec-j2ee-deployment-1.1.jar
ln -sf ../geronimo-jacc-1.0-api-%{version}.jar spec-jacc-1.0-%{version}.jar
ln -sf spec-jacc-1.0-%{version}.jar spec-jacc-1.0.jar
ln -sf ../geronimo-j2ee-management-1.0-api-%{version}.jar \
spec-j2ee-management-1.0-%{version}.jar
ln -sf spec-j2ee-management-1.0-%{version}.jar spec-j2ee-management-1.0.jar
ln -sf ../geronimo-j2ee-1.4-apis-%{version}.jar spec-j2ee-1.4-%{version}.jar
ln -sf spec-j2ee-1.4-%{version}.jar spec-j2ee-1.4.jar
ln -sf ../geronimo-jms-1.1-api-%{version}.jar spec-jms-1.1-%{version}.jar
ln -sf spec-jms-1.1-%{version}.jar spec-jms-1.1.jar
ln -sf ../geronimo-jsp-2.0-api-%{version}.jar spec-jsp-2.0-%{version}.jar
ln -sf spec-jsp-2.0-%{version}.jar spec-jsp-2.0.jar
ln -sf ../geronimo-jta-1.0.1B-api-%{version}.jar spec-jta-1.0.1B-%{version}.jar
ln -sf spec-jta-1.0.1B-%{version}.jar spec-jta-1.0.1B.jar
ln -sf ../geronimo-servlet-2.4-api-%{version}.jar spec-servlet-2.4-%{version}.jar
ln -sf spec-servlet-2.4-%{version}.jar spec-servlet-2.4.jar
popd
#install -p -m 0644 modules/j2ee-schema/target/geronimo-j2ee-schema-1.0-M4.jar \
# $RPM_BUILD_ROOT%{_javadir}/geronimo/spec-j2ee-schema-1.0-M4.jar
#pushd $RPM_BUILD_ROOT%{_javadir}/geronimo
# ln -sf spec-j2ee-schema-1.0-M4.jar spec-j2ee-schema-1.0.jar
#popd
%if %{with_maven}
# javadoc
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
for sp in activation commonj corba corba-2.3 corba-3.0 corba ejb j2ee-connector j2ee-deployment j2ee-management javamail jaxrpc jaxr jms jsp jta qname saaj servlet; do
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}/${sp}
cp -pr geronimo-spec-${sp}/target/site/apidocs/* \
$RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}/${sp}
done
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}/jacc
cp -pr geronimo-spec-j2ee-jacc/target/site/apidocs/* \
$RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}/jacc
ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name} # ghost symlink
%endif
%clean
rm -rf $RPM_BUILD_ROOT
%post poms
%update_maven_depmap
%postun poms
%update_maven_depmap
%triggerpostun -n geronimo-jaf-1_0_2-api -- classpathx-jaf <= 1.0-2jpp_4rh
# Remove file from old non-free packages
rm -f %{_javadir}/jaf.jar
# Recreate the link as update-alternatives could not do it
ln -s %{_sysconfdir}/alternatives/jaf %{_javadir}/jaf.jar
%post -n geronimo-jaf-1_0_2-api
/usr/sbin/update-alternatives --install %{_javadir}/jaf.jar jaf %{_javadir}/geronimo-jaf-1.0.2-api.jar 10002
%preun -n geronimo-jaf-1_0_2-api
if [ "$1" = "0" ]; then
/usr/sbin/update-alternatives --remove jaf %{_javadir}/geronimo-jaf-1.0.2-api.jar
fi
%triggerpostun -n geronimo-ejb-2_1-api -- ejb <= 2.1-3jpp_2rh
# Remove file from old non-free packages
rm -f %{_javadir}/ejb.jar
# Recreate the link as update-alternatives could not do it
ln -s %{_sysconfdir}/alternatives/ejb %{_javadir}/ejb.jar
%post -n geronimo-ejb-2_1-api
/usr/sbin/update-alternatives --install %{_javadir}/ejb.jar ejb %{_javadir}/geronimo-ejb-2.1-api.jar 20100
%preun -n geronimo-ejb-2_1-api
if [ "$1" = "0" ]; then
/usr/sbin/update-alternatives --remove ejb %{_javadir}/geronimo-ejb-2.1-api.jar
fi
%triggerpostun -n geronimo-j2ee-connector-1_5-api -- j2ee-connector <= 1.5-3jpp_2rh
# Remove file from old non-free packages
rm -f %{_javadir}/j2ee-connector.jar
# Recreate the link as update-alternatives could not do it
ln -s %{_sysconfdir}/alternatives/j2ee-connector %{_javadir}/j2ee-connector.jar
%post -n geronimo-j2ee-connector-1_5-api
/usr/sbin/update-alternatives --install %{_javadir}/j2ee-connector.jar j2ee-connector %{_javadir}/geronimo-j2ee-connector-1.5-api.jar 10500
%preun -n geronimo-j2ee-connector-1_5-api
if [ "$1" = "0" ]; then
/usr/sbin/update-alternatives --remove j2ee-connector %{_javadir}/geronimo-j2ee-connector-1.5-api.jar
fi
%triggerpostun -n geronimo-j2ee-deployment-1_1-api -- j2ee-deployment <= 1.1-1jpp_1rh
# Remove file from old non-free packages
rm -f %{_javadir}/j2ee-deployment.jar
# Recreate the link as update-alternatives could not do it
ln -s %{_sysconfdir}/alternatives/j2ee-deployment %{_javadir}/j2ee-deployment.jar
%post -n geronimo-j2ee-deployment-1_1-api
/usr/sbin/update-alternatives --install %{_javadir}/j2ee-deployment.jar j2ee-deployment %{_javadir}/geronimo-j2ee-deployment-1.1-api.jar 10100
%preun -n geronimo-j2ee-deployment-1_1-api
if [ "$1" = "0" ]; then
/usr/sbin/update-alternatives --remove j2ee-deployment %{_javadir}/geronimo-j2ee-deployment-1.1-api.jar
fi
%triggerpostun -n geronimo-jacc-1_0-api -- jacc <= 1.0-1jpp
# Remove file from old non-free packages
rm -f %{_javadir}/jacc.jar
# Recreate the link as update-alternatives could not do it
ln -s %{_sysconfdir}/alternatives/jacc %{_javadir}/jacc.jar
%post -n geronimo-jacc-1_0-api
/usr/sbin/update-alternatives --install %{_javadir}/jacc.jar jacc %{_javadir}/geronimo-jacc-1.0-api.jar 10000
%preun -n geronimo-jacc-1_0-api
if [ "$1" = "0" ]; then
/usr/sbin/update-alternatives --remove jacc %{_javadir}/geronimo-jacc-1.0-api.jar
fi
%triggerpostun -n geronimo-j2ee-management-1_0-api -- j2ee-management <= 1.0-1jpp_1rh
# Remove file from old non-free packages
rm -f %{_javadir}/j2ee-management.jar
# Recreate the link as update-alternatives could not do it
ln -s %{_sysconfdir}/alternatives/j2ee-management %{_javadir}/j2ee-management.jar
%post -n geronimo-j2ee-management-1_0-api
/usr/sbin/update-alternatives --install %{_javadir}/j2ee-management.jar j2ee-management %{_javadir}/geronimo-j2ee-management-1.0-api.jar 10000
%preun -n geronimo-j2ee-management-1_0-api
if [ "$1" = "0" ]; then
/usr/sbin/update-alternatives --remove j2ee-management %{_javadir}/geronimo-j2ee-management-1.0-api.jar
fi
# Do not provide it as this is just the API (is it?) and
# our 'javamail' alternative means the providers as well
# all in a single jar file called 'javamail.jar'
#/usr/sbin/update-alternatives --install %{_javadir}/javamail.jar javamail %{_javadir}/geronimo-javamail-1.3.1-api.jar 10301
#
#%preun -n geronimo-javamail-1.3.1-api
#if [ "$1" = "0" ]; then
# /usr/sbin/update-alternatives --remove javamail %{_javadir}/geronimo-javamail-1.3.1-api.jar
#fi
%triggerpostun -n geronimo-jaxr-1_0-api -- jaxr-api <= 1.0-1jpp
# Remove file from old non-free packages
rm -f %{_javadir}/jaxr.jar
# Recreate the link as update-alternatives could not do it
ln -s %{_sysconfdir}/alternatives/jaxr %{_javadir}/jaxr.jar
%post -n geronimo-jaxr-1_0-api
/usr/sbin/update-alternatives --install %{_javadir}/jaxr.jar jaxr %{_javadir}/geronimo-jaxr-1.0-api.jar 10000
%preun -n geronimo-jaxr-1_0-api
if [ "$1" = "0" ]; then
/usr/sbin/update-alternatives --remove jaxr %{_javadir}/geronimo-jaxr-1.0-api.jar
fi
%post -n geronimo-jaxrpc-1_1-api
/usr/sbin/update-alternatives --install %{_javadir}/jaxrpc.jar jaxrpc %{_javadir}/geronimo-jaxrpc-1.1-api.jar 10100
%preun -n geronimo-jaxrpc-1_1-api
if [ "$1" = "0" ]; then
/usr/sbin/update-alternatives --remove jaxrpc %{_javadir}/geronimo-jaxrpc-1.1-api.jar
fi
%triggerpostun -n geronimo-jms-1_1-api -- jms <= 1.1-3jpp_2rh
# Remove file from old non-free packages
rm -f %{_javadir}/jms.jar
# Recreate the link as update-alternatives could not do it
ln -s %{_sysconfdir}/alternatives/jms %{_javadir}/jms.jar
%post -n geronimo-jms-1_1-api
/usr/sbin/update-alternatives --install %{_javadir}/jms.jar jms %{_javadir}/geronimo-jms-1.1-api.jar 10100
%preun -n geronimo-jms-1_1-api
if [ "$1" = "0" ]; then
/usr/sbin/update-alternatives --remove jms %{_javadir}/geronimo-jms-1.1-api.jar
fi
%post -n geronimo-jsp-2_0-api
/usr/sbin/update-alternatives --install %{_javadir}/jsp.jar jsp %{_javadir}/geronimo-jsp-2.0-api.jar 20000
%preun -n geronimo-jsp-2_0-api
if [ "$1" = "0" ]; then
/usr/sbin/update-alternatives --remove jsp %{_javadir}/geronimo-jsp-2.0-api.jar
fi
%triggerpostun -n geronimo-jta-1_0_1B-api -- jta <= 1.0.1-0.b.3jpp_2rh
# Remove file from old non-free packages
rm -f %{_javadir}/jta.jar
# Recreate the link as update-alternatives could not do it
ln -s %{_sysconfdir}/alternatives/jta %{_javadir}/jta.jar
%post -n geronimo-jta-1_0_1B-api
/usr/sbin/update-alternatives --install %{_javadir}/jta.jar jta %{_javadir}/geronimo-jta-1.0.1B-api.jar 10001
%preun -n geronimo-jta-1_0_1B-api
if [ "$1" = "0" ]; then
/usr/sbin/update-alternatives --remove jta %{_javadir}/geronimo-jta-1.0.1B-api.jar
fi
%post -n geronimo-qname-1_1-api
/usr/sbin/update-alternatives --install %{_javadir}/qname.jar qname %{_javadir}/geronimo-qname-1.1-api.jar 10100
%postun -n geronimo-qname-1_1-api
if [ "$1" = "0" ]; then
/usr/sbin/update-alternatives --remove qname %{_javadir}/geronimo-qname-1.1-api.jar
fi
%post -n geronimo-saaj-1_1-api
/usr/sbin/update-alternatives --install %{_javadir}/saaj.jar saaj %{_javadir}/geronimo-saaj-1.1-api.jar 10100
%preun -n geronimo-saaj-1_1-api
if [ "$1" = "0" ]; then
/usr/sbin/update-alternatives --remove saaj %{_javadir}/geronimo-saaj-1.1-api.jar
fi
%post -n geronimo-servlet-2_4-api
/usr/sbin/update-alternatives --install %{_javadir}/servlet.jar servlet %{_javadir}/geronimo-servlet-2.4-api.jar 20400
%preun -n geronimo-servlet-2_4-api
if [ "$1" = "0" ]; then
/usr/sbin/update-alternatives --remove servlet %{_javadir}/geronimo-servlet-2.4-api.jar
fi
%files
%defattr(-,root,root,-)
%doc etc/LICENSE.txt
%dir %{_javadir}/geronimo
%{_javadir}/geronimo/*
%if %{with_maven}
%files javadoc
%defattr(0644,root,root,0755)
%doc %{_javadocdir}/*
%endif
%files poms
%defattr(-,root,root,-)
%{_mavendepmapfragdir}
%dir %{_datadir}/maven2
%{_datadir}/maven2/poms
%files -n geronimo-commonj-1_1-apis
%defattr(-,root,root,-)
%{_javadir}/geronimo-commonj-1.1-apis*.jar
%doc geronimo-spec-commonj/LICENSE.txt
%files -n geronimo-jaf-1_0_2-api
%defattr(-,root,root,-)
%{_javadir}/geronimo-jaf-1.0.2-api*.jar
%doc geronimo-spec-activation/LICENSE.txt
%ghost %{_javadir}/jaf.jar
%files -n geronimo-corba-1_0-apis
%defattr(-,root,root,-)
%{_javadir}/geronimo-corba-1.0-apis*.jar
#%doc geronimo-spec-corba/LICENSE.txt
%files -n geronimo-corba-2_3-apis
%defattr(-,root,root,-)
%{_javadir}/geronimo-corba-2.3-apis*.jar
%doc geronimo-spec-corba-2.3/LICENSE.txt
#%files -n geronimo-corba-3.0-apis
#%defattr(-,root,root,-)
#%{_javadir}/geronimo-corba-3.0-apis*.jar
#%doc geronimo-spec-corba-3.0/LICENSE.txt
%files -n geronimo-ejb-2_1-api
%defattr(-,root,root,-)
%{_javadir}/geronimo-ejb-2.1-api*.jar
%doc geronimo-spec-ejb/LICENSE.txt
%ghost %{_javadir}/ejb.jar
%files -n geronimo-j2ee-1_4-apis
%defattr(-,root,root,-)
%{_javadir}/geronimo-j2ee-1.4-apis*.jar
%doc geronimo-spec-j2ee/LICENSE.txt
%files -n geronimo-j2ee-connector-1_5-api
%defattr(-,root,root,-)
%{_javadir}/geronimo-j2ee-connector-1.5-api*.jar
%doc geronimo-spec-j2ee-connector/LICENSE.txt
%ghost %{_javadir}/j2ee-connector.jar
%files -n geronimo-j2ee-deployment-1_1-api
%defattr(-,root,root,-)
%{_javadir}/geronimo-j2ee-deployment-1.1-api*.jar
%doc geronimo-spec-j2ee-deployment/LICENSE.txt
%ghost %{_javadir}/j2ee-deployment.jar
%files -n geronimo-jacc-1_0-api
%defattr(-,root,root,-)
%{_javadir}/geronimo-jacc-1.0-api*.jar
%doc geronimo-spec-j2ee-jacc/LICENSE.txt
%ghost %{_javadir}/jacc.jar
%files -n geronimo-j2ee-management-1_0-api
%defattr(-,root,root,-)
%{_javadir}/geronimo-j2ee-management-1.0-api*.jar
%doc geronimo-spec-j2ee-management/LICENSE.txt
%ghost %{_javadir}/j2ee-management.jar
%files -n geronimo-javamail-1_3_1-api
%defattr(-,root,root,-)
%{_javadir}/geronimo-javamail-1.3.1-api*.jar
%doc geronimo-spec-javamail/LICENSE.txt
# Do not provide it as this is just the API (is it?) and
# our 'javamail' alternative means the providers as well
# all in a single jar file called 'javamail.jar'
#%ghost %{_javadir}/javamail.jar
%files -n geronimo-jaxr-1_0-api
%defattr(-,root,root,-)
%{_javadir}/geronimo-jaxr-1.0-api*.jar
%doc geronimo-spec-jaxr/LICENSE.txt
%ghost %{_javadir}/jaxr.jar
%files -n geronimo-jaxrpc-1_1-api
%defattr(-,root,root,-)
%{_javadir}/geronimo-jaxrpc-1.1-api*.jar
%doc geronimo-spec-jaxrpc/LICENSE.txt
%ghost %{_javadir}/jaxrpc.jar
%files -n geronimo-jms-1_1-api
%defattr(-,root,root,-)
%{_javadir}/geronimo-jms-1.1-api*.jar
%doc geronimo-spec-jms/LICENSE.txt
%ghost %{_javadir}/jms.jar
%files -n geronimo-jsp-2_0-api
%defattr(-,root,root,-)
%{_javadir}/geronimo-jsp-2.0-api*.jar
%doc geronimo-spec-jsp/LICENSE.txt
%ghost %{_javadir}/jsp.jar
%files -n geronimo-jta-1_0_1B-api
%defattr(-,root,root,-)
%{_javadir}/geronimo-jta-1.0.1B-api*.jar
%doc geronimo-spec-jta/LICENSE.txt
%ghost %{_javadir}/jta.jar
%files -n geronimo-qname-1_1-api
%defattr(-,root,root,-)
%{_javadir}/geronimo-qname-1.1-api*.jar
%doc geronimo-spec-qname/LICENSE.txt
%ghost %{_javadir}/qname.jar
%files -n geronimo-saaj-1_1-api
%defattr(-,root,root,-)
%{_javadir}/geronimo-saaj-1.1-api*.jar
%doc geronimo-spec-saaj/LICENSE.txt
%ghost %{_javadir}/saaj.jar
%files -n geronimo-servlet-2_4-api
%defattr(-,root,root,-)
%{_javadir}/geronimo-servlet-2.4-api*.jar
%doc geronimo-spec-servlet/LICENSE.txt
%ghost %{_javadir}/servlet.jar
%changelog
* Mon Dec 01 2008 mvyskocil@suse.cz
- added a Conflicts to gnu-jaf to geronimo-jav-1_0_2-api
* Tue Aug 26 2008 anosek@suse.cz
- fixed path to LICENSE.txt files in spec
* Mon Aug 25 2008 mvyskocil@suse.cz
- target=1.5 source=1.5
- removed a gcj support
- fixed some rpmlint warnings
* Mon Apr 21 2008 ro@suse.de
- changed requires of main package to use underscores as well
* Thu Apr 17 2008 mvyskocil@suse.cz
- Dots in names was replaced by underscore
- Added a PreReq on coreutils
- Removed of BuildRoot removal in %%install phase
* Mon Apr 07 2008 mvyskocil@suse.cz
- First release in Suse (JPP 1.7) version 1.1
- build dependency for log4j update [bnc#355798]
- added a build support using ant
- FIXME: the corba-3.0 package is not currently included