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