]> git.pld-linux.org Git - packages/pure-ftpd.git/blob - pure-ftpd.spec
d6f13ca629248de892f2f45f34c226cf9fd9c488
[packages/pure-ftpd.git] / pure-ftpd.spec
1 #
2 # Conditional build:
3 %bcond_with     extra   # with additional, maybe useful, but unmaintained features
4 %bcond_without  ldap    # disable LDAP auth
5 %bcond_without  mysql   # disable MySQL auth but disables PAM auth
6 %bcond_without  pgsql   # disable PostgreSQL support
7 %bcond_without  puredb  # disable pure-db support
8 %bcond_without  tls     # support SSL/TLS
9 #
10 Summary:        Small, fast and secure FTP server
11 Summary(pl):    Ma³y, szybki i bezpieczny serwer FTP
12 Name:           pure-ftpd
13 Version:        1.0.20
14 Release:        2
15 Epoch:          0
16 License:        BSD-like
17 Group:          Daemons
18 Source0:        ftp://ftp.pureftpd.org/pub/pure-ftpd/releases/%{name}-%{version}.tar.bz2
19 # Source0-md5:  e928e9e15adf6b52bfe6183fdad20144
20 Source1:        %{name}.pamd
21 Source2:        %{name}.init
22 Source3:        ftpusers.tar.bz2
23 # Source3-md5:  76c80b6ec9f4d079a1e27316edddbe16
24 Patch0:         %{name}-config.patch
25 # This patch is broken and changes default pureftpd behaviour
26 Patch1:         %{name}-path_to_ssl_cert_in_config.patch
27 Patch2:         %{name}-pure-pw_passwd.patch
28 URL:            http://www.pureftpd.org/
29 BuildRequires:  libcap-devel
30 %{?with_ldap:BuildRequires:     openldap-devel}
31 %{?with_mysql:BuildRequires:    mysql-devel}
32 %{?with_pgsql:BuildRequires:    postgresql-devel}
33 %{?with_tls:BuildRequires:      openssl-devel}
34 BuildRequires:  pam-devel
35 Prereq:         rc-scripts
36 Requires(post,preun):/sbin/chkconfig
37 Requires:       pam >= 0.77.3
38 Requires:       perl-base
39 Provides:       ftpserver
40 Obsoletes:      ftpserver
41 Obsoletes:      anonftp
42 Obsoletes:      bftpd
43 Obsoletes:      ftpd-BSD
44 Obsoletes:      glftpd
45 Obsoletes:      heimdal-ftpd
46 Obsoletes:      linux-ftpd
47 Obsoletes:      muddleftpd
48 Obsoletes:      proftpd
49 Obsoletes:      proftpd-common
50 Obsoletes:      proftpd-inetd
51 Obsoletes:      proftpd-standalone
52 Obsoletes:      troll-ftpd
53 Obsoletes:      vsftpd
54 Obsoletes:      wu-ftpd
55 Conflicts:      man-pages < 1.51
56 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
57
58 %define         _sysconfdir     /etc/ftpd
59 %define         _ftpdir         /home/services/ftp
60
61 %description
62 Pure-FTPd is a fast, production-quality, standard-comformant FTP
63 server, based upon Troll-FTPd. Unlike other popular FTP servers, it
64 has no known security flaw, it is really trivial to set up and it is
65 especially designed for modern Linux kernels (setfsuid, sendfile,
66 capabilities) . Features include PAM support, IPv6, chroot()ed home
67 directories, virtual domains, built-in LS, anti-warez system, bounded
68 ports for passive downloads...
69
70 %description -l pl
71 Pure-FTPD to szybki, wysokiej jako¶ci, odpowiadaj±cy standardom serwer
72 FTP bazuj±cy na Troll-FTPd. W przeciwieñstwie do innych serwerów FTP
73 nie ma znanych luk w bezpieczeñstwie. Ponadto jest trywialny w
74 konfiguracji i specjalnie zaprojektowany dla nowych kerneli Linuksa
75 (setfsuid, sendfile, capabilibies). Mo¿liwo¶ci to wsparcie dla PAMa,
76 IPv6, chroot()owanych katalogów domowych, virtualne domeny, wbudowany
77 LS, system anty-warezowy, ograniczanie portów dla pasywnych
78 po³±czeñ...
79
80 %prep
81 %setup -q
82 %patch0 -p0
83 %{?with_extra:%patch1 -p1}
84 %{?with_extra:%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.058535 seconds and 2 git commands to generate.