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