Группа :: Система/Серверы
Пакет: lighttpd
Главная Изменения Спек Патчи Загрузить Bugs and FR
%def_with mysql
%def_with ssl
%def_with ldap
%def_with memcache
%def_with lua
%def_with fam
%define lighttpd_user lighttpd
%define lighttpd_group lighttpd
%define lighttpd_spool %_spooldir/%name
%define docdir %_docdir/%name-%version-doc
Summary: A fast webserver with minimal memory-footprint (lighttpd)
Name: lighttpd
Version: 1.4.9
Release: alt0.M24.2
Patch: %name-1.4.3-config.patch
Source0: lighttpd-%version.tar.bz2
Source1: %name.init.d
Provides: webserver
License: BSD
Group: System/Servers
Url: http://www.lighttpd.net/
Packager: LAKostis <lakostis at altlinux.org>
# Automatically added by buildreq on Wed Nov 02 2005
BuildRequires: bzlib-devel gcc-c++ libfcgi-devel libpcre-devel libstdc++-devel perl-devel zlib-devel
Requires(pre): shadow-utils
%{?_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_fam:BuildPreReq: pkgconfig libfam-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: System/Servers
%description doc
Documentation for %name.
%prep
%setup -q
%patch -p1
%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_fam: --with-fam}
%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 %SOURCE1 %buildroot%_initdir/%name
%__install -m644 doc/sysconfig.lighttpd %buildroot%_sysconfdir/sysconfig/lighttpd
%__install -m644 doc/lighttpd.conf %buildroot%_sysconfdir/%name/%name.conf
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 ||:
%post
%post_service lighttpd
%preun
%preun_service lighttpd
%files
%doc README INSTALL COPYING AUTHORS
%_initdir/%name
%config(noreplace) %_sysconfdir/sysconfig/lighttpd
%config(noreplace) %attr(0750,root,%lighttpd_group) %_sysconfdir/%name
%_man1dir/*
%attr(0700,%lighttpd_user,%lighttpd_group) %lighttpd_spool
%attr(0700,%lighttpd_user,%lighttpd_group) %dir %_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/*
%files doc
%docdir
%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
…
Полный changelog можно просмотреть здесь
%def_with ssl
%def_with ldap
%def_with memcache
%def_with lua
%def_with fam
%define lighttpd_user lighttpd
%define lighttpd_group lighttpd
%define lighttpd_spool %_spooldir/%name
%define docdir %_docdir/%name-%version-doc
Summary: A fast webserver with minimal memory-footprint (lighttpd)
Name: lighttpd
Version: 1.4.9
Release: alt0.M24.2
Patch: %name-1.4.3-config.patch
Source0: lighttpd-%version.tar.bz2
Source1: %name.init.d
Provides: webserver
License: BSD
Group: System/Servers
Url: http://www.lighttpd.net/
Packager: LAKostis <lakostis at altlinux.org>
# Automatically added by buildreq on Wed Nov 02 2005
BuildRequires: bzlib-devel gcc-c++ libfcgi-devel libpcre-devel libstdc++-devel perl-devel zlib-devel
Requires(pre): shadow-utils
%{?_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_fam:BuildPreReq: pkgconfig libfam-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: System/Servers
%description doc
Documentation for %name.
%prep
%setup -q
%patch -p1
%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_fam: --with-fam}
%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 %SOURCE1 %buildroot%_initdir/%name
%__install -m644 doc/sysconfig.lighttpd %buildroot%_sysconfdir/sysconfig/lighttpd
%__install -m644 doc/lighttpd.conf %buildroot%_sysconfdir/%name/%name.conf
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 ||:
%post
%post_service lighttpd
%preun
%preun_service lighttpd
%files
%doc README INSTALL COPYING AUTHORS
%_initdir/%name
%config(noreplace) %_sysconfdir/sysconfig/lighttpd
%config(noreplace) %attr(0750,root,%lighttpd_group) %_sysconfdir/%name
%_man1dir/*
%attr(0700,%lighttpd_user,%lighttpd_group) %lighttpd_spool
%attr(0700,%lighttpd_user,%lighttpd_group) %dir %_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/*
%files doc
%docdir
%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
…
Полный changelog можно просмотреть здесь