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