#
# Conditional build:
+%bcond_with extra # with additional, maybe useful, but unmaintained features
%bcond_without ldap # disable LDAP auth
%bcond_without mysql # disable MySQL auth but disables PAM auth
%bcond_without pgsql # disable PostgreSQL support
Summary: Small, fast and secure FTP server
Summary(pl): Ma³y, szybki i bezpieczny serwer FTP
Name: pure-ftpd
-Version: 1.0.19
-Release: 2
+Version: 1.0.20
+Release: 2
Epoch: 0
License: BSD-like
Group: Daemons
Source0: ftp://ftp.pureftpd.org/pub/pure-ftpd/releases/%{name}-%{version}.tar.bz2
-# Source0-md5: 1ff9e9215d3b1fdad36571e892a726d1
+# Source0-md5: e928e9e15adf6b52bfe6183fdad20144
Source1: %{name}.pamd
Source2: %{name}.init
Source3: ftpusers.tar.bz2
# Source3-md5: 76c80b6ec9f4d079a1e27316edddbe16
Patch0: %{name}-config.patch
+# This patch is broken and changes default pureftpd behaviour
Patch1: %{name}-path_to_ssl_cert_in_config.patch
Patch2: %{name}-pure-pw_passwd.patch
URL: http://www.pureftpd.org/
%prep
%setup -q
%patch0 -p0
-%patch1 -p1
-%patch2 -p1
+%{?with_extra:%patch1 -p1}
+%{?with_extra:%patch2 -p1}
%build
%configure \
--with-quotas \
--with-ratios \
--with-throttling \
- %{?with_tls:--with-tls} \
+ %{?with_tls:--with-tls --with-certfile=%{_sharedstatedir}/openssl/certs/ftpd.pem} \
--with-uploadscript \
--with-virtualchroot \
--with-virtualhosts