]> git.pld-linux.org Git - packages/pure-ftpd.git/blob - pure-ftpd.spec
- 1.0.10 - stable release, STBR
[packages/pure-ftpd.git] / pure-ftpd.spec
1 # _with_mysql - enables MySQL auth but disables PAM auth
2 # _with_ldap  - enabled LDAP auth
3 Summary:        Small, fast and secure FTP server
4 Summary(pl):    Ma³y, szybki i bezpieczny serwer FTP
5 Name:           pure-ftpd
6 Version:        1.0.10
7 Release:        1
8 Epoch:          0
9 License:        GPL
10 Group:          Daemons
11 Source0:        http://prdownloads.sourceforge.net/pureftpd/%{name}-%{version}.tar.gz
12 Source1:        %{name}.pamd
13 Source2:        %{name}.init
14 Patch0:         %{name}-config.patch
15 URL:            http://www.pureftpd.org/
16 BuildRequires:  autoconf
17 BuildRequires:  automake
18 BuildRequires:  libcap-devel
19 %{?_with_mysql:BuildRequires:   mysql-devel}
20 %{?_with_ldap:BuildRequires:    openldap-devel}
21 BuildRequires:  pam-devel
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
60 %build
61 aclocal
62 autoconf
63 automake -a -c
64 %configure \
65         --sysconfdir=/etc/ftpd \
66         %{?_with_mysql:CPPFLAGS="-I%{_includedir}/mysql" --with-mysql} \
67         --with-altlog \
68         --with-puredb \
69         %{?!_with_mysql:--with-pam} \
70         --with-cookie \
71         --with-throttling \
72         --with-ratios \
73         --with-quotas \
74         --with-ftpwho \
75         --with-largefile \
76         --with-uploadscript \
77         --with-virtualhosts \
78         --with-language=english \
79         --with-virtualchroot \
80         %{?_with_ldap:--with_ldap}
81
82 %install
83 rm -rf $RPM_BUILD_ROOT
84 install -d $RPM_BUILD_ROOT/etc/{pam.d,sysconfig,ftpd/vhosts,security,rc.d/init.d} \
85         $RPM_BUILD_ROOT/home/ftp/Incoming
86
87 %{__make} install DESTDIR=$RPM_BUILD_ROOT
88
89 install %{SOURCE1} $RPM_BUILD_ROOT/etc/pam.d/%{name}
90 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
91 install contrib/redhat.sysconfig $RPM_BUILD_ROOT%{_sysconfdir}/ftpd/pureftpd.conf
92 install pureftpd-mysql.conf      $RPM_BUILD_ROOT%{_sysconfdir}/ftpd/pureftpd-mysql.conf
93 touch $RPM_BUILD_ROOT/etc/security/blacklist.ftp
94
95 gzip -9nf README* AUTHORS ChangeLog HISTORY NEWS THANKS
96
97 %clean
98 rm -rf $RPM_BUILD_ROOT
99
100 %post
101 /sbin/chkconfig --add %{name}
102 if [ -f %{_var}/lock/subsys/%{name} ]; then
103         /etc/rc.d/init.d/%{name} restart 1>&2
104 else
105         echo "Run \"/etc/rc.d/init.d/%{name} start\" to start PureFTPD daemon."
106 fi
107
108 %preun
109 if [ "$1" = "0" ]; then
110         if [ -f %{_var}/lock/subsys/%{name} ]; then
111                 /etc/rc.d/init.d/%{name} stop 1>&2
112         fi
113         /sbin/chkconfig --del %{name}
114 fi
115
116 %files
117 %defattr(644,root,root,755)
118 %doc *.gz pure*.conf
119 %attr(755,root,root) %{_bindir}/*
120 %attr(755,root,root) %{_sbindir}/*
121 %attr(640,root,root) %dir /etc/ftpd
122 %dir %{_sysconfdir}/ftpd/vhosts
123 %attr(754,root,root) /etc/rc.d/init.d/%{name}
124 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ftpd/pureftpd.conf
125 %{?_with_mysql:%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ftpd/pureftpd-mysql.conf}
126 %{?!_with_mysql:%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/*}
127 %{?!_with_mysql:%attr(640,root,root) %config(noreplace) %verify(not md5 size mtime) /etc/security/blacklist.ftp}
128 %dir /home/ftp
129 %attr(775,root,ftp) %dir /home/ftp/Incoming
130 %{_mandir}/man?/*
This page took 0.0775 seconds and 4 git commands to generate.