]> git.pld-linux.org Git - packages/vsftpd.git/blob - vsftpd.spec
- bconds should be the very first thing, moved defines and includes after them
[packages/vsftpd.git] / vsftpd.spec
1 # TODO:
2 # - default config does not work with inetd configuration
3 #
4 # Conditional build:
5 %bcond_with     clamav  #ClamAV scanning support
6
7 %define         _ftpdir /home/services/ftp
8 Summary:        vsftpd - Very Secure FTP Daemon
9 Summary(pl.UTF-8):      Bardzo Bezpieczny Demon FTP
10 Summary(pt_BR.UTF-8):   vsftpd - Daemon FTP Muito Seguro
11 Name:           vsftpd
12 Version:        2.3.2
13 Release:        2
14 License:        GPL v2
15 Group:          Daemons
16 Source0:        ftp://vsftpd.beasts.org/users/cevans/%{name}-%{version}.tar.gz
17 # Source0-md5:  bad7b117d737a738738836041edc00db
18 Source1:        %{name}.inetd
19 Source2:        %{name}.pamd
20 Source3:        %{name}-ftpusers
21 Source4:        ftpusers.tar.bz2
22 # Source4-md5:  76c80b6ec9f4d079a1e27316edddbe16
23 Source5:        %{name}.init
24 Patch0:         %{name}-builddefs.patch
25 Patch1:         %{name}-amd64-findlibs.patch
26 Patch2:         %{name}-clamav.patch
27 Patch3:         %{name}-switch_sha256_to_sha1.patch
28 URL:            http://vsftpd.beasts.org/
29 BuildRequires:  libcap-devel
30 BuildRequires:  libwrap-devel
31 %if "%{pld_release}" == "ac"
32 BuildRequires:  openssl-devel >= 0.9.7d
33 %else
34 BuildRequires:  openssl-devel >= 0.9.8
35 %endif
36 BuildRequires:  rpmbuild(macros) >= 1.268
37 Requires:       %{name}-init = %{version}-%{release}
38 Requires:       filesystem >= 3.0-11
39 Requires:       pam >= 0.77.3
40 Provides:       ftpserver
41 Conflicts:      man-pages < 1.51
42 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43
44 %description
45 A Very Secure FTP Daemon - written from scratch - by Chris "One Man
46 Security Audit Team" Evans.
47
48 %description -l pl.UTF-8
49 Bardzo Bezpieczny Demon FTP - napisany od zera przez Chrisa "One Man
50 Security Audit Team" Evansa.
51
52 %description -l pt_BR.UTF-8
53 A Very Secure FTP Daemon (vsftpd) - escrito do zero - por Chris "One
54 Man Security Audit Team" Evans.
55
56 %package inetd
57 Summary:        vsftpd - Very Secure FTP Daemon
58 Summary(pl.UTF-8):      Bardzo Bezpieczny Demon FTP
59 Summary(pt_BR.UTF-8):   vsftpd - Daemon FTP Muito Seguro
60 Group:          Networking/Daemons
61 Requires:       %{name} = %{version}-%{release}
62 Requires:       rc-inetd
63 Provides:       %{name}-init = %{version}-%{release}
64 Obsoletes:      vsftpd-standalone
65 Conflicts:      %{name} <= 2.0.3-1
66
67 %description inetd
68 This package allows to start vsftpd as inetd service.
69
70 %description inetd -l pl.UTF-8
71 Ten pakiet pozwala na wystartowanie vsftpd jako usÅ‚ugi inetd.
72
73 %package standalone
74 Summary:        vsftpd - Very Secure FTP Daemon
75 Summary(pl.UTF-8):      Bardzo Bezpieczny Demon FTP
76 Summary(pt_BR.UTF-8):   vsftpd - Daemon FTP Muito Seguro
77 Group:          Networking/Daemons
78 Requires(post,preun):   /sbin/chkconfig
79 Requires:       %{name} = %{version}-%{release}
80 Requires:       rc-scripts
81 Provides:       %{name}-init = %{version}-%{release}
82 Obsoletes:      vsftpd-inetd
83 Conflicts:      %{name} <= 2.0.3-1
84
85 %description standalone
86 This package allows to start vsftpd as standalone daemon.
87
88 %description standalone -l pl.UTF-8
89 Ten pakiet pozwala na wystartowanie vsftpd jako samodzielnego demona.
90
91 %prep
92 %setup -q
93 %patch0 -p1
94 %patch1 -p1
95 %if %{with clamav}
96 %patch2 -p1
97 %endif
98 %if "%{pld_release}" == "ac"
99 %patch3 -p1
100 %endif
101
102 %build
103 %{__make} \
104         CC="%{__cc}" \
105         CFLAGS="%{rpmcflags}" \
106         LINK="%{rpmldflags}"
107
108 %install
109 rm -rf $RPM_BUILD_ROOT
110 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man{5,8}} \
111         $RPM_BUILD_ROOT/etc/{pam.d,sysconfig/rc-inetd,logrotate.d,ftpd,rc.d/init.d} \
112         $RPM_BUILD_ROOT{%{_ftpdir}/pub/incoming,/var/log}
113
114 install vsftpd $RPM_BUILD_ROOT%{_sbindir}/vsftpd
115 install vsftpd.conf $RPM_BUILD_ROOT%{_sysconfdir}/vsftpd.conf
116 install vsftpd.conf.5 $RPM_BUILD_ROOT%{_mandir}/man5/vsftpd.conf.5
117 install vsftpd.8 $RPM_BUILD_ROOT%{_mandir}/man8/vsftpd.8
118 install RedHat/vsftpd.log $RPM_BUILD_ROOT/etc/logrotate.d/vsftpd
119
120 install %{SOURCE1} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/vsftpd
121 install %{SOURCE2} $RPM_BUILD_ROOT/etc/pam.d/ftp
122 install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/ftpd/ftpusers
123 install %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/vsftpd
124
125 > $RPM_BUILD_ROOT/var/log/vsftpd.log
126
127 bzip2 -dc %{SOURCE4} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
128 rm -f $RPM_BUILD_ROOT/usr/share/man/ftpusers-path.diff
129
130 %clean
131 rm -rf $RPM_BUILD_ROOT
132
133 %post
134 touch /var/log/vsftpd.log
135 chmod 640 /var/log/vsftpd.log
136
137 %post inetd
138 %service -q rc-inetd reload
139
140 %postun inetd
141 if [ "$1" = "0" ]; then
142         %service -q rc-inetd reload
143 fi
144
145 %post standalone
146 /sbin/chkconfig --add %{name}
147 %service vsftpd restart "vsftpd server"
148
149 %preun standalone
150 if [ "$1" = "0" ]; then
151         %service vsftpd stop
152         /sbin/chkconfig --del %{name}
153 fi
154
155 %files
156 %defattr(644,root,root,755)
157 %doc AUDIT BENCHMARKS BUGS Changelog FAQ README README.ssl REWARD SIZE SPEED TODO TUNING EXAMPLE SECURITY
158 %attr(755,root,root) %{_sbindir}/vsftpd
159 %dir %attr(750,root,ftp) %dir %{_sysconfdir}/ftpd
160 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/vsftpd.conf
161 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ftpd/ftpusers
162 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/ftp
163 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/vsftpd
164 %attr(640,root,root) %ghost /var/log/vsftpd.log
165 %{_mandir}/man5/vsftpd.conf.5*
166 %{_mandir}/man8/vsftpd.8*
167 %{_mandir}/man5/ftpusers.5*
168 %lang(ja) %{_mandir}/ja/man5/ftpusers*
169 %lang(pl) %{_mandir}/pl/man5/ftpusers*
170 %lang(pt_BR) %{_mandir}/pt_BR/man5/ftpusers*
171 %lang(ru) %{_mandir}/ru/man5/ftpusers*
172 %dir %{_ftpdir}
173 %dir %{_ftpdir}/pub
174 # it's safe - by default anon_upload_enable=NO, anon_world_readable_only=YES
175 %attr(775,root,ftp) %dir %{_ftpdir}/pub/incoming
176
177 %files inetd
178 %defattr(644,root,root,755)
179 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/vsftpd
180
181 %files standalone
182 %defattr(644,root,root,755)
183 %attr(754,root,root) /etc/rc.d/init.d/vsftpd
This page took 0.046255 seconds and 4 git commands to generate.