Пакет mathopd: Specfile

Загрузка mathopd.spec
Name: mathopd
Version: 1.5p6
Release: alt1

Summary: Fast, lightweight, non-forking HTTP server for UN*X systems.
License: GPL
Group: System/Servers

Url: http://www.%name.org/

Source: %url/dist/%name-%version.tar.gz
Source1: %name.8.gz
Source2: %name.conf.5.gz
Source3: %name.init
Source4: %name.conf
Source5: %name.logrotate
Source6: %url/dist/dir_cgi.c.txt
Source7: %name.cron
Source9: TODO
Source10: %name.sysconfig

Patch: %name-1.5p5-alt-pidfile.patch
Patch1: %name-alt-dircgi.patch
Patch2: %name.getline.patch

#equires: logrotate
Requires: crontabs, gzip, findutils

%define mylogdir	%_logdir/%name
%define logrotate_dir	%_sysconfdir/logrotate.d
%define crondaily_dir   %_sysconfdir/cron.daily

Summary(ru_RU.KOI8-R): \xeb\xcf\xcd\xd0\xc1\xcb\xd4\xce\xd9\xca \xc2\xd9\xd3\xd4\xd2\xd9\xca HTTP-\xd3\xc5\xd2\xd7\xc5\xd2 \xc4\xcc\xd1 \xe0\xce\xc9\xcb\xd3-\xd3\xc9\xd3\xd4\xc5\xcd

Mathopd is a very small, yet very fast HTTP server for UN*X systems.

Mathopd supports useful features of HTTP/1.1, such as persistent connections,
partial responses and pipelining. It does not support things like content
negotation. The latest version of the software (1.5) also supports CGI/1.1.

Mathopd was designed specifically to run as a single process,
and to never grow in size. When this software was first written (early 1996)
this is something that other HTTP servers were not very good at.

For preventing conflicts with another HTTP-services Mathopd in ALTLinux
listens on port 8000 instead of standard port 80.

%description -l ru_RU.KOI8-R
Mathopd - \xdc\xd4\xcf \xcf\xde\xc5\xce\xd8 \xcb\xcf\xcd\xd0\xc1\xcb\xd4\xce\xd9\xca \xc9 \xc2\xd9\xd3\xd4\xd2\xd9\xca \xd3\xc5\xd2\xd7\xc5\xd2 HTTP \xc4\xcc\xd1 \xe0\xce\xc9\xcb\xd3-\xd3\xc9\xd3\xd4\xc5\xcd.

Mathopd \xd0\xcf\xc4\xc4\xc5\xd2\xd6\xc9\x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1\xce\xc9\xc0 Mathopd
\xd7 ALTLinux \xcf\xd6\xc9\xc4\xc1\xc5\xd4 \xd0\xcf\xc4\xcb\xcc\xc0\xde\xc5\xce\xc9\xca \xde\xc5\xd2\xc5\xda \xd0\xcf\xd2\xd4 8000 \xd7\xcd\xc5\xd3\xd4\xcf \xd3\xd4\xc1\xce\xc4\xc1\xd2\xd4\xce\xcf\xc7\xcf 80.

%setup -q
%patch0 -p1
%__cp -a %SOURCE6 ./dir_cgi.c
%patch2 -p2

%__cc -O3 -DFORMAT_V2=1 -o dir_cgi dir_cgi.c
cd src

%__mkdir -p %buildroot{%_bindir,%_sbindir,%_initdir,%_man5dir,%_man8dir,%mylogdir,%logrotate_dir,%crondaily_dir}

%makeinstall -C src SBINDIR=%buildroot%_sbindir PREFIX=%buildroot install
%__cp -a   %SOURCE1 %buildroot%_man8dir/
%__cp -a   %SOURCE2 %buildroot%_man5dir/
%__install %SOURCE3 %buildroot%_initdir/%name
%__cp -a   %SOURCE4 %buildroot%_sysconfdir/
%__cp -a   %SOURCE5 %buildroot%logrotate_dir/%name
%__install -p  %SOURCE7  %buildroot%crondaily_dir/%name
%__install -pD -m600 %SOURCE10 %buildroot%_sysconfdir/sysconfig/%name
%__install -p  dir_cgi   %buildroot%_bindir/
/bin/touch %buildroot%mylogdir/{errorlog,childlog}

%attr(0700,root,root) %_initdir/%name
%exclude %mylogdir/*log*
%attr(0750,%name,%name) %mylogdir
%ghost %mylogdir/*log*
%config(noreplace) %_sysconfdir/%name.conf
%config(noreplace) %_sysconfdir/sysconfig/%name
%exclude %logrotate_dir/%name

id -un %name >/dev/null 2>&1 || /usr/sbin/useradd -s /dev/null -d %mylogdir -r %name

%post_service %name

%preun_service %name
echo "NOTE: %name account still exist, remove it manually if you need"

* Wed Jul 01 2009 Denis Smirnov <mithraen@altlinux.ru> 1.5p6-alt1
- update to 1.5p6
- Mathopd can now (optionally) allow //, /./ and /../ in URL paths. Thanks for
  Peter Pentchev for suggesting this and providing initial patches.

* Tue Oct 31 2006 Ilya Evseev <evseev@altlinux.ru> 1.5p5-alt3
- improvements for dir_cgi: display dates and sizes

* Wed Oct 19 2005 Ilya Evseev <evseev@altlinux.ru> 1.5p5-alt2
- errorlog and childlog are now created with timestamp suffix
- use cron instead of logrotate for compressing/removing old logs
- minor specfile bugfixes:
   + enable 'noreplace' attribute for configuration file
   + dont try to create %name account if it already exists.
- improve service script:
   + support settings file in /etc/sysconfig,
   + support multiple daemon configurations,
   + try to fetch account name for service actions from daemon config.
- additional CGI-BIN executables/extensions in daemon configuration sample
- lot of bugfixes in specfile macros (missing docs, service uninstall, etc.)

* Wed Sep  7 2005 Ilya Evseev <evseev@altlinux.ru> 1.5p5-alt1
- updated to next version
- more definitive description, russian translation added
- added minimal configuration file for running directly after install
- include dir_cgi helper
- create log directory and logrotate script (see also TODO file)
- specfile changes:
   + create "mathopd" account
   + register/unregister service
   + simplified installation stage
- additional targets in service script: reload, drop, safestop, debug,
  based on http://www.mail-archive.com/mathopd@mathopd.org/msg00064.html
- bugfix: PID-file is now created before reducing privileges, not after

* Fri Feb 11 2005 Denis Smirnov <mithraen@altlinux.ru> 1.5p4-alt1
- version update
- initscript added

* Fri Mar 12 2004 Denis Smirnov <mithraen@altlinux.ru> 1.5p2-alt1
- build

## EOF ##