]> git.pld-linux.org Git - packages/pure-ftpd.git/blobdiff - pure-ftpd.spec
- added detection for available parsers
[packages/pure-ftpd.git] / pure-ftpd.spec
index 8c9700ae7d2660078fccc36de2da85ecb105c834..1f322ba48301aa0a8e2f10782f2d5da56856bc8b 100644 (file)
@@ -1,34 +1,49 @@
 #
 # Conditional build:
-# _with_mysql - enables MySQL auth but disables PAM auth
-# _with_ldap  - enabled LDAP auth
+%bcond_with    extra           # with additional, maybe useful, but unmaintained features
+%bcond_without ldap            # disable LDAP auth
+%bcond_without longusername    # with username length = 128 (default 32)
+%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             # disable SSL/TLS support
 #
 Summary:       Small, fast and secure FTP server
 Summary(pl):   Ma³y, szybki i bezpieczny serwer FTP
 Name:          pure-ftpd
-Version:       1.0.14
+Version:       1.0.20
 Release:       3
 Epoch:         0
-License:       GPL
+License:       BSD-like
 Group:         Daemons
 Source0:       ftp://ftp.pureftpd.org/pub/pure-ftpd/releases/%{name}-%{version}.tar.bz2
+# Source0-md5: e928e9e15adf6b52bfe6183fdad20144
 Source1:       %{name}.pamd
 Source2:       %{name}.init
 Source3:       ftpusers.tar.bz2
-# Source3-md5: 76c80b6ec9f4d079a1e27316edddbe16
+# 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
+Patch3:                %{name}-userlength.patch
 URL:           http://www.pureftpd.org/
 BuildRequires: libcap-devel
-%{?_with_mysql:BuildRequires:  mysql-devel}
-%{?_with_ldap:BuildRequires:   openldap-devel}
+%{?with_ldap:BuildRequires:    openldap-devel}
+%{?with_mysql:BuildRequires:   mysql-devel}
+%{?with_pgsql:BuildRequires:   postgresql-devel}
+%{?with_tls:BuildRequires:     openssl-devel}
 BuildRequires: pam-devel
-Prereq:                rc-scripts
+PreReq:                rc-scripts
 Requires(post,preun):/sbin/chkconfig
+Requires:      pam >= 0.77.3
+Requires:      perl-base
 Provides:      ftpserver
-BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 Obsoletes:     ftpserver
 Obsoletes:     anonftp
 Obsoletes:     bftpd
 Obsoletes:     ftpd-BSD
+Obsoletes:     glftpd
 Obsoletes:     heimdal-ftpd
 Obsoletes:     linux-ftpd
 Obsoletes:     muddleftpd
@@ -40,8 +55,10 @@ Obsoletes:   troll-ftpd
 Obsoletes:     vsftpd
 Obsoletes:     wu-ftpd
 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
@@ -57,47 +74,57 @@ Pure-FTPD to szybki, wysokiej jako
 FTP bazuj±cy na Troll-FTPd. W przeciwieñstwie do innych serwerów FTP
 nie ma znanych luk w bezpieczeñstwie. Ponadto jest trywialny w
 konfiguracji i specjalnie zaprojektowany dla nowych kerneli Linuksa
-(setfsuid, sendfile, capabilibies). Mo¿liwo¶ci to wsparcie dla PAMa,
+(setfsuid, sendfile, capabilibies). Mo¿liwo¶ci to wsparcie dla PAM-a,
 IPv6, chroot()owanych katalogów domowych, virtualne domeny, wbudowany
 LS, system anty-warezowy, ograniczanie portów dla pasywnych
 po³±czeñ...
 
 %prep
-%setup -q -n %{name}-%{version}
+%setup -q
+%patch0 -p0
+%{?with_longusername:%patch3 -p1}
+%{?with_extra:%patch1 -p1}
+%{?with_extra:%patch2 -p1}
 
 %build
 %configure \
+       --with-boring \
        --with-altlog \
-       --with-puredb \
-       --with-extauth \
-       %{?!_with_mysql:--with-pam} \
        --with-cookie \
-       --with-throttling \
-       --with-ratios \
-       --with-quotas \
+       --with-diraliases \
+       --with-extauth \
        --with-ftpwho \
+       --with-language=english \
        --with-largefile \
+       %{?with_ldap:--with-ldap} \
+       %{?with_mysql:CPPFLAGS="-I%{_includedir}/mysql" --with-mysql} \
+       --with-pam \
+       --with-peruserlimits \
+       %{?with_pgsql:--with-pgsql} \
+       --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-virtualhosts \
        --with-virtualchroot \
-       --with-diraliases \
-       --with-peruserlimits \
-       %{?_with_mysql:CPPFLAGS="-I%{_includedir}/mysql" --with-mysql} \
-       %{?_with_ldap:--with-ldap} \
-       --with-language=english \
-       --with-privsep
-
+       --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,/home/services/ftp/Incoming}
+       $RPM_BUILD_ROOT{%{_sysconfdir}/vhosts,%{_ftpdir}}
 
-%{__make} install DESTDIR=$RPM_BUILD_ROOT
+%{__make} install \
+       DESTDIR=$RPM_BUILD_ROOT
 
 install %{SOURCE1} $RPM_BUILD_ROOT/etc/pam.d/%{name}
 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
 
-%{?_with_mysql:install pureftpd-mysql.conf $RPM_BUILD_ROOT%{_sysconfdir}/pureftpd-mysql.conf}
+%{?with_ldap:install pureftpd-ldap.conf $RPM_BUILD_ROOT%{_sysconfdir}/pureftpd-ldap.conf}
+%{?with_mysql:install pureftpd-mysql.conf $RPM_BUILD_ROOT%{_sysconfdir}/pureftpd-mysql.conf}
+%{?with_pgsql:install pureftpd-pgsql.conf $RPM_BUILD_ROOT%{_sysconfdir}/pureftpd-pgsql.conf}
 install configuration-file/pure-ftpd.conf $RPM_BUILD_ROOT%{_sysconfdir}/pureftpd.conf
 install configuration-file/pure-config.pl $RPM_BUILD_ROOT%{_sbindir}
 touch $RPM_BUILD_ROOT/etc/security/blacklist.ftp
@@ -112,9 +139,9 @@ rm -rf $RPM_BUILD_ROOT
 %post
 /sbin/chkconfig --add %{name}
 if [ -f %{_var}/lock/subsys/%{name} ]; then
-        /etc/rc.d/init.d/%{name} restart 1>&2
+       /etc/rc.d/init.d/%{name} restart 1>&2
 else
-        echo "Run \"/etc/rc.d/init.d/%{name} start\" to start PureFTPD daemon."
+       echo "Run \"/etc/rc.d/init.d/%{name} start\" to start PureFTPD daemon."
 fi
 
 %preun
@@ -127,19 +154,20 @@ 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}
-%{?!_with_mysql:%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/*}
-%{?!_with_mysql:%attr(640,root,root) %config(noreplace) %verify(not md5 size mtime) /etc/security/blacklist.ftp}
-%{?_with_mysql:%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pureftpd-mysql.conf}
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/*
+%attr(640,root,root) %config(noreplace) %verify(not md5 size mtime) /etc/security/blacklist.ftp
+%{?with_ldap:%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pureftpd-ldap.conf}
+%{?with_mysql:%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pureftpd-mysql.conf}
+%{?with_pgsql:%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pureftpd-pgsql.conf}
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pureftpd.conf
 %attr(710,root,ftp) %dir %{_sysconfdir}
 %dir %{_sysconfdir}/vhosts
 %dir %{_sysconfdir}/pure-ftpd
-%dir /home/services/ftp
-%attr(775,root,ftp) %dir /home/services/ftp/Incoming
+%dir %{_ftpdir}
 %{_mandir}/man?/*
 %lang(ja) %{_mandir}/ja/man5/ftpusers*
 %lang(pl) %{_mandir}/pl/man5/ftpusers*
This page took 0.036605 seconds and 4 git commands to generate.