]> git.pld-linux.org Git - packages/pure-ftpd.git/blame - pure-ftpd.spec
- rel 6; fix sending messages to client when built with SSL and connection is unencrypted
[packages/pure-ftpd.git] / pure-ftpd.spec
CommitLineData
2339236e 1#
55ef71da 2# Conditional build:
b0ee1286 3%bcond_with extra # with additional, maybe useful, but unmaintained features
55248013 4%bcond_without ldap # disable LDAP auth
a701bd94 5%bcond_without longusername # with username length = 128 (default 32)
55248013
JB
6%bcond_without mysql # disable MySQL auth but disables PAM auth
7%bcond_without pgsql # disable PostgreSQL support
b0ee1286 8%bcond_without puredb # disable pure-db support
55248013 9%bcond_without tls # disable SSL/TLS support
be28fa67 10%bcond_without cap # disable capabilities
55ef71da 11#
6fb7bec9 12Summary: Small, fast and secure FTP server
26699573 13Summary(pl.UTF-8): Mały, szybki i bezpieczny serwer FTP
6fb7bec9 14Name: pure-ftpd
15be9429 15Version: 1.0.21
e7945dd0 16Release: 6%{?with_extra:extra}
120cc4fb 17Epoch: 0
ec7a73dd 18License: BSD-like%{?with_extra:, GLPv2 for pure-config due to libcfg+ license}
6fb7bec9 19Group: Daemons
409d1698 20Source0: ftp://ftp.pureftpd.org/pub/pure-ftpd/releases/%{name}-%{version}.tar.bz2
2a065a1b 21# Source0-md5: ca8a8dbec0cd9c8ea92fc4c37ea9c410
1a7d4ed6
AM
22Source1: %{name}.pamd
23Source2: %{name}.init
f3b2c985 24Source3: %{name}.sysconfig
25Source4: ftpusers.tar.bz2
e495e203 26# Source4-md5: 76c80b6ec9f4d079a1e27316edddbe16
f3b2c985 27Source5: http://twittner.host.sk/files/pure-config/pure-config-20041201.tar.gz
e495e203 28# Source5-md5: 3f2ff6b00b5c38ee11ce588ee5af6cf6
05a70f8c 29Patch0: %{name}-config.patch
f3b874dd 30Patch1: %{name}-path_to_ssl_cert_in_config.patch
d4cb23e4 31Patch2: %{name}-pure-pw_passwd.patch
15be9429
AM
32Patch3: %{name}-mysql_config.patch
33Patch4: %{name}-nosymlinks-hideuidmismatch.patch
34Patch5: %{name}-auth-can-delete-pure.patch
e7945dd0 35Patch6: %{name}-nonssl-die.patch
1dc0551b 36URL: http://www.pureftpd.org/
2275e2d9 37%{?with_extra:BuildRequires: autoconf}
38%{?with_extra:BuildRequires: automake}
be28fa67 39%{?with_cap:BuildRequires: libcap-devel}
ec7a73dd 40%{?with_extra:BuildRequires: libcfg+-devel >= 0.6.2}
05a70f8c 41%{?with_mysql:BuildRequires: mysql-devel}
59384139 42%{?with_ldap:BuildRequires: openldap-devel >= 2.3.0}
05a70f8c 43%{?with_tls:BuildRequires: openssl-devel}
6fb7bec9 44BuildRequires: pam-devel
066593d9 45%{?with_pgsql:BuildRequires: postgresql-devel}
b0baff94 46BuildRequires: rpmbuild(macros) >= 1.304
9ee5892a 47Requires(post,preun): /sbin/chkconfig
8a7f5f1c 48Requires: pam >= 0.79.0
80d52d89 49%{!?with_extra:Requires: perl-base}
066593d9 50Requires: rc-scripts
6fb7bec9 51Provides: ftpserver
6fb7bec9 52Obsoletes: anonftp
ee61d781 53Obsoletes: bftpd
6fb7bec9 54Obsoletes: ftpd-BSD
422ed04c 55Obsoletes: ftpserver
5cc5526e 56Obsoletes: glftpd
a4d28986 57Obsoletes: heimdal-ftpd
281ed819 58Obsoletes: krb5-ftpd
6fb7bec9 59Obsoletes: linux-ftpd
ee61d781 60Obsoletes: muddleftpd
5d918c8b 61Obsoletes: proftpd
ca1fd5c2
JB
62Obsoletes: proftpd-common
63Obsoletes: proftpd-inetd
64Obsoletes: proftpd-standalone
6fb7bec9 65Obsoletes: troll-ftpd
53ed5728 66Obsoletes: vsftpd
5d918c8b 67Obsoletes: wu-ftpd
052dc4ea 68Conflicts: man-pages < 1.51
1eca7e3d 69BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
6fb7bec9 70
07e0d7b6 71%define _sysconfdir /etc/ftpd
05a70f8c 72%define _ftpdir /home/services/ftp
895518e0 73%define schemadir /usr/share/openldap/schema
120cc4fb 74
6fb7bec9 75%description
1a7d4ed6
AM
76Pure-FTPd is a fast, production-quality, standard-comformant FTP
77server, based upon Troll-FTPd. Unlike other popular FTP servers, it
78has no known security flaw, it is really trivial to set up and it is
79especially designed for modern Linux kernels (setfsuid, sendfile,
80capabilities) . Features include PAM support, IPv6, chroot()ed home
81directories, virtual domains, built-in LS, anti-warez system, bounded
82ports for passive downloads...
6fb7bec9 83
73fbf17b
JR
84%description -l pl.UTF-8
85Pure-FTPD to szybki, wysokiej jakości, odpowiadający standardom serwer
86FTP bazujący na Troll-FTPd. W przeciwieństwie do innych serwerów FTP
87nie ma znanych luk w bezpieczeństwie. Ponadto jest trywialny w
25a7eaba 88konfiguracji i specjalnie zaprojektowany dla nowych kerneli Linuksa
73fbf17b
JR
89(setfsuid, sendfile, capabilibies). Możliwości to wsparcie dla PAM-a,
90IPv6, chroot()owanych katalogów domowych, virtualne domeny, wbudowany
91LS, system anty-warezowy, ograniczanie portów dla pasywnych
92połączeń...
6fb7bec9 93
90100a41 94%package -n openldap-schema-pureftpd
2e3c4f78 95Summary: Pure-FTPd LDAP schema
92a0cbe7 96Summary(pl.UTF-8): Schemat LDAP dla Pure-FTPd
dc8e8dbc 97Group: Networking/Daemons
2e3c4f78 98Requires(post,postun): sed >= 4.0
0cbff5aa 99Requires: openldap-servers
2e3c4f78 100Requires: sed >= 4.0
0cbff5aa 101
90100a41 102%description -n openldap-schema-pureftpd
0cbff5aa 103This package contains an Pure-FTPd openldap schema.
104
90100a41 105%description -n openldap-schema-pureftpd -l pl.UTF-8
0cbff5aa 106Ten pakiet zawiera schemat Pure-FTPd pureftpd.schema dla openldapa.
107
6fb7bec9 108%prep
f3b2c985 109%setup -q -a 5
05a70f8c 110%patch0 -p0
15be9429 111%patch3 -p1
c82bfd0c 112%patch4 -p1
496cdaa9 113%patch5 -p1
e7945dd0 114%patch6 -p0
e77a91ac 115%{?with_extra:%patch1 -p1}
116%{?with_extra:%patch2 -p1}
6fb7bec9
AM
117
118%build
15be9429 119# drop --without-cork for Th
6fb7bec9 120%configure \
15be9429 121 --without-cork \
1898bb50 122 --with-boring \
1a7d4ed6 123 --with-altlog \
bcf1319a 124 --with-cookie \
05a70f8c 125 --with-diraliases \
126 --with-extauth \
1dc0551b 127 --with-ftpwho \
05a70f8c 128 --with-language=english \
1dc0551b 129 --with-largefile \
be28fa67 130 %{!?with_cap:--without-capabilities} \
05a70f8c 131 %{?with_ldap:--with-ldap} \
1eca7e3d 132 %{?with_mysql:CPPFLAGS="-I%{_includedir}/mysql" --with-mysql} \
05a70f8c 133 --with-pam \
134 --with-peruserlimits \
1eca7e3d 135 %{?with_pgsql:--with-pgsql} \
05a70f8c 136 --with-privsep \
137 %{?with_puredb:--with-puredb} \
138 --with-quotas \
139 --with-ratios \
140 --with-throttling \
c2f4f1d5 141 %{?with_tls:--with-tls --with-certfile=%{_sharedstatedir}/openssl/certs/ftpd.pem} \
05a70f8c 142 --with-uploadscript \
143 --with-virtualchroot \
d98853a9 144 --with-virtualhosts
ec7a73dd 145
146%if %{with extra}
147cd pure-config
148%{__aclocal}
149%{__autoconf}
150%{__autoheader}
151%{__automake}
152%configure
153%{__make}
154%endif
d98853a9 155
6fb7bec9
AM
156%install
157rm -rf $RPM_BUILD_ROOT
6c09eb3b 158install -d $RPM_BUILD_ROOT/etc/{pam.d,sysconfig,security,rc.d/init.d} \
895518e0 159 $RPM_BUILD_ROOT{%{_sysconfdir}/vhosts,%{_ftpdir},%{schemadir}}
6fb7bec9 160
81399515
PG
161%{__make} install \
162 DESTDIR=$RPM_BUILD_ROOT
6fb7bec9 163
7a0525ff 164install %{SOURCE1} $RPM_BUILD_ROOT/etc/pam.d/%{name}
165install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
f3b2c985 166install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
743bf7df 167
1eca7e3d 168%{?with_ldap:install pureftpd-ldap.conf $RPM_BUILD_ROOT%{_sysconfdir}/pureftpd-ldap.conf}
169%{?with_mysql:install pureftpd-mysql.conf $RPM_BUILD_ROOT%{_sysconfdir}/pureftpd-mysql.conf}
170%{?with_pgsql:install pureftpd-pgsql.conf $RPM_BUILD_ROOT%{_sysconfdir}/pureftpd-pgsql.conf}
453b040c 171install configuration-file/pure-ftpd.conf $RPM_BUILD_ROOT%{_sysconfdir}/pureftpd.conf
ec7a73dd 172%{!?with_extra:install configuration-file/pure-config.pl $RPM_BUILD_ROOT%{_sbindir}}
895518e0 173install pureftpd.schema $RPM_BUILD_ROOT%{schemadir}/pureftpd.schema
403b943e
JR
174
175touch $RPM_BUILD_ROOT%{_sysconfdir}/ftpusers
f045676c 176
453b040c
AM
177ln -s vhosts $RPM_BUILD_ROOT%{_sysconfdir}/pure-ftpd
178
f3b2c985 179bzip2 -dc %{SOURCE4} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
6afff6dc 180rm -f $RPM_BUILD_ROOT%{_mandir}/ftpusers-path.diff
052dc4ea 181
ec7a73dd 182%if %{with extra}
a8147983 183%{__make} -C pure-config install \
066593d9 184 DESTDIR=$RPM_BUILD_ROOT
ec7a73dd 185%endif
186
6fb7bec9
AM
187%clean
188rm -rf $RPM_BUILD_ROOT
189
190%post
1a7d4ed6 191/sbin/chkconfig --add %{name}
422ed04c 192%service %{name} restart "PureFTPD daemon"
6fb7bec9 193
1a7d4ed6 194%preun
ee61d781 195if [ "$1" = "0" ]; then
422ed04c 196 %service %{name} stop
ee61d781 197 /sbin/chkconfig --del %{name}
8bcab37a 198fi
6fb7bec9 199
895518e0 200%post -n openldap-schema-pureftpd
201%openldap_schema_register %{schemadir}/pureftpd.schema -d core
202%service -q ldap restart
203
204%postun -n openldap-schema-pureftpd
205if [ "$1" = "0" ]; then
206 %openldap_schema_unregister %{schemadir}/pureftpd.schema
207 %service -q ldap restart
208fi
209
210
6fb7bec9
AM
211%files
212%defattr(644,root,root,755)
8f66ece6 213%doc AUTHORS ChangeLog CONTACT COPYING FAQ HISTORY NEWS README* THANKS pure*.conf pureftpd.schema
066a5f91 214%attr(755,root,root) %{_bindir}/*
6fb7bec9 215%attr(755,root,root) %{_sbindir}/*
7a0525ff 216%attr(754,root,root) /etc/rc.d/init.d/%{name}
b133fe31 217%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/*
f3b2c985 218%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/*
403b943e 219%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ftpusers
1eca7e3d 220%{?with_ldap:%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pureftpd-ldap.conf}
221%{?with_mysql:%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pureftpd-mysql.conf}
222%{?with_pgsql:%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pureftpd-pgsql.conf}
453b040c 223%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pureftpd.conf
cbfee1f8 224%attr(710,root,ftp) %dir %{_sysconfdir}
cd12828e 225%dir %{_sysconfdir}/vhosts
453b040c 226%dir %{_sysconfdir}/pure-ftpd
05a70f8c 227%dir %{_ftpdir}
1dc0551b 228%{_mandir}/man?/*
052dc4ea 229%lang(ja) %{_mandir}/ja/man5/ftpusers*
230%lang(pl) %{_mandir}/pl/man5/ftpusers*
231%lang(pt_BR) %{_mandir}/pt_BR/man5/ftpusers*
232%lang(ru) %{_mandir}/ru/man5/ftpusers*
0cbff5aa 233
90100a41 234%files -n openldap-schema-pureftpd
92a0cbe7
JB
235%defattr(644,root,root,755)
236%{schemadir}/pureftpd.schema
This page took 0.075551 seconds and 4 git commands to generate.