File dba-apache2-mod_ftp-096.spec of Package dba-apache2-mod_ftp-096

%define vers	096
%define version	0.9.6
%define prefix	/DBA/apache/WWW/2.2.x
%define apavers 2.2.25
%define apapack 2225
%define apahome /DBA/apache/WWW/%{apavers}
%define apxs    %{apahome}/bin/apxs
%define real_name mod_ftp


Name:           dba-apache2-%{real_name}-%{vers}
Summary:	Apache module for FTP support
Version:        %{version}
Release:        1
License:        GPL
Group:          Productivity/Networking/Web/Servers
URL:            http://httpd.apache.org/mod_ftp/
Source0:	http://mirror.derwebwolf.net/apache//httpd/mod_ftp/mod_ftp-%{version}-beta.tar.bz2
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

BuildRequires:  dba-apache-%{apapack} unzip
Requires:  	dba-apache-base

BuildRequires:  gcc-c++

#!BuildIgnore:  dba-openssl-098o dba-openssl-098r dba-openssl-098x dba-openssl-101c dba-openssl-101e

%if 0%{?suse_version}
BuildRequires:  libapr-util1-devel >= 1.3 libapr1-devel >= 1.3
%else
BuildRequires:  apr-util-devel apr-devel
%endif

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

%description
mod_ftp is a FTP Protocol module to serve httpd content over the FTP protocol
(whereever the HTTP protocol could also be used). It provides both RETR/REST
retrieval and STOR/APPE upload, using the same user/permissions model as httpd
(so it shares the same security considerations as mod_dav plus mod_dav_fs).


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

for i in `find . -type d -name .svn`; do
    if [ -e "$i" ]; then rm -rf $i; fi >&/dev/null
done

find docs -name "*.xml*" | xargs rm -f

# strip away annoying ^M
find . -type f|xargs file|grep 'CRLF'|cut -d: -f1|xargs perl -p -i -e 's/\r//'
find . -type f|xargs file|grep 'text'|cut -d: -f1|xargs perl -p -i -e 's/\r//'


%build
export CFLAGS="%{optflags} -fPIC"
export APXS=%{apxs}
./configure.apxs \
   --prefix=%{prefix} \
   --with-apachectl=%{apahome}/bin/apachectl \
   --with-apxs=%{apxs}

%{__make}


%install
%{__mkdir_p} %{buildroot}%{prefix}/modules

install -m0755 ./modules/ftp/.libs/mod_ftp.so %{buildroot}%{prefix}/modules/%{real_name}-%{version}.so


%post
cd %{prefix}/modules
%{__rm} -f %{real_name}.so
%{__ln_s} -f %{real_name}-%{version}.so %{real_name}.so


%clean
# %{__rm} -rf %{buildroot};


%files
%defattr(-,root,root,-)
%{prefix}/modules/%{real_name}-%{version}.so


%changelog
* Wed Oct  2 2013 Holger Manthey <holger.manthey@bertelsmann.de>
- initial release