]> git.pld-linux.org Git - packages/pure-ftpd.git/blobdiff - pure-ftpd.spec
- fix pure-config url
[packages/pure-ftpd.git] / pure-ftpd.spec
index d6f13ca629248de892f2f45f34c226cf9fd9c488..d089d7edf92ac1f6721754ad92998b5c694fa3b2 100644 (file)
@@ -1,19 +1,20 @@
 #
 # 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
-%bcond_without puredb  # disable pure-db support
-%bcond_without  tls    # support SSL/TLS
+%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.20
-Release:       2
+Release:       6%{?with_extra:extra}
 Epoch:         0
-License:       BSD-like
+License:       BSD-like%{?with_extra:, GLPv2 for pure-config due to libcfg+ license}
 Group:         Daemons
 Source0:       ftp://ftp.pureftpd.org/pub/pure-ftpd/releases/%{name}-%{version}.tar.bz2
 # Source0-md5: e928e9e15adf6b52bfe6183fdad20144
@@ -21,21 +22,28 @@ Source1:    %{name}.pamd
 Source2:       %{name}.init
 Source3:       ftpusers.tar.bz2
 # Source3-md5: 76c80b6ec9f4d079a1e27316edddbe16
+Source4:       http://twittner.host.sk/files/pure-config/pure-config-20041201.tar.gz
+# Source4-md5: 3f2ff6b00b5c38ee11ce588ee5af6cf6
 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
+Patch4:                %{name}-mysql_config.patch
+Patch5:                %{name}-nosymlinks-hideuidmismatch.patch
 URL:           http://www.pureftpd.org/
+%{?with_extra:BuildRequires:   autoconf}
+%{?with_extra:BuildRequires:   automake}
 BuildRequires: libcap-devel
+%{?with_extra:BuildRequires:   libcfg+-devel >= 0.6.2}
 %{?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
-Requires(post,preun):/sbin/chkconfig
-Requires:      pam >= 0.77.3
-Requires:      perl-base
+PreReq:                rc-scripts
+Requires(post,preun):  /sbin/chkconfig
+Requires:      pam >= 0.79.0
+%{!?with_extra:Requires:       perl-base}
 Provides:      ftpserver
 Obsoletes:     ftpserver
 Obsoletes:     anonftp
@@ -72,14 +80,17 @@ 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
+%setup -q -a 4
 %patch0 -p0
+%patch4 -p1
+%patch5 -p1
+%{?with_longusername:%patch3 -p1}
 %{?with_extra:%patch1 -p1}
 %{?with_extra:%patch2 -p1}
 
@@ -106,12 +117,22 @@ po
        %{?with_tls:--with-tls --with-certfile=%{_sharedstatedir}/openssl/certs/ftpd.pem} \
        --with-uploadscript \
        --with-virtualchroot \
-       --with-virtualhosts 
-        
+       --with-virtualhosts
+
+%if %{with extra}
+cd pure-config
+%{__aclocal}
+%{__autoconf}
+%{__autoheader}
+%{__automake}
+%configure
+%{__make}
+%endif
+
 %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,%{_ftpdir}/Incoming}
+       $RPM_BUILD_ROOT{%{_sysconfdir}/vhosts,%{_ftpdir}}
 
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT
@@ -123,22 +144,27 @@ 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_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}
+%{!?with_extra:install configuration-file/pure-config.pl $RPM_BUILD_ROOT%{_sbindir}}
 touch $RPM_BUILD_ROOT/etc/security/blacklist.ftp
 
 ln -s vhosts $RPM_BUILD_ROOT%{_sysconfdir}/pure-ftpd
 
 bzip2 -dc %{SOURCE3} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
 
+%if %{with extra}
+cd pure-config
+%{__make} install DESTDIR=$RPM_BUILD_ROOT
+%endif
+
 %clean
 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
@@ -165,7 +191,6 @@ fi
 %dir %{_sysconfdir}/vhosts
 %dir %{_sysconfdir}/pure-ftpd
 %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.037462 seconds and 4 git commands to generate.