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