]> git.pld-linux.org Git - packages/withlock.git/commitdiff
- new master
authorElan Ruusamäe <glen@pld-linux.org>
Fri, 10 Sep 2010 09:51:22 +0000 (09:51 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    withlock.spec -> 1.1

withlock.spec [new file with mode: 0644]

diff --git a/withlock.spec b/withlock.spec
new file mode 100644 (file)
index 0000000..2425d97
--- /dev/null
@@ -0,0 +1,39 @@
+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
This page took 0.859967 seconds and 4 git commands to generate.