summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2003-03-17 15:10:39 (GMT)
committerH. Peter Anvin <hpa@zytor.com>2003-03-17 15:10:39 (GMT)
commit65a64f0883745ae1b6776cbf4788dca7db9a366e (patch)
tree9d18dfa4bbd8af2fe9682d8e6f43bf41f51491af
downloadflock-65a64f0883745ae1b6776cbf4788dca7db9a366e.zip
flock-65a64f0883745ae1b6776cbf4788dca7db9a366e.tar.gz
flock-65a64f0883745ae1b6776cbf4788dca7db9a366e.tar.bz2
flock-65a64f0883745ae1b6776cbf4788dca7db9a366e.tar.xz
flock(1)
-rw-r--r--Makefile24
-rw-r--r--flock.spec38
2 files changed, 62 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..d726d70
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,24 @@
+CC = cc
+CFLAGS = -g -O
+LDFLAGS =
+INSTALL = install
+prefix = /usr/local
+BINDIR = $(prefix)/bin
+MANDIR = $(prefix)/man/man1
+
+all: flock
+
+flock: flock.c
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $<
+
+install:
+ mkdir -m 755 -p $(INSTALLROOT)$(BINDIR) $(INSTALLROOT)$(MANDIR)
+ $(INSTALL) -m 755 flock $(INSTALLROOT)$(BINDIR)
+ $(INSTALL) -m 644 flock.1 $(INSTALLROOT)$(MANDIR)
+
+clean:
+ rm -f flock
+
+distclean: clean
+ rm -f *~ \#*
+
diff --git a/flock.spec b/flock.spec
new file mode 100644
index 0000000..9386b27
--- /dev/null
+++ b/flock.spec
@@ -0,0 +1,38 @@
+Summary: A program to manage locks from shell scripts
+Name: flock
+Version: 1.0
+Release: 1
+License: MIT
+Group: Applications/System
+URL:
+Source0: ftp://ftp.kernel.org/pub/software/utils/script/%{name}-%{version}.tar.gz
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
+
+%description
+A small utility to manage locks from shell scripts. This is very
+useful in keeping automated tasks from stepping on each other.
+
+%prep
+%setup -q
+
+%build
+make
+
+%install
+rm -rf $RPM_BUILD_ROOT
+make install INSTALLDIR=$RPM_BUILD_ROOT
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(-,root,root,-)
+%doc /usr/man/man1/*
+/usr/bin/flock
+
+%doc
+
+
+%changelog
+* Mon Mar 17 2003 H. Peter Anvin <hpa@zytor.com>
+- Initial build.