]> git.pld-linux.org Git - packages/pure-ftpd.git/blobdiff - pure-ftpd.spec
- when SSLCertFile is absent in pureftpd.conf use path to certificate
[packages/pure-ftpd.git] / pure-ftpd.spec
index 2ceb5780c9033d98849ef6106adf19c11fb3b3a5..9df0b2be4f9de7dcefaf1764a9f4d541cae190e4 100644 (file)
@@ -1,34 +1,40 @@
 #
 # Conditional build:
-%bcond_without  mysql  # disable MySQL auth but disables PAM auth
 %bcond_without  ldap   # disable LDAP auth
+%bcond_without  mysql  # disable MySQL auth but disables PAM auth
 %bcond_without  pgsql  # disable PostgreSQL support
+%bcond_without puredb  # disable pure-db support
 %bcond_without  tls    # support SSL/TLS
 #
 Summary:       Small, fast and secure FTP server
 Summary(pl):   Ma³y, szybki i bezpieczny serwer FTP
 Name:          pure-ftpd
-Version:       1.0.18
-Release:       2
+Version:       1.0.20
+Release:       1
 Epoch:         0
 License:       BSD-like
 Group:         Daemons
 Source0:       ftp://ftp.pureftpd.org/pub/pure-ftpd/releases/%{name}-%{version}.tar.bz2
-# Source0-md5: 56925bb7a35b07ca70e5453af731acba
+# 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/
 BuildRequires: libcap-devel
-%{?with_mysql:BuildRequires:   mysql-devel}
 %{?with_ldap:BuildRequires:    openldap-devel}
-%{?with_tls:BuildRequires:     openssl-devel >= 0.9.7d}
+%{?with_mysql:BuildRequires:   mysql-devel}
 %{?with_pgsql:BuildRequires:   postgresql-devel}
+%{?with_tls:BuildRequires:     openssl-devel}
 BuildRequires: pam-devel
 Prereq:                rc-scripts
 Requires(post,preun):/sbin/chkconfig
 Requires:      pam >= 0.77.3
+Requires:      perl-base
 Provides:      ftpserver
 Obsoletes:     ftpserver
 Obsoletes:     anonftp
@@ -49,6 +55,7 @@ Conflicts:    man-pages < 1.51
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define                _sysconfdir     /etc/ftpd
+%define                _ftpdir         /home/services/ftp
 
 %description
 Pure-FTPd is a fast, production-quality, standard-comformant FTP
@@ -71,37 +78,40 @@ po
 
 %prep
 %setup -q
+%patch0 -p0
+# broken
+#%patch1 -p1
+%patch2 -p1
 
 %build
 %configure \
+       --with-boring \
        --with-altlog \
-       --with-puredb \
-       --with-extauth \
-       --with-pam \
        --with-cookie \
-       --with-throttling \
-       --with-ratios \
-       --with-quotas \
+       --with-diraliases \
+       --with-extauth \
        --with-ftpwho \
+       --with-language=english \
        --with-largefile \
-       --with-uploadscript \
-       --with-virtualhosts \
-       --with-virtualchroot \
-       --with-diraliases \
-       --with-peruserlimits \
+       %{?with_ldap:--with-ldap} \
        %{?with_mysql:CPPFLAGS="-I%{_includedir}/mysql" --with-mysql} \
+       --with-pam \
+       --with-peruserlimits \
        %{?with_pgsql:--with-pgsql} \
-       %{?with_ldap:--with-ldap} \
-       %{?with_tls: --with-tls} \
-       --with-language=english \
-       --with-privsep
-
-echo '#define  TLS_CERTIFICATE_PATH    "%{_sysconfdir}/ssl/pure-ftpd.pem"' >> config.h
-
+       --with-privsep \
+       %{?with_puredb:--with-puredb} \
+       --with-quotas \
+       --with-ratios \
+       --with-throttling \
+       %{?with_tls:--with-tls --with-certfile=%{_sharedstatedir}/openssl/certs/ftpd.pem} \
+       --with-uploadscript \
+       --with-virtualchroot \
+       --with-virtualhosts 
+        
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT/etc/{pam.d,sysconfig,security,rc.d/init.d} \
-       $RPM_BUILD_ROOT{%{_sysconfdir}/{vhosts,ssl},/home/services/ftp/Incoming}
+       $RPM_BUILD_ROOT{%{_sysconfdir}/vhosts,%{_ftpdir}/Incoming}
 
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT
@@ -141,7 +151,7 @@ fi
 
 %files
 %defattr(644,root,root,755)
-%doc README* AUTHORS ChangeLog HISTORY NEWS THANKS pure*.conf
+%doc AUTHORS ChangeLog CONTACT FAQ HISTORY NEWS README* THANKS pure*.conf pureftpd.schema
 %attr(755,root,root) %{_bindir}/*
 %attr(755,root,root) %{_sbindir}/*
 %attr(754,root,root) /etc/rc.d/init.d/%{name}
@@ -154,9 +164,8 @@ fi
 %attr(710,root,ftp) %dir %{_sysconfdir}
 %dir %{_sysconfdir}/vhosts
 %dir %{_sysconfdir}/pure-ftpd
-%{?with_tls:%attr(750,root,root) %dir %{_sysconfdir}/ssl}
-%dir /home/services/ftp
-%attr(775,root,ftp) %dir /home/services/ftp/Incoming
+%dir %{_ftpdir}
+%attr(775,root,ftp) %dir %{_ftpdir}/Incoming
 %{_mandir}/man?/*
 %lang(ja) %{_mandir}/ja/man5/ftpusers*
 %lang(pl) %{_mandir}/pl/man5/ftpusers*
This page took 0.041439 seconds and 4 git commands to generate.