]> git.pld-linux.org Git - packages/pure-ftpd.git/blob - pure-ftpd.spec
- added (conditional) LDAP support
[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.1.0
7 Release:        1
8 License:        GPL
9 Group:          Daemons
10 Group(de):      Server
11 Group(pl):      Serwery
12 Source0:        http://prdownloads.sourceforge.net/pureftpd/%{name}-%{version}.tar.gz
13 Source1:        %{name}.pamd
14 Source2:        %{name}.init
15 Patch0:         %{name}-config.patch
16 URL:            http://www.pureftpd.org/
17 BuildRequires:  autoconf
18 BuildRequires:  automake
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 Prereq:         /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:      troll-ftpd
36 Obsoletes:      wu-ftpd
37
38 %description
39 Pure-FTPd is a fast, production-quality, standard-comformant FTP
40 server, based upon Troll-FTPd. Unlike other popular FTP servers, it
41 has no known security flaw, it is really trivial to set up and it is
42 especially designed for modern Linux kernels (setfsuid, sendfile,
43 capabilities) . Features include PAM support, IPv6, chroot()ed home
44 directories, virtual domains, built-in LS, anti-warez system, bounded
45 ports for passive downloads...
46
47 %description -l pl
48 Pure-FTPD to szybki, wysokiej jako¶ci, odpowiadaj±cy standardom serwer
49 FTP bazuj±cy na Troll-FTPd. W przeciwieñstwie do innych serwerów FTP
50 nie ma znanych luk w bezpieczeñstwie. Ponadto jest trywialny w
51 konfiguracji i specjalnie zaprojektowany dla nowych kerneli Linuxa
52 (setfsuid, sendfile, capabilibies). Mo¿liwo¶ci to wsparcie dla PAMa,
53 IPv6, chroot()owanych katalogów domowych, virtualne domeny, wbudowany
54 LS, system anty-warezowy, ograniczanie portów dla pasywnych
55 po³±czeñ...
56
57 %prep
58 %setup -q
59 %patch0 -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         --with-virtualchroot \
81         %{?_with_ldap:--with_ldap}
82
83 %install
84 rm -rf $RPM_BUILD_ROOT
85 install -d $RPM_BUILD_ROOT/etc/{pam.d,sysconfig,ftpd/vhosts,security,rc.d/init.d} \
86         $RPM_BUILD_ROOT/home/ftp/Incoming
87
88 %{__make} install DESTDIR=$RPM_BUILD_ROOT
89
90 install %{SOURCE1} $RPM_BUILD_ROOT/etc/pam.d/%{name}
91 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
92 install contrib/redhat.sysconfig $RPM_BUILD_ROOT%{_sysconfdir}/ftpd/pureftpd.conf
93 install pureftpd-mysql.conf      $RPM_BUILD_ROOT%{_sysconfdir}/ftpd/pureftpd-mysql.conf
94 touch $RPM_BUILD_ROOT/etc/security/blacklist.ftp
95
96 gzip -9nf README* AUTHORS ChangeLog HISTORY NEWS THANKS
97
98 %clean
99 rm -rf $RPM_BUILD_ROOT
100
101 %post
102 /sbin/chkconfig --add %{name}
103 if [ -f %{_var}/lock/subsys/%{name} ]; then
104         /etc/rc.d/init.d/%{name} restart 1>&2
105 else
106         echo "Run \"/etc/rc.d/init.d/%{name} start\" to start PureFTPD daemon."
107 fi
108
109 %preun
110 if [ "$1" = "0" ]; then
111         if [ -f %{_var}/lock/subsys/%{name} ]; then
112                 /etc/rc.d/init.d/%{name} stop 1>&2
113         fi
114         /sbin/chkconfig --del %{name}
115 fi
116
117 %files
118 %defattr(644,root,root,755)
119 %doc *.gz pure*.conf
120 %attr(755,root,root) %{_bindir}/*
121 %attr(755,root,root) %{_sbindir}/*
122 %attr(640,root,root) %dir /etc/ftpd
123 %dir %{_sysconfdir}/ftpd/vhosts
124 %attr(754,root,root) /etc/rc.d/init.d/%{name}
125 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ftpd/pureftpd.conf
126 %{?_with_mysql:%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ftpd/pureftpd-mysql.conf}
127 %{?!_with_mysql:%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/*}
128 %{?!_with_mysql:%attr(640,root,root) %config(noreplace) %verify(not md5 size mtime) /etc/security/blacklist.ftp}
129 %dir /home/ftp
130 %attr(775,root,ftp) %dir /home/ftp/Incoming
131 %{_mandir}/man?/*
This page took 0.127644 seconds and 4 git commands to generate.