]> git.pld-linux.org Git - packages/pure-ftpd.git/blob - pure-ftpd.spec
- 1.0.13, STBR
[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.13
10 Release:        1
11 Epoch:          0
12 License:        GPL
13 Group:          Daemons
14 Source0:        ftp://ftp.pureftpd.org/pub/pure-ftpd/releases/%{name}-%{version}a.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}a
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/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:cat pureftpd-mysql.conf >> configuration-file/pure-ftpd.conf}
96 install configuration-file/pure-ftpd.conf $RPM_BUILD_ROOT%{_sysconfdir}/pure-ftpd.conf
97 install configuration-file/pure-config.pl $RPM_BUILD_ROOT%{_sbindir}
98 touch $RPM_BUILD_ROOT/etc/security/blacklist.ftp
99
100 bzip2 -dc %{SOURCE3} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
101
102 %clean
103 rm -rf $RPM_BUILD_ROOT
104
105 %post
106 /sbin/chkconfig --add %{name}
107 if [ -f %{_var}/lock/subsys/%{name} ]; then
108         /etc/rc.d/init.d/%{name} restart 1>&2
109 else
110         echo "Run \"/etc/rc.d/init.d/%{name} start\" to start PureFTPD daemon."
111 fi
112
113 %preun
114 if [ "$1" = "0" ]; then
115         if [ -f %{_var}/lock/subsys/%{name} ]; then
116                 /etc/rc.d/init.d/%{name} stop 1>&2
117         fi
118         /sbin/chkconfig --del %{name}
119 fi
120
121 %files
122 %defattr(644,root,root,755)
123 %doc README* AUTHORS ChangeLog HISTORY NEWS THANKS pure*.conf
124 %attr(755,root,root) %{_bindir}/*
125 %attr(755,root,root) %{_sbindir}/*
126 %attr(754,root,root) /etc/rc.d/init.d/%{name}
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 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pure-ftpd.conf
130 %attr(740,root,root) %dir %{_sysconfdir}
131 %dir %{_sysconfdir}/vhosts
132 %dir /home/ftp
133 %attr(775,root,ftp) %dir /home/ftp/Incoming
134 %{_mandir}/man?/*
135 %lang(ja) %{_mandir}/ja/man5/ftpusers*
136 %lang(pl) %{_mandir}/pl/man5/ftpusers*
137 %lang(pt_BR) %{_mandir}/pt_BR/man5/ftpusers*
138 %lang(ru) %{_mandir}/ru/man5/ftpusers*
This page took 0.033727 seconds and 4 git commands to generate.