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