summaryrefslogtreecommitdiff
path: root/dev-util/lockrun/lockrun-20240415.ebuild
diff options
context:
space:
mode:
Diffstat (limited to 'dev-util/lockrun/lockrun-20240415.ebuild')
-rw-r--r--dev-util/lockrun/lockrun-20240415.ebuild37
1 files changed, 37 insertions, 0 deletions
diff --git a/dev-util/lockrun/lockrun-20240415.ebuild b/dev-util/lockrun/lockrun-20240415.ebuild
new file mode 100644
index 000000000000..4c6a71c8ec22
--- /dev/null
+++ b/dev-util/lockrun/lockrun-20240415.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs
+
+DESCRIPTION="Run cronjobs with overrun protection"
+HOMEPAGE="http://www.unixwiz.net/tools/lockrun.html"
+
+SRC_URI="https://downloads.uls.co.za/gentoo/lockrun/lockrun-${PV}.c.gz"
+S="${WORKDIR}"
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~x86"
+
+src_prepare() {
+ default
+ mv "${P}.c" "${PN}.c" || die
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" ${PN}
+
+ # The below tries to extract the first comment block from the source code
+ # which represents the official "readme" from the project. Delete first
+ # three lines, then everything from (including) the first comment close at
+ # the beginning of a line before removing ' *' from the beginning of the
+ # remaining lines.
+ sed '1,3 d; /^[[:space:]]*[*]\//,$ d; s/^ \*//' "${PN}.c" > README || die
+}
+
+src_install() {
+ dobin ${PN}
+ einstalldocs
+}