Sophie

Sophie

distrib > Mandriva > 10.2 > x86_64 > by-pkgid > 452966d4fdd3c513be776c6365aafc09 > files > 2

htp-0.4.6-1mdk.src.rpm

%define name	htp
%define version	0.4.6
%define release	1mdk

Summary:	HTTP Time Protocol client/server suite
Name:		%{name}
Version:	%{version}
Release:	%{release}
License:	GPL
Group:		System/Servers
URL:		http://www.clevervest.com/htp/
Source0:	%{name}-%{version}.tar.bz2
Source1:	htpd.init.bz2
BuildRequires:	libconfig-devel
BuildRoot:	%{_tmppath}/%{name}-%{version}-buildroot

%description
htpdate - HTTP Time Protocol client

sets the system clock using the using "HTP" (the HTTP Time
Protocol) from remote web servers. Query the webserver specified
by to update the time. Many hosts may be specified,but atleast one
is required. The parameter can be in the format of hostname:port.

%package	client
Summary:	HTTP Time Protocol client
Group:		System/Servers

%description	client
htpdate - HTTP Time Protocol client

sets the system clock using the using "HTP" (the HTTP Time
Protocol) from remote web servers. Query the webserver specified
by to update the time. Many hosts may be specified,but atleast one
is required. The parameter can be in the format of hostname:port.

%package	server
Summary:	HTTP Time Protocol daemon
Group:		System/Servers
PreReq:		rpm-helper
Requires:	%{name}-client

%description	server
htpd is a daemon that manages the time using "HTP" (the HTTP Time
Protocol) to set the system clock periodically from remote web
servers.

%prep

%setup -q -n %{name}-%{version}

bzcat %{SOURCE1} > htpd-real.init

# fix pidfile location
perl -pi -e "s|\"-DHTPD_PIDFILE=.*|-DHTPD_PIDFILE=\\\\\"%{_var}/run/htpd/htpd.pid\\\\\"|g" Makefile.in

%build

%configure2_5x

%make

%install
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}

# don't fiddle with the initscript!
export DONT_GPRINTIFY=1

%makeinstall

install -d %{buildroot}%{_initrddir}
install -d %{buildroot}%{_sbindir}
install -d %{buildroot}%{_var}/run/htpd
install -m0755 htpd-real.init %{buildroot}%{_initrddir}/htpd

# move the daemon in place
mv %{buildroot}%{_bindir}/htpd %{buildroot}%{_sbindir}/htpd

%post server
%_post_service htpd

%preun server
%_preun_service htpd

%clean
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}

%files client
%defattr(-,root,root)
%doc PLATFORMS README htp.pdf
%attr(0755,root,root) %{_bindir}/htpdate
%{_mandir}/man8/htpdate.*

%files server
%defattr(-,root,root)
%config(noreplace) %attr(0755,root,root) %{_initrddir}/htpd
%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/htpd.conf
%attr(0755,root,root) %{_sbindir}/htpd
%dir %attr(0755,root,root) %{_var}/run/htpd
%{_mandir}/man5/*
%{_mandir}/man8/htpd.*

%changelog
* Fri Jan 07 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 0.4.6-1mdk
- 0.4.6
- drop P0 and use the %%makeinstall macro instead
- fix daemon and pidfile location (also in S1)

* Mon Nov 08 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 0.3.4-1mdk
- initial mandrake package