]> git.pld-linux.org Git - packages/pure-ftpd.git/blob - pure-ftpd.spec
- added -path_to_ssl_cert_in_config.patch which adds
[packages/pure-ftpd.git] / pure-ftpd.spec
1 # TODO: update documentation for SSLCertFile / -7
2 #       option
3 # Conditional build:
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.18
14 Release:        4.1
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:  56925bb7a35b07ca70e5453af731acba
20 Source1:        %{name}.pamd
21 Source2:        %{name}.init
22 Source3:        ftpusers.tar.bz2
23 # Source3-md5:  76c80b6ec9f4d079a1e27316edddbe16
24 Patch0:         %{name}-config.patch
25 Patch1:         %{name}-path_to_ssl_cert_in_config.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
83 %build
84 %configure \
85         --with-altlog \
86         --with-cookie \
87         --with-diraliases \
88         --with-extauth \
89         --with-ftpwho \
90         --with-language=english \
91         --with-largefile \
92         %{?with_ldap:--with-ldap} \
93         %{?with_mysql:CPPFLAGS="-I%{_includedir}/mysql" --with-mysql} \
94         --with-pam \
95         --with-peruserlimits \
96         %{?with_pgsql:--with-pgsql} \
97         --with-privsep \
98         %{?with_puredb:--with-puredb} \
99         --with-quotas \
100         --with-ratios \
101         --with-throttling \
102         %{?with_tls:--with-tls} \
103         --with-uploadscript \
104         --with-virtualchroot \
105         --with-virtualhosts 
106          
107 %install
108 rm -rf $RPM_BUILD_ROOT
109 install -d $RPM_BUILD_ROOT/etc/{pam.d,sysconfig,security,rc.d/init.d} \
110         $RPM_BUILD_ROOT{%{_sysconfdir}/vhosts,%{_ftpdir}/Incoming}
111
112 %{__make} install \
113         DESTDIR=$RPM_BUILD_ROOT
114
115 install %{SOURCE1} $RPM_BUILD_ROOT/etc/pam.d/%{name}
116 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
117
118 %{?with_ldap:install pureftpd-ldap.conf $RPM_BUILD_ROOT%{_sysconfdir}/pureftpd-ldap.conf}
119 %{?with_mysql:install pureftpd-mysql.conf $RPM_BUILD_ROOT%{_sysconfdir}/pureftpd-mysql.conf}
120 %{?with_pgsql:install pureftpd-pgsql.conf $RPM_BUILD_ROOT%{_sysconfdir}/pureftpd-pgsql.conf}
121 install configuration-file/pure-ftpd.conf $RPM_BUILD_ROOT%{_sysconfdir}/pureftpd.conf
122 install configuration-file/pure-config.pl $RPM_BUILD_ROOT%{_sbindir}
123 touch $RPM_BUILD_ROOT/etc/security/blacklist.ftp
124
125 ln -s vhosts $RPM_BUILD_ROOT%{_sysconfdir}/pure-ftpd
126
127 bzip2 -dc %{SOURCE3} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
128
129 %clean
130 rm -rf $RPM_BUILD_ROOT
131
132 %post
133 /sbin/chkconfig --add %{name}
134 if [ -f %{_var}/lock/subsys/%{name} ]; then
135         /etc/rc.d/init.d/%{name} restart 1>&2
136 else
137         echo "Run \"/etc/rc.d/init.d/%{name} start\" to start PureFTPD daemon."
138 fi
139
140 %preun
141 if [ "$1" = "0" ]; then
142         if [ -f %{_var}/lock/subsys/%{name} ]; then
143                 /etc/rc.d/init.d/%{name} stop 1>&2
144         fi
145         /sbin/chkconfig --del %{name}
146 fi
147
148 %files
149 %defattr(644,root,root,755)
150 %doc AUTHORS ChangeLog CONTACT FAQ HISTORY NEWS README* THANKS pure*.conf pureftpd.schema
151 %attr(755,root,root) %{_bindir}/*
152 %attr(755,root,root) %{_sbindir}/*
153 %attr(754,root,root) /etc/rc.d/init.d/%{name}
154 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/*
155 %attr(640,root,root) %config(noreplace) %verify(not md5 size mtime) /etc/security/blacklist.ftp
156 %{?with_ldap:%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pureftpd-ldap.conf}
157 %{?with_mysql:%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pureftpd-mysql.conf}
158 %{?with_pgsql:%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pureftpd-pgsql.conf}
159 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pureftpd.conf
160 %attr(710,root,ftp) %dir %{_sysconfdir}
161 %dir %{_sysconfdir}/vhosts
162 %dir %{_sysconfdir}/pure-ftpd
163 %dir %{_ftpdir}
164 %attr(775,root,ftp) %dir %{_ftpdir}/Incoming
165 %{_mandir}/man?/*
166 %lang(ja) %{_mandir}/ja/man5/ftpusers*
167 %lang(pl) %{_mandir}/pl/man5/ftpusers*
168 %lang(pt_BR) %{_mandir}/pt_BR/man5/ftpusers*
169 %lang(ru) %{_mandir}/ru/man5/ftpusers*
This page took 0.036689 seconds and 4 git commands to generate.