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