Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37709706
en ru br
Репозитории ALT
5.1: 0.9.5.5-alt1_2jpp5
4.1: 0.9.5.3-alt1_2jpp1.7
4.0: 0.9.5.3-alt1_2jpp1.7
www.altlinux.org/Changes

Группа :: Разработка/Java
Пакет: apacheds-shared

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

BuildRequires: /proc
BuildRequires: jpackage-1.4-compat
# 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 gcj_support 0


Summary:        Shared APIs of Apache Directory Project
Name:           apacheds-shared
Version:        0.9.5.3
Release:        alt1_2jpp1.7
Epoch: 0
Group:          Development/Java
License:        Apache 2.0 License
URL:            http://directory.apache.org/subprojects/shared/
Source0:        %{name}-%{version}.tar.gz
# svn export http://svn.apache.org/repos/asf/directory/releases/shared/0.9.5.3 apacheds-shared-0.9.5.3

Source1:        directory-pom-1.0.4.xml
Source2:        %{name}-jpp-depmap.xml
Source3:        %{name}-settings.xml

# patch0 only required for java14

Patch0: apacheds-shared-LdapDNTest.patch

Patch1: apacheds-shared-ldap-pom_xml.patch


BuildRequires: jpackage-utils >= 0:1.7.1
BuildRequires: maven2-plugins >= 0:2.0.4
BuildRequires: maven2-plugin-antlr
BuildRequires: maven2-plugin-antrun
BuildRequires: maven2-plugin-clover
BuildRequires: maven2-plugin-javadoc
BuildRequires: maven2-plugin-jxr
BuildRequires: maven2-plugin-project-info-reports
BuildRequires: maven2-plugin-surefire
BuildRequires: maven2-plugin-surefire-report

BuildRequires: saxon
BuildRequires: saxon-scripts
BuildRequires: junit

BuildRequires: antlr
BuildRequires: jakarta-commons-collections
BuildRequires: jakarta-commons-lang
BuildRequires: slf4j
BuildRequires: nlog4j
BuildRequires: mina
%if %{gcj_support}
BuildRequires: gnu-crypto
BuildRequires: java-gcj-compat-devel
%endif
%if ! %{gcj_support}
BuildArch:      noarch
%endif

%description
This package contains the shared APIs of the
Apache Directory Project.

%package asn1-codec
Group:          Development/Java
Summary:        Apache shared ASN.1 Codec
Requires: mina
%if %{gcj_support}
Requires(post): java-gcj-compat
Requires(postun): java-gcj-compat
%endif

%description asn1-codec
The ASN.1 subproject attempts to isolate the ASN.1 libraries and tools
for encoding ASN.1 in BER/DER/CER/PER encodings. The LDAP and X.500
aspects of the directory project impose the need for ASN.1 and BER
codecs.  Kerberos requires DER.  Rather than implement highly
specific and britle code for these needs we decided to separate out
the APIs and implementations used for dealing with ASN.1 codecs for any
ASN.1 defined protocol.

%package asn1
Group:          Development/Java
Summary:        Apache shared ASN.1 Tools
Requires: %{name}-asn1-codec = %{epoch}:%{version}-%{release}
Requires: slf4j
%if %{gcj_support}
Requires(post): java-gcj-compat
Requires(postun): java-gcj-compat
%endif

%description asn1
The ASN.1 subproject attempts to isolate the ASN.1 libraries and tools
for encoding ASN.1 in BER/DER/CER/PER encodings. The LDAP and X.500
aspects of the directory project impose the need for ASN.1 and BER
codecs.  Kerberos requires DER.  Rather than implement highly
specific and britle code for these needs we decided to separate out
the APIs and implementations used for dealing with ASN.1 codecs for any
ASN.1 defined protocol.

%package ldap
Group:          Development/Java
Summary:        Shared LDAP APIs of Apache Directory Project
Requires: %{name}-asn1-codec = %{epoch}:%{version}-%{release}
Requires: %{name}-asn1 = %{epoch}:%{version}-%{release}
Requires: antlr
Requires: jakarta-commons-collections
Requires: slf4j
%if %{gcj_support}
Requires(post): java-gcj-compat
Requires(postun): java-gcj-compat
%endif

%description ldap
%{summary}.

%package javadoc
Group:          Development/Documentation
Summary:        Javadoc for %{name}
Provides: %{name}-asn1-codec-javadoc
Obsoletes: %{name}-asn1-javadoc < %{epoch}-%{version}
Provides: %{name}-asn1-javadoc
Obsoletes: %{name}-ldap-javadoc < %{epoch}-%{version}
Provides: %{name}-ldap-javadoc

%description javadoc
%{summary}.

%prep
%setup -q -n %{name}-%{version}

JAVA_VER=$(java -version 2>&1 | grep 'java version' | cut -d\" -f2)
JAVA14="$(expr $JAVA_VER : '\(.....\).*')"
if [ "x$JAVA14" = "x1.4.2" ]; then
%patch0 -b .sav
fi
%patch1 -b .sav

%build
cp %{SOURCE3} maven2-settings.xml

sed -i -e "s|<url>__JPP_URL_PLACEHOLDER__</url>|<url>file://`pwd`/m2_repo/repository</url>|g" maven2-settings.xml
sed -i -e "s|<url>__JAVADIR_PLACEHOLDER__</url>|<url>file://`pwd`/external_repo</url>|g" maven2-settings.xml
sed -i -e "s|<url>__MAVENREPO_DIR_PLACEHOLDER__</url>|<url>file://`pwd`/m2_repo/repository</url>|g" maven2-settings.xml
sed -i -e "s|<url>__MAVENDIR_PLUGIN_PLACEHOLDER__</url>|<url>file:///usr/share/maven2/plugins</url>|g" maven2-settings.xml
sed -i -e "s|<url>__ECLIPSEDIR_PLUGIN_PLACEHOLDER__</url>|<url>file:///usr/share/eclipse/plugins</url>|g" maven2-settings.xml

for p in $(find . -name "*.pom"); do
   pushd $(dirname $p)
   bp=`basename $p`
   cp $bp $bp.orig
   /usr/bin/saxon -o $bp $bp.orig /usr/share/java-utils/xml/maven2jpp-mapdeps.xsl map=%{SOURCE2}
   popd
done

for p in $(find . -name "*pom.xml"); do
   pushd $(dirname $p)
   bp=`basename $p`
   cp $bp $bp.orig
   /usr/bin/saxon -o $bp $bp.orig /usr/share/java-utils/xml/maven2jpp-mapdeps.xsl map=%{SOURCE2}
   popd
done

mkdir -p m2_repo/repository/JPP/maven2/default_poms
cp %{SOURCE1} m2_repo/repository/JPP/maven2/default_poms/org.apache.directory-build.pom

mkdir external_repo
ln -s %{_javadir} external_repo/JPP

MVN=/usr/bin/mvn
export M2SETTINGS=$(pwd)/maven2-settings.xml
export MAVEN_REPO_LOCAL=`pwd`/m2_repo/repository
export MAVEN_OPTS="-Dmaven.repo.local=$MAVEN_REPO_LOCAL -Dmaven2.jpp.mode=true -Dmaven.test.failure.ignore=true -Djava.awt.headless=true"
${MVN} -s ${M2SETTINGS} ${MAVEN_OPTS} install javadoc:javadoc


%install

# jars

install -d -m 0755 $RPM_BUILD_ROOT%{_javadir}

install -m 644 asn1-codec/target/shared-asn1-codec-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-asn1-codec-%{version}.jar
install -m 644 asn1/target/shared-asn1-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-asn1-%{version}.jar
install -m 644 ldap/target/shared-ldap-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-ldap-%{version}.jar
(cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed  "s|-%{version}||g"`; done)

# javadoc

install -d -m 0755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}/asn1-codec
install -d -m 0755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}/asn1
install -d -m 0755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}/ldap
cp -pr asn1-codec/target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}/asn1-codec
cp -pr asn1/target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}/asn1
cp -pr ldap/target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}/ldap
ln -sf %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name} #ghost

%if %{gcj_support}
export CLASSPATH=$(build-classpath gnu-crypto)
%{_bindir}/aot-compile-rpm
%endif

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

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

%if %{gcj_support}
%post asn1-codec
if [ -x %{_bindir}/rebuild-gcj-db ]
then
 %{_bindir}/rebuild-gcj-db
fi
%endif

%if %{gcj_support}
%postun asn1-codec
if [ -x %{_bindir}/rebuild-gcj-db ]
then
 %{_bindir}/rebuild-gcj-db
fi
%endif

%if %{gcj_support}
%post asn1
if [ -x %{_bindir}/rebuild-gcj-db ]
then
 %{_bindir}/rebuild-gcj-db
fi
%endif

%if %{gcj_support}
%postun asn1
if [ -x %{_bindir}/rebuild-gcj-db ]
then
 %{_bindir}/rebuild-gcj-db
fi
%endif

%if %{gcj_support}
%post ldap
if [ -x %{_bindir}/rebuild-gcj-db ]
then
 %{_bindir}/rebuild-gcj-db
fi
%endif

%if %{gcj_support}
%postun ldap
if [ -x %{_bindir}/rebuild-gcj-db ]
then
 %{_bindir}/rebuild-gcj-db
fi
%endif

%files asn1-codec
%doc asn1-codec/LICENSE.txt
%{_javadir}/%{name}-asn1-codec-%{version}.jar
%{_javadir}/%{name}-asn1-codec.jar
%if %{gcj_support}
%dir %{_libdir}/gcj/%{name}
%{_libdir}/gcj/%{name}/%{name}-asn1-codec-%{version}.jar.*
%endif

%files asn1
%doc asn1/LICENSE.txt
%{_javadir}/%{name}-asn1-%{version}.jar
%{_javadir}/%{name}-asn1.jar
%if %{gcj_support}
%{_libdir}/gcj/%{name}/%{name}-asn1-%{version}.jar.*
%endif

%files ldap
%doc ldap/LICENSE.txt
%{_javadir}/%{name}-ldap*.jar
%if %{gcj_support}
%{_libdir}/gcj/%{name}/%{name}-ldap-%{version}.jar.*
%endif

%files javadoc
%doc %{_javadocdir}/%{name}-%{version}
%ghost %{_javadocdir}/%{name}

%changelog

Полный changelog можно просмотреть здесь

 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin