Пакет trac-spawn-fcgi: Specfile

%def_without M24

%if_with M24
%define _release alt0.M24.1
%define _release alt1

Name: trac-spawn-fcgi
Version: 0.2
Release: %_release.qa1
Packager: Grigory Batalov <bga@altlinux.ru>

Summary: Trac FastCGI frontend spawn daemon
License: BSD
Group: Development/Other

# taken from lighttpd-1.4.13
Source0: spawn-fcgi-1.4.13.c
Source1: spawn-fcgi.copying

Source2: %name-0.1-alt-init
Source3: %name-0.1-alt-sysconfig

This package contains trac FastCGI frontend spawn daemon
for use with web server like nginx.

%setup -q -c -T
install -m644 %SOURCE0 %name.c
install -m644 %SOURCE1 COPYING.spawn-fcgi
cat << _EOF > sys-socket.h
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <sys/un.h>
#include <arpa/inet.h>

cc -g %optflags \
	-DPACKAGE_VERSION=\"1.4.10\" \
	-o %name %name.c

mkdir -p %buildroot{%_bindir,%_initdir,%_sysconfdir/sysconfig,%_var/run/%name}
install -m755 %name %buildroot%_bindir/%name
install -m755 %SOURCE2 %buildroot%_initdir/%name
install -m644 %SOURCE3 %buildroot%_sysconfdir/sysconfig/%name
touch %buildroot%_var/run/%name/%name.pid

%post_service %name

%preun_service %name

%doc COPYING.spawn-fcgi
%config(noreplace) %_sysconfdir/sysconfig/%name
%dir %_var/run/%name/
%ghost %_var/run/%name/%name.pid

* Mon Apr 15 2013 Dmitry V. Levin (QA) <qa_ldv@altlinux.org> 0.2-alt1.qa1
- NMU: rebuilt for debuginfo.

* Sun Mar 25 2007 Grigory Batalov <bga@altlinux.ru> 0.2-alt1
- Update spawn-fcgi.c to version 1.4.13.

* Tue Mar 14 2006 Grigory Batalov <bga@altlinux.ru> 0.1-alt1
- Initial build for ALT Linux