summaryrefslogtreecommitdiff
path: root/app-misc/lockfile-progs
diff options
context:
space:
mode:
Diffstat (limited to 'app-misc/lockfile-progs')
-rw-r--r--app-misc/lockfile-progs/Manifest4
-rw-r--r--app-misc/lockfile-progs/files/Makefile55
-rw-r--r--app-misc/lockfile-progs/lockfile-progs-0.1.17.ebuild34
-rw-r--r--app-misc/lockfile-progs/metadata.xml5
4 files changed, 98 insertions, 0 deletions
diff --git a/app-misc/lockfile-progs/Manifest b/app-misc/lockfile-progs/Manifest
new file mode 100644
index 000000000000..b1a96cf82571
--- /dev/null
+++ b/app-misc/lockfile-progs/Manifest
@@ -0,0 +1,4 @@
+AUX Makefile 1906 BLAKE2B 9c294471555a7dbe6d4342e8af7c744731c05ab22adc2192eb94da5e166c5a94705e328ca600055e722d8610869d20246fab741ef494f6e68d987c913e8054cb SHA512 c3ebd2f737fc664b37e235a0a68f50ebe80f00dbc522566520edb9827771344d022531c50283be5eaddd26d72295faae2676ef58838dd65797c74059719d826d
+DIST lockfile-progs_0.1.17.tar.gz 14833 BLAKE2B 3e67aee40a8700c330eb8dd1f9ae3973d50f733333825a3e176434586357e9bbb3db9d480f6a778d383c5dbaca03d3cde90291c7668e3b9bc425b93a0b53fa2b SHA512 9d912e1a518fe9c02054beb25c4591df6db55cc2fe9b7049fb85368465bd9ced9660bb0a809ee60a7effbdc6524613c40fa69d9d27fc2cfc964f41b7486c3596
+EBUILD lockfile-progs-0.1.17.ebuild 760 BLAKE2B 1369da0fa34669b7c4398c7cc7e0f861aea9809a340778bf43bebc92242ca524f15d0f39746b53fecbdd37a514f51375cc89c963687257a549ac9327cf8f8cea SHA512 3d1c74cf0fcd9727d8f527cde863c93f98b9c8c3d63209ef12edb0fc5991f2367cab26074b320c8e94ee6574592fff2a043fe5a2d461deb13bedeef0670ac63d
+MISC metadata.xml 167 BLAKE2B e4dadf27fd344484f2bccb5b904909c89aac568c32e5b3c44bdf139eacefd4b4fae74419f503d2b7da0dccc1b68ba05d777d11292c0f89270d1ac5c9c703e8ca SHA512 7c8decb24ee3a850e38186cf3c7f8933a28017426806870ad6ef9ceb2533be147a2681fc789b535a81cb528af8c29d90d3006e4f250aee23bd7dea4561294e33
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
diff --git a/app-misc/lockfile-progs/lockfile-progs-0.1.17.ebuild b/app-misc/lockfile-progs/lockfile-progs-0.1.17.ebuild
new file mode 100644
index 000000000000..2fb294180f22
--- /dev/null
+++ b/app-misc/lockfile-progs/lockfile-progs-0.1.17.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit toolchain-funcs
+
+DESCRIPTION="Programs to safely lock/unlock files and mailboxes"
+HOMEPAGE="https://packages.debian.org/sid/lockfile-progs"
+SRC_URI="mirror://debian/pool/main/l/${PN}/${PN}_${PV}.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="amd64 arm ~mips ppc ~s390 ~sh sparc x86"
+IUSE=""
+
+DEPEND="net-libs/liblockfile"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ # Provide better Makefile, with clear separation between compilation
+ # and installation.
+ cp "${FILESDIR}/Makefile" . || die
+}
+
+src_compile() {
+ tc-export CC
+ default
+}
+
+src_install() {
+ # Makefile has no notion of PREFIX, bindir, and the like
+ emake DESTDIR="${ED}" install
+}
diff --git a/app-misc/lockfile-progs/metadata.xml b/app-misc/lockfile-progs/metadata.xml
new file mode 100644
index 000000000000..7a38bb900964
--- /dev/null
+++ b/app-misc/lockfile-progs/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <!-- maintainer-needed -->
+</pkgmetadata>