Sisyphus repositório
Última atualização: 1 outubro 2023 | SRPMs: 18631 | Visitas: 37555096
en ru br
ALT Linux repositórios
S:1.4.71-alt1
5.0: 1.4.20-alt2.svn.2364
4.1: 1.4.20-alt0.M41.1
4.0: 1.4.25-alt0.svn.2710.M40.1
+updates:1.4.19-alt1.M40.1
3.0:
+backports:1.4.9-alt0.M30.1

Group :: Sistema/Servidores
RPM: lighttpd

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

%def_with mysql
%def_with ssl
%def_with ldap
%def_with memcache
%def_with lua
%def_with gamin

%define lighttpd_user lighttpd
%define lighttpd_group lighttpd
%define lighttpd_spool %_spooldir/%name

%define spawn_fcgi_user _spawn_fcgi
%define spawn_fcgi_group _spawn_fcgi

%define docdir %_docdir/%name-%version-doc
%define svnrev 2364

Name: lighttpd
Version: 1.4.20
Release: alt2.svn.%svnrev
#Release: alt1

Summary: A fast webserver with minimal memory-footprint
License: BSD
Group: System/Servers

# git svn init -Ttrunk -ttags -bbranches svn://svn.lighttpd.net/lighttpd/

Url: http://www.lighttpd.net
Packager: Vladimir V Kamarzin <vvk at altlinux.ru>

Source0: lighttpd.tar

Requires(pre): shadow-utils
Provides: webserver

# Automatically added by buildreq on Wed Nov 02 2005

BuildRequires: bzlib-devel gcc-c++ libfcgi-devel libpcre-devel libstdc++-devel perl-devel zlib-devel

%{?_with_mysql:BuildPreReq: libMySQL-devel}
%{?_with_ssl:BuildPreReq: libssl-devel}
%{?_with_ldap:BuildPreReq: libldap-devel}
%{?_with_memcache:BuildPreReq: libmemcache-devel}
%{?_with_lua:BuildPreReq:liblua5-devel}
%{?_with_gamin:BuildPreReq: pkg-config gamin-devel}

%description
%name is intented to be a frontend for ad-servers which have to deliver
small files concurrently to many connections.

%package mysql-vhost
Summary: MySQL based vhosting %name module
Group: System/Servers
Requires: %name = %version-%release

%description mysql-vhost
This module provides virtual hosts (vhosts) based on a MySQL table.

%package cml
Summary: CML (Cache Meta Language) %name module
Group: System/Servers
Requires: %name = %version-%release

%description cml
CML 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 trigger_b4_dl
Summary: another anti hot-linking %name module
Group: System/Servers
Requires: %name = %version-%release

%description trigger_b4_dl
another anti hot-linking module.

%package rrdtool
Summary: rrdtool support %name module
Group: System/Servers
Requires: %name = %version-%release, rrdtool

%description rrdtool
mod_rrdtool is used to monitor the traffic and load on the webserver.

%package doc
Summary: %name documentation
Group: Documentation

%description doc
Documentation for %name.

%package -n spawn-fcgi
Summary: Spawn remote FastCGI processes
Group: System/Servers

%description -n spawn-fcgi
Spawn-fcgi is used to spawn remote FastCGI processes.

%prep
%setup -q -n %name
%autoreconf

%build
%configure --libdir=%_libdir/%name \
   %{?_with_mysql:       --with-mysql} \
   %{?_with_ssl:         --with-openssl} \
   %{?_with_ldap:  --with-ldap} \
   %{?_with_memcache:  --with-memcache} \
   %{?_with_lua:  --with-lua} \
   %{?_with_gamin:  --with-fam} \
   %{?_with_lua:  LUA_CFLAGS="-I/usr/include/" LUA_LIBS="-llua -llualib"}
%make_build

# run tests for sanity checks

#pushd tests
#./wrapper.sh . .. ./prepare.sh
#./wrapper.sh . .. ./run-tests.pl
#popd

%install
%makeinstall libdir=%buildroot%_libdir/%name

mkdir -p %buildroot%_sysconfdir/{rc.d/init.d,sysconfig,%name}
mkdir -p %buildroot{%_spooldir/%name/tmp,%_var/log/%name}
install -m755 %name.init %buildroot%_initdir/%name
install -m644 doc/sysconfig.lighttpd %buildroot%_sysconfdir/sysconfig/lighttpd
install -m644 doc/lighttpd.conf %buildroot%_sysconfdir/%name/%name.conf

mkdir -p %buildroot%_var/run/spawn-fcgi
install -m755 spawn-fcgi.init %buildroot%_initdir/spawn-fcgi
install -m644 spawn-fcgi.sysconfig %buildroot%_sysconfdir/sysconfig/spawn-fcgi

# logrotate script

install -pDm644 lighttpd.logrotate %buildroot%_sysconfdir/logrotate.d/%name

rm -rf %buildroot%docdir
mkdir -p %buildroot%docdir
cp -a ChangeLog doc/lighttpd.conf doc/lighttpd.user doc/*.txt %buildroot%docdir/
bzip2 -9 %buildroot%docdir/ChangeLog

%pre
%_sbindir/groupadd -r -f %lighttpd_group ||:
%_sbindir/useradd -r -g %lighttpd_group -d /dev/null -s /dev/null -n %lighttpd_user \
2> /dev/null > /dev/null ||:

%pre -n spawn-fcgi
%_sbindir/groupadd -r -f %spawn_fcgi_group ||:
%_sbindir/useradd -r -g %spawn_fcgi_group -d /dev/null -s /dev/null -n %spawn_fcgi_user \
       2> /dev/null > /dev/null ||:

%post
%post_service lighttpd

%preun
%preun_service lighttpd

%post -n spawn-fcgi
%post_service spawn-fcgi

%preun -n spawn-fcgi
%preun_service spawn-fcgi

%files
%doc README INSTALL COPYING AUTHORS
%_initdir/%name
%config(noreplace) %_sysconfdir/sysconfig/lighttpd
%config(noreplace) %attr(0750,root,%lighttpd_group) %_sysconfdir/%name
%config(noreplace) %_sysconfdir/logrotate.d/%name
%_man1dir/*
%exclude %_man1dir/spawn-fcgi*
%dir %attr(1770,root,%lighttpd_group) %lighttpd_spool
%dir %attr(1770,root,%lighttpd_group) %lighttpd_spool/tmp
%dir %attr(1770,root,%lighttpd_group) %_var/log/%name
%dir %_libdir/%name
%_libdir/%name/*.so
%if_with mysql
%exclude %_libdir/%name/*_mysql_vhost.so
%endif #mysql
%if_with lua
%exclude %_libdir/%name/*_cml.so
%endif #cml
%if_with memcache
%exclude %_libdir/%name/*_trigger_b4_dl.so
%endif #trigger_b4_dl
%exclude %_libdir/%name/*_rrdtool.so
%_sbindir/*
%_bindir/*
%exclude %_bindir/spawn-fcgi
%exclude %_libdir/%name/*.la

%files doc
%docdir

%files -n spawn-fcgi
%_bindir/spawn-fcgi
%_man1dir/spawn-fcgi*
%config(noreplace) %_sysconfdir/sysconfig/spawn-fcgi
%_initdir/spawn-fcgi
%dir %attr(1770,root,%spawn_fcgi_group) %_var/run/spawn-fcgi

%if_with mysql
%files mysql-vhost
%_libdir/%name/*mysql_vhost.so
%endif #mysql

%if_with lua
%files cml
%_libdir/%name/*cml.so
%endif lua

%if_with memcache
%files trigger_b4_dl
%_libdir/%name/*trigger_b4_dl.so
%endif #memcache

%files rrdtool
%_libdir/%name/*rrdtool.so

%changelog

Todas as alterações você pod ver aqui

 
projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009