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