summaryrefslogtreecommitdiff
path: root/app-misc/lockfile-progs/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /app-misc/lockfile-progs/files
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'app-misc/lockfile-progs/files')
-rw-r--r--app-misc/lockfile-progs/files/Makefile55
1 files changed, 55 insertions, 0 deletions
diff --git a/app-misc/lockfile-progs/files/Makefile b/app-misc/lockfile-progs/files/Makefile
new file mode 100644
index 000000000000..27276b30f5da
--- /dev/null
+++ b/app-misc/lockfile-progs/files/Makefile
@@ -0,0 +1,55 @@
+all: lockfile-create
+
+lockfile-create: lockfile-progs.o
+ ${CC} -o $@ ${CFLAGS} ${LDFLAGS} $^ -llockfile
+
+install: all
+ install -d $(DESTDIR)/usr/bin
+
+ install --mode=755 lockfile-create $(DESTDIR)/usr/bin/lockfile-create
+ ln -s lockfile-create $(DESTDIR)/usr/bin/lockfile-remove
+ ln -s lockfile-create $(DESTDIR)/usr/bin/lockfile-touch
+ ln -s lockfile-create $(DESTDIR)/usr/bin/lockfile-check
+
+ install --mode=755 lockfile-create $(DESTDIR)/usr/bin/mail-lock
+ ln -s mail-lock $(DESTDIR)/usr/bin/mail-unlock
+ ln -s mail-unlock $(DESTDIR)/usr/bin/mail-touchlock
+
+ install -d $(DESTDIR)/usr/share/man/man1
+
+ install --mode=644 lockfile-progs.1 $(DESTDIR)/usr/share/man/man1
+ ln -s lockfile-progs.1 $(DESTDIR)/usr/share/man/man1/lockfile-create.1
+ ln -s lockfile-progs.1 $(DESTDIR)/usr/share/man/man1/lockfile-remove.1
+ ln -s lockfile-progs.1 $(DESTDIR)/usr/share/man/man1/lockfile-touch.1
+ ln -s lockfile-progs.1 $(DESTDIR)/usr/share/man/man1/lockfile-check.1
+
+ ln -s lockfile-progs.1 $(DESTDIR)/usr/share/man/man1/mail-lock.1
+ ln -s lockfile-progs.1 $(DESTDIR)/usr/share/man/man1/mail-unlock.1
+ ln -s lockfile-progs.1 $(DESTDIR)/usr/share/man/man1/mail-touchlock.1
+
+test: all
+ ln -s lockfile-create ./lockfile-remove
+ ln -s lockfile-create ./lockfile-touch
+ ln -s lockfile-create ./lockfile-check
+
+ ./lockfile-create testfile
+ ./lockfile-check testfile
+ ./lockfile-touch --oneshot testfile
+ ./lockfile-check testfile
+ ./lockfile-remove testfile
+ ! test -e testfile
+ ! ./lockfile-check testfile
+
+ ./lockfile-create --lock-name test.lock
+ ./lockfile-check --lock-name test.lock
+ ! ./lockfile-check test.lock
+ ! test -e test.lock.lock
+ ./lockfile-touch --oneshot --lock-name test.lock
+ ./lockfile-check --lock-name test.lock
+ ! ./lockfile-check test.lock
+ ./lockfile-remove --lock-name test.lock
+ ! test -e test.lock
+ ! ./lockfile-check --lock-name test.lock
+ ! ./lockfile-check test.lock
+
+.PHONY: install test