File dba-cadaver-0233.spec of Package dba-cadaver-0233

%define real_name cadaver
%define	version	0.23.3
%define prefix  /DBA/%{real_name}/%{version}
%define vers    0233
%define neonin  1

Name:		dba-%{real_name}-%{vers}
Version:        %{version}
Release:        2
Summary:        Command Line WebDAV Client for Unix
License:        GPL-2.0+
Group:          Productivity/Networking/Web/Utilities
Url:            http://www.webdav.org/cadaver/
Source0:        %{real_name}-%{version}.tar.bz2
Patch0:         %{real_name}-0.23.2-strncat.patch
Patch1:         cadaver-neon.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

BuildRequires:  automake pkg-config
BuildRequires:  readline-devel openssl-devel zlib-devel
BuildRequires:  dba-neon-0301-static
%define neon /DBA/neon/0.30.1

%if 0%{?suse_version} >= 1100
BuildRequires:  -post-build-checks
%endif


%description
Cadaver is a command-line WebDAV client for Unix. It supports file
upload, download, on-screen display, namespace operations (move and
copy), collection creation and deletion, and locking operations.

%prep
%setup -q -n %{real_name}-%{version}
%patch0
%patch1 -p1

%if 0%{?neonin}
%else
# Forcibly prevent use of bundled neon/expat/gettext sources.
rm -rf lib/neon/*.[ch] lib/intl/*.[ch]
%endif


%build

export LDFLAGS=-pie CFLAGS="$RPM_OPT_FLAGS -fPIE -Wall"
%if 0%{?neonin}
CURDIR=`pwd`
CFLAGS="$CFLAGS -I$CURDIR/lib -I$CURDIR/lib/neon"
LDFLAGS="$LDFLAGS -L$CURDIR/lib"
%else
CFLAGS="$CFLAGS -I%{neon}/include -I%{neon}/include/neon"
LDFLAGS="$LDFLAGS -L%{neon}/lib"
%endif
export LDFLAGS CFLAGS

./configure \
  --prefix=%{prefix} \
  --with-ssl \
  --with-libxml2 \
%if 0%{?neonin}
  --with-included-neon \
%else
  --with-neon=%{neon} \
%endif
  --with-included-expat

make %{?_smp_mflags}


%install
make "DESTDIR=$RPM_BUILD_ROOT" install

%{__mkdir_p} %{buildroot}%{prefix}/docs
%__cp -a BUGS COPYING ChangeLog FAQ INTEROP NEWS README THANKS TODO %{buildroot}%{prefix}/docs/

rm -f `find %{buildroot} -name *.la`


%files
%defattr(-,root,root)
%dir %{prefix}
%{prefix}/*


%changelog
* Mon Aug 24 2015 Holger Manthey <holger.manthey@bertelsmann.de>
- inital version
openSUSE Build Service is sponsored by