summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2018-06-26 19:29:44 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2018-06-26 19:29:44 -0500
commit560fb0c0ef4e612ec8bc9cbb5e5b76bed0e1e5f3 (patch)
tree6722e33909df95b30a28a7465ca73b07e4704b5f
parentb71fe05dce49b3453b5b556be023b831344a62a8 (diff)
downloadpackages-560fb0c0ef4e612ec8bc9cbb5e5b76bed0e1e5f3.tar.gz
packages-560fb0c0ef4e612ec8bc9cbb5e5b76bed0e1e5f3.tar.bz2
packages-560fb0c0ef4e612ec8bc9cbb5e5b76bed0e1e5f3.tar.xz
packages-560fb0c0ef4e612ec8bc9cbb5e5b76bed0e1e5f3.zip
system/fcron: overhaul alpine package, add for POSIX
-rw-r--r--system/fcron/APKBUILD51
-rwxr-xr-xsystem/fcron/fcron.initd15
-rw-r--r--system/fcron/fcron.pre-install6
-rw-r--r--system/fcron/systab.orig5
4 files changed, 77 insertions, 0 deletions
diff --git a/system/fcron/APKBUILD b/system/fcron/APKBUILD
new file mode 100644
index 000000000..718ed33f8
--- /dev/null
+++ b/system/fcron/APKBUILD
@@ -0,0 +1,51 @@
+# Contributor: Diaz Devera Victor <vitronic2@gmail.com>
+# Maintainer: A. Wilcox <awilfox@adelielinux.org>
+pkgname=fcron
+pkgver=3.2.1
+pkgrel=0
+pkgdesc="periodical command scheduler for systems not always up"
+url="http://fcron.free.fr/"
+pkgusers="fcron"
+pkggroups="fcron"
+arch="all"
+options="suid !check" # No test suite.
+license="GPL"
+depends="cmd:sendmail"
+makedepends="perl"
+install="fcron.pre-install"
+subpackages="$pkgname-doc $pkgname-openrc"
+source="http://fcron.free.fr/archives/${pkgname}-${pkgver}.src.tar.gz
+ systab.orig
+ fcron.initd"
+
+build() {
+ cd "$builddir"
+ ./configure \
+ --build=$CBUILD \
+ --host=$CHOST \
+ --prefix=/usr \
+ --with-editor=/usr/bin/vim \
+ --with-spooldir=/var/spool/fcron \
+ --sysconfdir=/etc/fcron \
+ --with-answer-all=no \
+ --with-boot-install=no \
+ --localstatedir=/var \
+ --with-piddir=/run \
+ --with-selinux=no \
+ --with-systemdsystemunitdir=no
+ make
+}
+
+package() {
+ cd "$builddir"
+ make DESTDIR="$pkgdir/" install
+ install -Dm775 "$srcdir"/fcron.initd "$pkgdir"/etc/init.d/fcron
+ rm -r "$pkgdir"/var/run
+ install -Dm640 "$srcdir"/systab.orig "$pkgdir"/var/spool/fcron/systab.orig
+ install -Dm644 files/fcron.pam "$pkgdir"/etc/pam.d/fcron
+ install -Dm644 files/fcrontab.pam "$pkgdir"/etc/pam.d/fcrontab
+}
+
+sha512sums="ddfd3e3a297b843c924aacccffaa5c1c6b300497f39daa1cdb90dc4cf4bc757042b0b2c1f055c119c8128c64d830ee0e8757091610432f5ffcacca25d369e5cd fcron-3.2.1.src.tar.gz
+7516c9a51b1f6c29f1256c4697028b47f7883bf5fb08ccc585cf49e4edc7598a9730a225a03aaf3749698a94b9d01dda76cd3f352c0c868960fd09374df44199 systab.orig
+c5ea27dc7197c1a8d2e00372e3a6f38777c825c7913c320bc6fcc6d8d0e5cc7a11c7f5977d1ed1f05f4b7b55f2f8906fd960900107de6bec757b8b4045b1adaa fcron.initd"
diff --git a/system/fcron/fcron.initd b/system/fcron/fcron.initd
new file mode 100755
index 000000000..ff0aba09c
--- /dev/null
+++ b/system/fcron/fcron.initd
@@ -0,0 +1,15 @@
+#!/sbin/openrc-run
+
+# Initscript by Diaz Devera Victor <vitronic2@gmail.com>
+# Copyright 2014 Alpine Linux
+# Distributed under the terms of the GNU General Public License v2
+
+#name="advanced periodic command scheduler fcron"
+name="fcron"
+pidfile="/run/fcron"
+command=/usr/sbin/fcron
+
+depend() {
+ need localmount
+ need logger
+}
diff --git a/system/fcron/fcron.pre-install b/system/fcron/fcron.pre-install
new file mode 100644
index 000000000..b15879178
--- /dev/null
+++ b/system/fcron/fcron.pre-install
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+adduser -S -D -H -s /sbin/nologin -g fcron fcron 2>/dev/null
+addgroup -S fcron 2>/dev/null
+
+exit 0
diff --git a/system/fcron/systab.orig b/system/fcron/systab.orig
new file mode 100644
index 000000000..4041ccefe
--- /dev/null
+++ b/system/fcron/systab.orig
@@ -0,0 +1,5 @@
+&bootrun */15 * * * * /usr/bin/run-parts /etc/periodic/15min
+&bootrun 01 * * * * /usr/bin/run-parts /etc/periodic/hourly
+&bootrun 02 00 * * * /usr/bin/run-parts /etc/periodic/daily
+&bootrun 22 00 * * 0 /usr/bin/run-parts /etc/periodic/weekly
+&bootrun 42 00 1 * * /usr/bin/run-parts /etc/periodic/monthly