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