Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37896890
en ru br
ALT Linux repos
5.0: 2.1-alt2_8jpp5
4.1: 2.1-alt2_4jpp1.7
4.0: 2.1-alt2_4jpp1.7

Group :: Development/Java
RPM: jakarta-slide-webdavclient

 Main   Changelog   Spec   Patches   Sources   Download   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

%define section   devel
%define base_name slide

Name:           jakarta-slide-webdavclient
Version:        2.1
Release:        alt2_4jpp1.7
Epoch:          0
Summary:        Slide WebDAV client

Group:          Development/Java
License:        Apache Software License
URL:            http://jakarta.apache.org/slide/
Source0:        jakarta-slide-webdavclient-src-2.1.tar.gz
Source1:        %{name}.sh
Source2:        jakarta-slide-webdavclient-2.2-WebdavResource.java
Patch0:         jakarta-slide-webdavclient-3.0-compat.patch

%if ! %{gcj_support}
BuildArch:      noarch
%endif
BuildRequires: jpackage-utils >= 0:1.6
BuildRequires: ant >= 0:1.6
BuildRequires: antlr
BuildRequires: jakarta-commons-httpclient >= 3.0
BuildRequires: jakarta-commons-transaction
BuildRequires: geronimo-j2ee-1.4-apis
BuildRequires: jdom
BuildRequires: xml-im-exporter
Requires: jakarta-commons-httpclient
Requires: jakarta-commons-transaction
Requires: geronimo-j2ee-1.4-apis
Requires: jdom
Requires: xml-im-exporter
%if %{gcj_support}
BuildRequires: gnu-crypto
BuildRequires: java-gcj-compat-devel
Requires(post): java-gcj-compat
Requires(postun): java-gcj-compat
%endif

%description
Slide includes a fully featured WebDAV client library and command line
client.

%package        javadoc
Summary:        Javadoc for %{name}
Group:          Development/Documentation

%description    javadoc
%{summary}.

%prep
%setup -q -n jakarta-slide-webdavclient-src-2.1
find . -name "*.jar" -exec rm {} \;
#for j in $(find . -name "*.jar"); do
#    mv $j $j.no
#done
cp %{SOURCE2} clientlib/src/java/org/apache/webdav/lib/WebdavResource.java

%patch0 -b .sav

%build
export CLASSPATH=$(build-classpath \
antlr \
commons-httpclient \
commons-httpclient-contrib \
commons-transaction \
geronimo-j2ee-1.4-apis \
jdom \
xml-im-exporter \
)
ant -Dbuild.sysclasspath=first


%install

[ -f $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.slide-webdavlib.pom ] && exit 1;
mkdir -p $RPM_BUILD_ROOT%_datadir/maven2/poms/
cat > $RPM_BUILD_ROOT%_datadir/maven2/poms/JPP.slide-webdavlib.pom <<END
<project>
 <modelVersion>4.0.0</modelVersion>
 <groupId>slide</groupId>
 <artifactId>slide-webdavlib</artifactId>
 <version>2.1</version>
<!-- todo: check/add poms to repository
 <dependencies>
   <dependency>
     <groupId>commons-httpclient</groupId>
     <artifactId>commons-httpclient</artifactId>
     <version>2.0.2</version>
   </dependency>
   <dependency>
     <groupId>jdom</groupId>
     <artifactId>jdom</artifactId>
     <version>1.0</version>
   </dependency>
   <dependency>
     <groupId>de.zeigermann.xml</groupId>
     <artifactId>xml-im-exporter</artifactId>
     <version>1.1</version>
   </dependency>
 </dependencies>
-->
</project>
END
install -dm 755 $RPM_BUILD_ROOT%{_bindir}
install -pm 755 %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/webdavclient

install -dm 755 $RPM_BUILD_ROOT%{_javadir}/%{base_name}
install -pm 644 \
dist/lib/jakarta-slide-webdavlib-%{version}.jar \
$RPM_BUILD_ROOT%{_javadir}/%{base_name}/%{name}-webdavlib-%{version}.jar
install -pm 644 \
dist/lib/jakarta-slide-commandline-%{version}.jar \
$RPM_BUILD_ROOT%{_javadir}/%{base_name}/%{name}-commandline-%{version}.jar
(cd $RPM_BUILD_ROOT%{_javadir}/%{base_name} && for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed  "s|-%{version}||g"`; done)
(cd $RPM_BUILD_ROOT%{_javadir}/%{base_name} && for jar in jakarta-*.jar; do ln -sf ${jar} `echo $jar| sed  "s|jakarta-||g"`; done)

#javadoc

install -dm 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
cp -pr dist/doc/clientjavadoc/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name} # ghost symlink

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

pushd $RPM_BUILD_ROOT%{_javadir}/%{base_name}
for jar in jakarta-slide-webdavclient-*.jar; do ln -sf ${jar} `echo $jar| sed  "s|jakarta-slide-webdavclient-|slide-|g"`; done
popd

%add_to_maven_depmap slide slide-webdavlib %{version} JPP/slide jakarta-slide-webdavclient-webdavlib

%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
%update_maven_depmap
if [ -x %{_bindir}/rebuild-gcj-db ]
then
 %{_bindir}/rebuild-gcj-db
fi
%endif

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

%files
%_datadir/maven2/poms/*.pom
%{_mavendepmapfragdir}
%doc LICENSE
%{_javadir}/%{base_name}/*.jar
%attr(0755,root,root) %{_bindir}/webdavclient
%if %{gcj_support}
%dir %attr(-,root,root) %{_libdir}/gcj/%{name}
%{_libdir}/gcj/%{name}/%{name}-*-%{version}.jar.*
%endif

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


%changelog

Full changelog you can see here

 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin