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