]> git.pld-linux.org Git - packages/pure-ftpd.git/blob - pure-ftpd.spec
- updated -config.patch: set AnonymousCantUpload to `yes' as default
[packages/pure-ftpd.git] / pure-ftpd.spec
1 #
2 # Conditional build:
3 %bcond_without  ldap    # disable LDAP auth
4 %bcond_without  mysql   # disable MySQL auth but disables PAM auth
5 %bcond_without  pgsql   # disable PostgreSQL support
6 %bcond_without  puredb  # disable pure-db support
7 %bcond_without  tls     # support SSL/TLS
8 #
9 Summary:        Small, fast and secure FTP server
10 Summary(pl):    Ma³y, szybki i bezpieczny serwer FTP
11 Name:           pure-ftpd
12 Version:        1.0.20
13 Release:        1
14 Epoch:          0
15 License:        BSD-like
16 Group:          Daemons
17 Source0:        ftp://ftp.pureftpd.org/pub/pure-ftpd/releases/%{name}-%{version}.tar.bz2
18 # Source0-md5:  e928e9e15adf6b52bfe6183fdad20144
19 Source1:        %{name}.pamd
20 Source2:        %{name}.init
21 Source3:        ftpusers.tar.bz2
22 # Source3-md5:  76c80b6ec9f4d079a1e27316edddbe16
23 Patch0:         %{name}-config.patch
24 Patch1:         %{name}-path_to_ssl_cert_in_config.patch
25 Patch2:         %{name}-pure-pw_passwd.patch
26 URL:            http://www.pureftpd.org/
27 BuildRequires:  libcap-devel
28 %{?with_ldap:BuildRequires:     openldap-devel}
29 %{?with_mysql:BuildRequires:    mysql-devel}
30 %{?with_pgsql:BuildRequires:    postgresql-devel}
31 %{?with_tls:BuildRequires:      openssl-devel}
32 BuildRequires:  pam-devel
33 Prereq:         rc-scripts
34 Requires(post,preun):/sbin/chkconfig
35 Requires:       pam >= 0.77.3
36 Requires:       perl-base
37 Provides:       ftpserver
38 Obsoletes:      ftpserver
39 Obsoletes:      anonftp
40 Obsoletes:      bftpd
41 Obsoletes:      ftpd-BSD
42 Obsoletes:      glftpd
43 Obsoletes:      heimdal-ftpd
44 Obsoletes:      linux-ftpd
45 Obsoletes:      muddleftpd
46 Obsoletes:      proftpd
47 Obsoletes:      proftpd-common
48 Obsoletes:      proftpd-inetd
49 Obsoletes:      proftpd-standalone
50 Obsoletes:      troll-ftpd
51 Obsoletes:      vsftpd
52 Obsoletes:      wu-ftpd
53 Conflicts:      man-pages < 1.51
54 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
55
56 %define         _sysconfdir     /etc/ftpd
57 %define         _ftpdir         /home/services/ftp
58
59 %description
60 Pure-FTPd is a fast, production-quality, standard-comformant FTP
61 server, based upon Troll-FTPd. Unlike other popular FTP servers, it
62 has no known security flaw, it is really trivial to set up and it is
63 especially designed for modern Linux kernels (setfsuid, sendfile,
64 capabilities) . Features include PAM support, IPv6, chroot()ed home
65 directories, virtual domains, built-in LS, anti-warez system, bounded
66 ports for passive downloads...
67
68 %description -l pl
69 Pure-FTPD to szybki, wysokiej jako¶ci, odpowiadaj±cy standardom serwer
70 FTP bazuj±cy na Troll-FTPd. W przeciwieñstwie do innych serwerów FTP
71 nie ma znanych luk w bezpieczeñstwie. Ponadto jest trywialny w
72 konfiguracji i specjalnie zaprojektowany dla nowych kerneli Linuksa
73 (setfsuid, sendfile, capabilibies). Mo¿liwo¶ci to wsparcie dla PAMa,
74 IPv6, chroot()owanych katalogów domowych, virtualne domeny, wbudowany
75 LS, system anty-warezowy, ograniczanie portów dla pasywnych
76 po³±czeñ...
77
78 %prep
79 %setup -q
80 %patch0 -p0
81 %patch1 -p1
82 %patch2 -p1
83
84 %build
85 %configure \
86         --with-boring \
87         --with-altlog \
88         --with-cookie \
89         --with-diraliases \
90         --with-extauth \
91         --with-ftpwho \
92         --with-language=english \
93         --with-largefile \
94         %{?with_ldap:--with-ldap} \
95         %{?with_mysql:CPPFLAGS="-I%{_includedir}/mysql" --with-mysql} \
96         --with-pam \
97         --with-peruserlimits \
98         %{?with_pgsql:--with-pgsql} \
99         --with-privsep \
100         %{?with_puredb:--with-puredb} \
101         --with-quotas \
102         --with-ratios \
103         --with-throttling \
104         %{?with_tls:--with-tls} \
105         --with-uploadscript \
106         --with-virtualchroot \
107         --with-virtualhosts 
108          
109 %install
110 rm -rf $RPM_BUILD_ROOT
111 install -d $RPM_BUILD_ROOT/etc/{pam.d,sysconfig,security,rc.d/init.d} \
112         $RPM_BUILD_ROOT{%{_sysconfdir}/vhosts,%{_ftpdir}/Incoming}
113
114 %{__make} install \
115         DESTDIR=$RPM_BUILD_ROOT
116
117 install %{SOURCE1} $RPM_BUILD_ROOT/etc/pam.d/%{name}
118 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
119
120 %{?with_ldap:install pureftpd-ldap.conf $RPM_BUILD_ROOT%{_sysconfdir}/pureftpd-ldap.conf}
121 %{?with_mysql:install pureftpd-mysql.conf $RPM_BUILD_ROOT%{_sysconfdir}/pureftpd-mysql.conf}
122 %{?with_pgsql:install pureftpd-pgsql.conf $RPM_BUILD_ROOT%{_sysconfdir}/pureftpd-pgsql.conf}
123 install configuration-file/pure-ftpd.conf $RPM_BUILD_ROOT%{_sysconfdir}/pureftpd.conf
124 install configuration-file/pure-config.pl $RPM_BUILD_ROOT%{_sbindir}
125 touch $RPM_BUILD_ROOT/etc/security/blacklist.ftp
126
127 ln -s vhosts $RPM_BUILD_ROOT%{_sysconfdir}/pure-ftpd
128
129 bzip2 -dc %{SOURCE3} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
130
131 %clean
132 rm -rf $RPM_BUILD_ROOT
133
134 %post
135 /sbin/chkconfig --add %{name}
136 if [ -f %{_var}/lock/subsys/%{name} ]; then
137         /etc/rc.d/init.d/%{name} restart 1>&2
138 else
139         echo "Run \"/etc/rc.d/init.d/%{name} start\" to start PureFTPD daemon."
140 fi
141
142 %preun
143 if [ "$1" = "0" ]; then
144         if [ -f %{_var}/lock/subsys/%{name} ]; then
145                 /etc/rc.d/init.d/%{name} stop 1>&2
146         fi
147         /sbin/chkconfig --del %{name}
148 fi
149
150 %files
151 %defattr(644,root,root,755)
152 %doc AUTHORS ChangeLog CONTACT FAQ HISTORY NEWS README* THANKS pure*.conf pureftpd.schema
153 %attr(755,root,root) %{_bindir}/*
154 %attr(755,root,root) %{_sbindir}/*
155 %attr(754,root,root) /etc/rc.d/init.d/%{name}
156 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/*
157 %attr(640,root,root) %config(noreplace) %verify(not md5 size mtime) /etc/security/blacklist.ftp
158 %{?with_ldap:%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pureftpd-ldap.conf}
159 %{?with_mysql:%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pureftpd-mysql.conf}
160 %{?with_pgsql:%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pureftpd-pgsql.conf}
161 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pureftpd.conf
162 %attr(710,root,ftp) %dir %{_sysconfdir}
163 %dir %{_sysconfdir}/vhosts
164 %dir %{_sysconfdir}/pure-ftpd
165 %dir %{_ftpdir}
166 %attr(775,root,ftp) %dir %{_ftpdir}/Incoming
167 %{_mandir}/man?/*
168 %lang(ja) %{_mandir}/ja/man5/ftpusers*
169 %lang(pl) %{_mandir}/pl/man5/ftpusers*
170 %lang(pt_BR) %{_mandir}/pt_BR/man5/ftpusers*
171 %lang(ru) %{_mandir}/ru/man5/ftpusers*
This page took 0.102161 seconds and 3 git commands to generate.