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