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