]> git.pld-linux.org Git - packages/pure-ftpd.git/blob - pure-ftpd.spec
- 1.0.16a
[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 # _with_tls   - support SSL/TLS
6 #
7 Summary:        Small, fast and secure FTP server
8 Summary(pl):    Ma³y, szybki i bezpieczny serwer FTP
9 Name:           pure-ftpd
10 Version:        1.0.16a
11 Release:        1
12 Epoch:          0
13 License:        BSD-like
14 Group:          Daemons
15 Source0:        ftp://ftp.pureftpd.org/pub/pure-ftpd/releases/%{name}-%{version}.tar.bz2
16 # Source0-md5:  9bb8e85367bda9a63afdcbe6e2d26c71
17 Source1:        %{name}.pamd
18 Source2:        %{name}.init
19 Source3:        ftpusers.tar.bz2
20 # Source3-md5:  76c80b6ec9f4d079a1e27316edddbe16
21 URL:            http://www.pureftpd.org/
22 BuildRequires:  libcap-devel
23 %{?_with_mysql:BuildRequires:   mysql-devel}
24 %{?_with_ldap:BuildRequires:    openldap-devel}
25 %{?_with_tls:BuildRequires:     openssl-devel}
26 BuildRequires:  pam-devel
27 Prereq:         rc-scripts
28 Requires(post,preun):/sbin/chkconfig
29 Provides:       ftpserver
30 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31 Obsoletes:      ftpserver
32 Obsoletes:      anonftp
33 Obsoletes:      bftpd
34 Obsoletes:      ftpd-BSD
35 Obsoletes:      heimdal-ftpd
36 Obsoletes:      linux-ftpd
37 Obsoletes:      muddleftpd
38 Obsoletes:      proftpd
39 Obsoletes:      proftpd-common
40 Obsoletes:      proftpd-inetd
41 Obsoletes:      proftpd-standalone
42 Obsoletes:      troll-ftpd
43 Obsoletes:      vsftpd
44 Obsoletes:      wu-ftpd
45 Conflicts:      man-pages < 1.51
46
47 %define         _sysconfdir     /etc/ftpd
48
49 %description
50 Pure-FTPd is a fast, production-quality, standard-comformant FTP
51 server, based upon Troll-FTPd. Unlike other popular FTP servers, it
52 has no known security flaw, it is really trivial to set up and it is
53 especially designed for modern Linux kernels (setfsuid, sendfile,
54 capabilities) . Features include PAM support, IPv6, chroot()ed home
55 directories, virtual domains, built-in LS, anti-warez system, bounded
56 ports for passive downloads...
57
58 %description -l pl
59 Pure-FTPD to szybki, wysokiej jako¶ci, odpowiadaj±cy standardom serwer
60 FTP bazuj±cy na Troll-FTPd. W przeciwieñstwie do innych serwerów FTP
61 nie ma znanych luk w bezpieczeñstwie. Ponadto jest trywialny w
62 konfiguracji i specjalnie zaprojektowany dla nowych kerneli Linuksa
63 (setfsuid, sendfile, capabilibies). Mo¿liwo¶ci to wsparcie dla PAMa,
64 IPv6, chroot()owanych katalogów domowych, virtualne domeny, wbudowany
65 LS, system anty-warezowy, ograniczanie portów dla pasywnych
66 po³±czeñ...
67
68 %prep
69 %setup -q
70
71 %build
72 %configure \
73         --with-altlog \
74         --with-puredb \
75         --with-extauth \
76         %{?!_with_mysql:--with-pam} \
77         --with-cookie \
78         --with-throttling \
79         --with-ratios \
80         --with-quotas \
81         --with-ftpwho \
82         --with-largefile \
83         --with-uploadscript \
84         --with-virtualhosts \
85         --with-virtualchroot \
86         --with-diraliases \
87         --with-peruserlimits \
88         %{?_with_mysql:CPPFLAGS="-I%{_includedir}/mysql" --with-mysql} \
89         %{?_with_ldap:--with-ldap} \
90         %{?_with_tls: --with-tls} \
91         --with-language=english \
92         --with-privsep
93
94 %install
95 rm -rf $RPM_BUILD_ROOT
96 install -d $RPM_BUILD_ROOT/etc/{pam.d,sysconfig,security,rc.d/init.d} \
97         $RPM_BUILD_ROOT{%{_sysconfdir}/vhosts,/home/services/ftp/Incoming}
98
99 %{__make} install DESTDIR=$RPM_BUILD_ROOT
100
101 install %{SOURCE1} $RPM_BUILD_ROOT/etc/pam.d/%{name}
102 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
103
104 %{?_with_mysql:install pureftpd-mysql.conf $RPM_BUILD_ROOT%{_sysconfdir}/pureftpd-mysql.conf}
105 install configuration-file/pure-ftpd.conf $RPM_BUILD_ROOT%{_sysconfdir}/pureftpd.conf
106 install configuration-file/pure-config.pl $RPM_BUILD_ROOT%{_sbindir}
107 touch $RPM_BUILD_ROOT/etc/security/blacklist.ftp
108
109 ln -s vhosts $RPM_BUILD_ROOT%{_sysconfdir}/pure-ftpd
110
111 bzip2 -dc %{SOURCE3} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
112
113 %clean
114 rm -rf $RPM_BUILD_ROOT
115
116 %post
117 /sbin/chkconfig --add %{name}
118 if [ -f %{_var}/lock/subsys/%{name} ]; then
119         /etc/rc.d/init.d/%{name} restart 1>&2
120 else
121         echo "Run \"/etc/rc.d/init.d/%{name} start\" to start PureFTPD daemon."
122 fi
123
124 %preun
125 if [ "$1" = "0" ]; then
126         if [ -f %{_var}/lock/subsys/%{name} ]; then
127                 /etc/rc.d/init.d/%{name} stop 1>&2
128         fi
129         /sbin/chkconfig --del %{name}
130 fi
131
132 %files
133 %defattr(644,root,root,755)
134 %doc README* AUTHORS ChangeLog HISTORY NEWS THANKS pure*.conf
135 %attr(755,root,root) %{_bindir}/*
136 %attr(755,root,root) %{_sbindir}/*
137 %attr(754,root,root) /etc/rc.d/init.d/%{name}
138 %{?!_with_mysql:%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/*}
139 %{?!_with_mysql:%attr(640,root,root) %config(noreplace) %verify(not md5 size mtime) /etc/security/blacklist.ftp}
140 %{?_with_mysql:%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pureftpd-mysql.conf}
141 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pureftpd.conf
142 %attr(710,root,ftp) %dir %{_sysconfdir}
143 %dir %{_sysconfdir}/vhosts
144 %dir %{_sysconfdir}/pure-ftpd
145 %dir /home/services/ftp
146 %attr(775,root,ftp) %dir /home/services/ftp/Incoming
147 %{_mandir}/man?/*
148 %lang(ja) %{_mandir}/ja/man5/ftpusers*
149 %lang(pl) %{_mandir}/pl/man5/ftpusers*
150 %lang(pt_BR) %{_mandir}/pt_BR/man5/ftpusers*
151 %lang(ru) %{_mandir}/ru/man5/ftpusers*
This page took 0.066422 seconds and 4 git commands to generate.