]> git.pld-linux.org Git - packages/pure-ftpd.git/blob - pure-ftpd.spec
- back to old configuration name
[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:        1
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_mysql:CPPFLAGS="-I%{_includedir}/mysql" --with-mysql} \
70         --with-altlog \
71         --with-puredb \
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-language=english \
82         --with-virtualchroot \
83         %{?_with_ldap:--with-ldap}
84
85 %install
86 rm -rf $RPM_BUILD_ROOT
87 install -d $RPM_BUILD_ROOT/etc/{pam.d,sysconfig,security,rc.d/init.d} \
88         $RPM_BUILD_ROOT{%{_sysconfdir}/vhosts,/home/services/ftp/Incoming}
89
90 %{__make} install DESTDIR=$RPM_BUILD_ROOT
91
92 install %{SOURCE1} $RPM_BUILD_ROOT/etc/pam.d/%{name}
93 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
94
95 %{?_with_mysql:install pureftpd-mysql.conf $RPM_BUILD_ROOT%{_sysconfdir}/pureftpd-mysql.conf}
96 install configuration-file/pure-ftpd.conf $RPM_BUILD_ROOT%{_sysconfdir}/pureftpd.conf
97 install configuration-file/pure-config.pl $RPM_BUILD_ROOT%{_sbindir}
98 touch $RPM_BUILD_ROOT/etc/security/blacklist.ftp
99
100 ln -s vhosts $RPM_BUILD_ROOT%{_sysconfdir}/pure-ftpd
101
102 bzip2 -dc %{SOURCE3} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
103
104 %clean
105 rm -rf $RPM_BUILD_ROOT
106
107 %post
108 /sbin/chkconfig --add %{name}
109 if [ -f %{_var}/lock/subsys/%{name} ]; then
110         /etc/rc.d/init.d/%{name} restart 1>&2
111 else
112         echo "Run \"/etc/rc.d/init.d/%{name} start\" to start PureFTPD daemon."
113 fi
114
115 %preun
116 if [ "$1" = "0" ]; then
117         if [ -f %{_var}/lock/subsys/%{name} ]; then
118                 /etc/rc.d/init.d/%{name} stop 1>&2
119         fi
120         /sbin/chkconfig --del %{name}
121 fi
122
123 %files
124 %defattr(644,root,root,755)
125 %doc README* AUTHORS ChangeLog HISTORY NEWS THANKS pure*.conf
126 %attr(755,root,root) %{_bindir}/*
127 %attr(755,root,root) %{_sbindir}/*
128 %attr(754,root,root) /etc/rc.d/init.d/%{name}
129 %{?!_with_mysql:%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/*}
130 %{?!_with_mysql:%attr(640,root,root) %config(noreplace) %verify(not md5 size mtime) /etc/security/blacklist.ftp}
131 %{?!_with_mysql:%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pureftpd-mysql.conf
132 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pureftpd.conf
133 %attr(740,root,root) %dir %{_sysconfdir}
134 %dir %{_sysconfdir}/vhosts
135 %dir %{_sysconfdir}/pure-ftpd
136 %dir /home/services/ftp
137 %attr(775,root,ftp) %dir /home/services/ftp/Incoming
138 %{_mandir}/man?/*
139 %lang(ja) %{_mandir}/ja/man5/ftpusers*
140 %lang(pl) %{_mandir}/pl/man5/ftpusers*
141 %lang(pt_BR) %{_mandir}/pt_BR/man5/ftpusers*
142 %lang(ru) %{_mandir}/ru/man5/ftpusers*
This page took 0.061751 seconds and 4 git commands to generate.