packages: withlock/withlock.spec (NEW) - new
glen
glen at pld-linux.org
Fri Sep 10 11:51:27 CEST 2010
Author: glen Date: Fri Sep 10 09:51:27 2010 GMT
Module: packages Tag: HEAD
---- Log message:
- new
---- Files affected:
packages/withlock:
withlock.spec (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: packages/withlock/withlock.spec
diff -u /dev/null packages/withlock/withlock.spec:1.1
--- /dev/null Fri Sep 10 11:51:27 2010
+++ packages/withlock/withlock.spec Fri Sep 10 11:51:22 2010
@@ -0,0 +1,49 @@
+# $Revision$, $Date$
+Summary: A locking wrapper script
+Name: withlock
+Version: 0.2
+Release: 1
+License: Apache v2.0
+Group: Applications
+Source0: http://%{name}.googlecode.com/svn/trunk/withlock
+# Source0-md5: e3854a5c3e97121cd6a7e498ca77fbd5
+URL: http://code.google.com/p/withlock/
+BuildRequires: rpm-pythonprov
+BuildRequires: sed >= 4.0
+BuildArch: noarch
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+withlock is a locking wrapper script to make sure that some program
+isn't run more than once. It is ideal to prevent periodic jobs spawned
+by cron from stacking up.
+
+The locks created are valid only while the wrapper is running, and
+thus will never require additional cleanup, even after a reboot. This
+makes the wrapper safe and easy to use, and much better than
+implementing half-hearted locking within scripts.
+
+%prep
+%setup -qcT
+%{__sed} -e '1s,^#!.*python,#!%{__python},' %{SOURCE0} > %{name}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT%{_bindir}
+install -p %{name} $RPM_BUILD_ROOT%{_bindir}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/withlock
+
+%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
+%changelog
+* %{date} PLD Team <feedback at pld-linux.org>
+All persons listed below can be reached at <cvs_login>@pld-linux.org
+
+$Log$
+Revision 1.1 2010/09/10 09:51:22 glen
+- new
================================================================
More information about the pld-cvs-commit
mailing list