Sophie

Sophie

distrib > Mandriva > current > i586 > media > contrib-release-src > by-pkgid > aa99034af861bdf3d8a00d4988e26109 > files > 4

lighttpd-1.4.26-3mdv2010.1.src.rpm

%define	name	lighttpd
%define	version	1.4.26
%define	release	%mkrel 3

# Following modules bring no additionnal dependencies
# Other ones go into separate packages
%define base_modules	mod_access.so,mod_accesslog.so,mod_alias.so,mod_cgi.so,mod_dirlisting.so,mod_evhost.so,mod_expire.so,mod_extforward.so,mod_fastcgi.so,mod_flv_streaming.so,mod_indexfile.so,mod_proxy.so,mod_redirect.so,mod_rewrite.so,mod_rrdtool.so,mod_scgi.so,mod_secdownload.so,mod_setenv.so,mod_simple_vhost.so,mod_ssi.so,mod_staticfile.so,mod_status.so,mod_userdir.so,mod_usertrack.so,mod_evasive.so

Name:		%name
Version:	%version
Release:	%release
Summary:	A fast webserver with minimal memory-footprint
Source0:	http://lighttpd.net/download/%{name}-%{version}.tar.bz2
Source1:	lighttpd.init
Patch0:		lighttpd-1.4.x-Fix-handling-return-value-of-SSL_CTX_set_options.patch
License:	BSD
Group:		System/Servers
URL:		http://lighttpd.net/
BuildRequires:	zlib-devel fam-devel mysql-devel memcache-devel lua-devel
BuildRequires:	openssl-devel gdbm-devel bzip2-devel pcre-devel openldap-devel
BuildRequires:	attr-devel libxml2-devel sqlite3-devel
BuildRequires:	autoconf2.5
# For /var/www/html, we should split it
Requires(pre):	apache-conf
Requires:	apache-conf
Requires(post):	apache-conf
Requires(post):	rpm-helper
Requires(preun):rpm-helper
Obsoletes:	%name-modules
Provides:	%name-modules
Provides:	webserver
BuildRoot:	%{_tmppath}/%{name}-root

%description
Security, speed, compliance, and flexibility--all of these describe LightTPD
which is rapidly redefining efficiency of a webserver; as it is designed and
optimized for high performance environments. With a small memory
footprint compared to other web-servers, effective management of the
cpu-load, and advanced feature set (FastCGI, CGI, Auth,
Output-Compression, URL-Rewriting and many more) LightTPD is the
perfect solution for every server that is suffering load problems.

This packages contains the server and base modules :
%(for mod in $(echo %base_modules | tr ',' '\n'); do echo ${mod%%.so}; done)

%package mod_auth
Summary:	Authentification module for %{name}
Group:		System/Servers
Requires:	%{name}

%description mod_auth
lighttpd supportes both authentication method described by RFC 2617:

 - basic
 - digest

Depending on the method lighttpd provides various way to store the credentials
used for the authentication.

for basic auth:
 - plain
 - htpasswd
 - htdigest
 - ldap

for digest auth:
 - plain
 - htdigest

%package mod_cml
Summary:        CML (Cache Meta Language) module for %{name}
Group:          System/Servers
Requires:	%{name}

%description mod_cml
CML (Cache Meta Language) is a Meta language to describe the dependencies
of a page at one side and building a page from its fragments on the other side
using LUA.

%package mod_compress
Summary:        Output Compression module for %{name}
Group:          System/Servers
Requires:	%{name}

%description mod_compress
Output compression reduces the network load and can improve the
overall throughput of the webserver. All major http-clients support
compression by announcing it in the Accept-Encoding header. This
is used to negotiate the most suitable compression method.
We support deflate, gzip and bzip2.

%package mod_mysql_vhost
Summary:        MySQL-based vhosting module for %{name}
Group:          System/Servers
Requires:	%{name}

%description mod_mysql_vhost
With MySQL-based vhosting you can store the path to a given
host's document root in a MySQL database.

%package mod_trigger_b4_dl
Summary:        Trigger before Download module for %{name}
Group:          System/Servers
Requires:	%{name}

%description mod_trigger_b4_dl
Anti Hotlinking:
 - if user requests ''download-url'' directly, the request is denied
   and he is redirected to ''deny-url'
 - if user visits ''trigger-url'' before requesting ''download-url'',
    access is granted
 - if user visits ''download-url'' again after ''trigger-timeout'' has
   elapsed, the request is denied and he is redirected to ''deny-url''

The trigger information is either stored locally in a gdbm file or
remotely in memcached.

%package mod_webdav
Summary:        WebDAV module for %{name}
Group:          System/Servers
Requires:	%{name}

%description mod_webdav
The WebDAV module for %{name} is a very minimalistic implementation of RFC
2518.

%package mod_magnet
Summary:	Module to control the request handling in %{name}
Group:		System/Servers
Requires:	%{name}

%description mod_magnet
mod_magnet can attract a request in several stages in the request-handling.

* either at the same level as mod_rewrite, before any parsing of the URL is
  done
* or at a later stage, when the doc-root is known and the physical-path is
  already setup

Keep in mind that the magnet is executed in the core of lighty. EVERY long-
running operation is blocking ALL connections in the server. You are warned.
For time-consuming or blocking scripts use mod_fastcgi and friends.

%prep
%setup -q
%patch0 -p0

%build
%configure2_5x --libdir=%{_libdir}/%{name}/ \
  --with-mysql\
  --with-ldap\
  --with-attr\
  --with-openssl\
  --with-pcre\
  --with-bzip2\
  --with-fam\
  --with-webdav-props\
  --with-gdbm\
  --with-memcache\
  --with-lua

%make

%install
rm -rf %buildroot
%makeinstall_std

mkdir -p %{buildroot}%{_sysconfdir}/{init.d,sysconfig}
install -m 755 %{SOURCE1} %{buildroot}%{_sysconfdir}/init.d/lighttpd
install -m 644 doc/sysconfig.lighttpd %{buildroot}%{_sysconfdir}/sysconfig/lighttpd

mkdir -p %{buildroot}%{_sysconfdir}/lighttpd
install -m 644 doc/lighttpd.conf %{buildroot}%{_sysconfdir}/lighttpd

sed -i 's£^server.document-root.*$£server.document-root = "%{_var}/www/html"£' %{buildroot}%{_sysconfdir}/lighttpd/lighttpd.conf
sed -i 's£^server.errorlog.*$£server.errorlog = "%{_logdir}/lighttpd/error.log"£' %{buildroot}%{_sysconfdir}/lighttpd/lighttpd.conf
sed -i 's£^accesslog.filename.*$£accesslog.filename = "%{_logdir}/lighttpd/access.log"£' %{buildroot}%{_sysconfdir}/lighttpd/lighttpd.conf

sed -i 's£.*server.username[\t ]*= .*$£server.username = "apache"£' %{buildroot}%{_sysconfdir}/lighttpd/lighttpd.conf
sed -i 's£.*server.groupname[\t ]*= .*$£server.groupname = "apache"£' %{buildroot}%{_sysconfdir}/lighttpd/lighttpd.conf

mkdir -p %{buildroot}%{_logdir}/lighttpd

mkdir -p %{buildroot}%{_var}/www/html

mkdir -p %{buildroot}%{_sysconfdir}/logrotate.d
cat > %{buildroot}%{_sysconfdir}/logrotate.d/%{name} <<EOF
%{_logdir}/%{name}/*.log {
    size=20M
    rotate 5
    weekly
    missingok
    notifempty
    postrotate
        service %{name} reload
    endscript
}
EOF

rm -f %{buildroot}%{_libdir}/%{name}/*.la

echo %{_libdir}/%{name}/{%{base_modules}} | tr ' ' '\n' > base.list
for i in doc/*.txt
do
	mod=`cat "$i" | tr -d '\\r' | sed -n "s/^Module:.*\\(mod_.*\\)$/\\1/p"`
	if [ -z "$mod" ]
	then
		echo "%doc $i" >> base.list
	else
		if echo "%{base_modules}" | grep "$mod" > /dev/null
		then
			echo "%doc $i" >> base.list
		else
			echo "%doc $i" >> "$mod"
		fi
	fi
done

mkdir -p %buildroot%{_var}/www/html

%clean
rm -rf %buildroot

%post
# Fix rights on logs after upgrade, else the server can not start
if [ $1 -gt 1 ]; then
	if grep '^server.username = "apache"' %{_sysconfdir}/lighttpd/lighttpd.conf >/dev/null; then
		if [ `stat -c %U /var/log/lighttpd/` != "apache" ]; then
			chown -R apache /var/log/lighttpd/
		fi
	fi
fi

%_post_service lighttpd

%preun
%_preun_service lighttpd

%files -f base.list
%defattr(-,root,root)
%doc doc/lighttpd.conf doc/lighttpd.user README INSTALL NEWS COPYING AUTHORS
%attr(0755,root,root) %{_sysconfdir}/init.d/lighttpd
%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/sysconfig/lighttpd
%dir %{_sysconfdir}/lighttpd/
%config(noreplace) %{_sysconfdir}/lighttpd/*
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
%attr(0755,apache,apache) %{_logdir}/lighttpd
%{_mandir}/*/*
%{_sbindir}/*
%attr(0755,apache,apache) %dir %{_var}/www
%attr(0755,root,root) %dir %{_var}/www/html

%files mod_auth -f mod_auth
%defattr(-,root,root)
%{_libdir}/%{name}/mod_auth.so

%files mod_cml -f mod_cml
%defattr(-,root,root)
%{_libdir}/%{name}/mod_cml.so

%files mod_compress -f mod_compress
%defattr(-,root,root)
%{_libdir}/%{name}/mod_compress.so

%files mod_mysql_vhost -f mod_mysql_vhost
%defattr(-,root,root)
%{_libdir}/%{name}/mod_mysql_vhost.so

%files mod_trigger_b4_dl -f mod_trigger_b4_dl
%defattr(-,root,root)
%{_libdir}/%{name}/mod_trigger_b4_dl.so

%files mod_webdav -f mod_webdav
%defattr(-,root,root)
%{_libdir}/%{name}/mod_webdav.so

%files mod_magnet -f mod_magnet
%defattr(-,root,root)
%{_libdir}/%{name}/mod_magnet.so




%changelog
* Tue May 11 2010 Pascal Terjan <pterjan@mandriva.org> 1.4.26-3mdv2010.1
+ Revision: 544530
- Fix for updated openssl (#59208)

* Mon Apr 19 2010 Funda Wang <fwang@mandriva.org> 1.4.26-2mdv2010.1
+ Revision: 536628
- rebuild

* Mon Feb 08 2010 Funda Wang <fwang@mandriva.org> 1.4.26-1mdv2010.1
+ Revision: 502219
- New version 1.4.26

* Tue Feb 02 2010 Funda Wang <fwang@mandriva.org> 1.4.25-3mdv2010.1
+ Revision: 499545
- add patch fixing CVE-2010-0295

* Mon Dec 14 2009 Pascal Terjan <pterjan@mandriva.org> 1.4.25-2mdv2010.1
+ Revision: 478609
- Require apache-conf

* Sat Nov 21 2009 Funda Wang <fwang@mandriva.org> 1.4.25-1mdv2010.1
+ Revision: 468541
- new version 1.4.25

* Tue Nov 10 2009 Michael Scherer <misc@mandriva.org> 1.4.24-1mdv2010.1
+ Revision: 463910
- update to 1.4.24

* Sun Jun 21 2009 Funda Wang <fwang@mandriva.org> 1.4.23-1mdv2010.0
+ Revision: 387545
- fix file list
- New version 1.4.23

* Thu Jun 04 2009 Pascal Terjan <pterjan@mandriva.org> 1.4.22-2mdv2010.0
+ Revision: 382818
- Improve logrotate config (#51405)

* Sun Mar 08 2009 Frederik Himpe <fhimpe@mandriva.org> 1.4.22-1mdv2009.1
+ Revision: 352794
- update to new version 1.4.22

* Tue Feb 17 2009 Jérôme Soyer <saispo@mandriva.org> 1.4.21-1mdv2009.1
+ Revision: 341579
- New upstream release

* Sat Dec 06 2008 Oden Eriksson <oeriksson@mandriva.com> 1.4.19-5mdv2009.1
+ Revision: 311337
- rebuilt against mysql-5.1.30 libs

* Sun Sep 28 2008 Frederik Himpe <fhimpe@mandriva.org> 1.4.19-4mdv2009.0
+ Revision: 289026
- Sync patches with Debian (including 4 security patches)

* Mon Jul 28 2008 Thierry Vignaud <tv@mandriva.org> 1.4.19-3mdv2009.0
+ Revision: 250768
- rebuild

* Wed Mar 19 2008 Frederik Himpe <fhimpe@mandriva.org> 1.4.19-1mdv2008.1
+ Revision: 189024
- New upstream release which fixes a few security problems:
  http://www.lighttpd.net/2008/3/10/1-4-19-made-in-germany

* Fri Mar 07 2008 Pascal Terjan <pterjan@mandriva.org> 1.4.18-2mdv2008.1
+ Revision: 181394
- Run under apache user and not root

  + Thierry Vignaud <tv@mandriva.org>
    - fix description-line-too-long
    - kill re-definition of %%buildroot on Pixel's request

  + Olivier Blin <oblin@mandriva.com>
    - restore BuildRoot

* Thu Sep 13 2007 Pascal Terjan <pterjan@mandriva.org> 1.4.18-1mdv2008.0
+ Revision: 84836
- update to new version 1.4.18

* Wed Sep 05 2007 Pascal Terjan <pterjan@mandriva.org> 1.4.17-1mdv2008.0
+ Revision: 79925
- 1.4.17

* Thu Jul 26 2007 Pascal Terjan <pterjan@mandriva.org> 1.4.16-1mdv2008.0
+ Revision: 55897
- update to new version 1.4.16
- Correctly sort the recent modules as they appear in the description
- Update URL

* Fri Apr 20 2007 Pascal Terjan <pterjan@mandriva.org> 1.4.15-1mdv2008.0
+ Revision: 15224
- 1.4.15
- add mod_extforward to the base package


* Mon Nov 13 2006 Pascal Terjan <pterjan@mandriva.org> 1.4.13-1mdv2007.0
+ Revision: 83774
- Do not require sed in macro expansion
- Add mod_magnet
- 1.4.13
- Fix Summaries and Descriptions (#25782)
  Patch from Serge Demonchaux
- Import lighttpd

* Thu Jun 08 2006 Pascal Terjan <pterjan@mandriva.org> 1.4.11-2mdv2007.0
- Don't split base modules as they are needed
- Ship /var/www/html

* Sat Mar 11 2006 Pascal Terjan <pterjan@mandriva.org> 1.4.11-1mdk
- 1.4.11

* Thu Feb 09 2006 Pascal Terjan <pterjan@mandriva.org> 1.4.10-1mdk
- 1.4.10

* Mon Jan 16 2006 Pascal Terjan <pterjan@mandriva.org> 1.4.9-1mdk
- 1.4.9

* Wed Jan 11 2006 Pascal Terjan <pterjan@mandriva.org> 1.4.8-2mdk
- lib64 fix

* Sun Dec 11 2005 Pascal Terjan <pterjan@mandriva.org> 1.4.8-1mdk
- 1.4.7

* Fri Nov 18 2005 Pascal Terjan <pterjan@mandriva.org> 1.4.7-1mdk
- 1.4.7

* Mon Oct 03 2005 Pascal Terjan <pterjan@mandriva.org> 1.4.4-1mdk
- first version