File waitfor.spec of Package waitfor
# vim: set ts=4 sw=4 et:
# Copyright (c) 2012 Pascal Bleser <pascal.bleser@opensuse.org>
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
Name: waitfor
Version: 0.5
Release: 0
Summary: Waits until specified Network Resource is available or Event has occured
Source: http://www.hennessynet.com/waitfor/waitfor-%{version}.tar.gz
URL: http://www.hennessynet.com/waitfor/
Group: System/Monitoring
License: GPL-2.0
BuildRoot: %{_tmppath}/build-%{name}-%{version}
BuildRequires: make xmlto
BuildArch: noarch
Requires: python
%description
The waitfor utility will wait until a url is available, until a port is being
listened to, until an amount of time has passed or until a shell command
succeeds. It's very useful when you want to coordinate the startup or
shutdown of services.
%prep
%setup -q
%__sed -i 's|^#!/usr/bin/env python$|#!%__python|' waitfor
%build
%__make waitfor.1
%install
%__install -Dp -m0755 waitfor "%{buildroot}%{_bindir}/waitfor"
%__install -Dp -m0644 waitfor.1 "%{buildroot}%{_mandir}/man1/waitfor.1"
%clean
%{?buildroot:%__rm -rf "%{buildroot}"}
%files
%defattr(-,root,root)
%doc COPYING README
%{_bindir}/waitfor
%doc %{_mandir}/man1/waitfor.1*
%changelog