/[packages]/updates/infra_5/withlock/pristine/SPECS/withlock.spec
ViewVC logotype

Contents of /updates/infra_5/withlock/pristine/SPECS/withlock.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1011193 - (show annotations) (download)
Mon May 9 08:24:46 2016 UTC (7 years, 11 months ago) by doktor5000
File size: 1351 byte(s)
- backport to infra_5 for openqa
1 Name: withlock
2 Version: 0.4
3 Release: %mkrel 1
4 Summary: Locking wrapper script
5 Group: System/Base
6 License: ASL 2.0
7 URL: https://github.com/poeml/withlock
8 Source0: http://mirrorbrain.org/files/releases/%{name}-%{version}.tar.gz
9 # Use /usr/bin/python2 not /usr/bin/python, it's not agnostic
10 Patch0: withlock-0.4-mga-python2.patch
11 BuildArch: noarch
12 # (doktor5000) required for manpage formatting
13 BuildRequires: ruby-ronn
14 Requires: python(abi) < 3.0
15
16 %description
17 withlock is a locking wrapper script to make sure that some program
18 isn't run more than once. It is ideal to prevent periodic jobs spawned
19 by cron from stacking up.
20
21 The locks created are valid only while the wrapper is running, and
22 thus will never require additional cleanup, even after a reboot. This
23 makes the wrapper safe and easy to use, and much better than
24 implementing half-hearted locking within scripts.
25
26 %prep
27 %setup -q
28 %patch0 -p1
29
30 # (doktor5000) fix prefix to point to %%prefix and not /usr/local
31 sed -i 's|/usr/local|%{_prefix}|g' Makefile
32
33 %build
34 # No build
35
36 %install
37 %make_install
38
39 # (doktor5000) remove doc files, use %%doc macro to install them
40 rm -rf %buildroot/%_defaultdocdir/packages
41
42 %files
43 %doc LICENSE-2.0.txt README.md withlock.1.html
44 %{_bindir}/withlock
45 %{_mandir}/man1/%{name}.*

  ViewVC Help
Powered by ViewVC 1.1.30