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