mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-05-05 04:16:46 +02:00
testing/fcron: new aport
periodical command scheduler for systems not always up http://fcron.free.fr/
This commit is contained in:
parent
6b731eecdf
commit
a01b0ecdec
77
testing/fcron/APKBUILD
Normal file
77
testing/fcron/APKBUILD
Normal file
@ -0,0 +1,77 @@
|
||||
# Maintainer: Diaz Devera Victor <vitronic2@gmail.com>
|
||||
|
||||
pkgname=fcron
|
||||
pkgver=3.2.0
|
||||
pkgrel=0
|
||||
pkgdesc="periodical command scheduler for systems not always up"
|
||||
url="http://fcron.free.fr/"
|
||||
install="fcron.pre-install"
|
||||
options="suid"
|
||||
pkgusers="fcron"
|
||||
pkggroups="fcron"
|
||||
arch="all"
|
||||
license="GPL"
|
||||
depends=""
|
||||
makedepends="readline-dev"
|
||||
subpackages="$pkgname-pam $pkgname-doc"
|
||||
source="http://fcron.free.fr/archives/${pkgname}-${pkgver}.src.tar.gz
|
||||
systab.orig
|
||||
fcron.initd"
|
||||
|
||||
_builddir="$srcdir"/${pkgname}-${pkgver}
|
||||
|
||||
prepare() {
|
||||
cd "$_builddir"
|
||||
for i in $source; do
|
||||
case $i in
|
||||
*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "$_builddir"
|
||||
./configure --prefix=/usr \
|
||||
--with-editor=/usr/bin/vi \
|
||||
--with-spooldir=/var/spool/fcron \
|
||||
--sysconfdir=/etc/fcron \
|
||||
--with-answer-all=no \
|
||||
--with-boot-install=no \
|
||||
--localstatedir=/var \
|
||||
--with-piddir=/run \
|
||||
--with-sendmail=no \
|
||||
--with-selinux=no \
|
||||
--with-systemdsystemunitdir=no \
|
||||
|| return 1
|
||||
make || return 1
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$_builddir"
|
||||
make DESTDIR="$pkgdir/" install
|
||||
install -Dm775 ${srcdir}/fcron.initd ${pkgdir}/etc/init.d/fcron
|
||||
rm -r ${pkgdir}/var/run
|
||||
#for some reason it man/fr is not compressed, for that reason I erase
|
||||
rm -r ${pkgdir}/usr/share/man/fr
|
||||
install -Dm640 "${srcdir}/systab.orig" "${pkgdir}/var/spool/fcron/systab.orig"
|
||||
}
|
||||
|
||||
pam() {
|
||||
cd "$_builddir"
|
||||
arch="noarch"
|
||||
pkgdesc="PAM configuration file for fcron package."
|
||||
depends="fcron"
|
||||
mkdir $subpkgdir
|
||||
install -Dm644 files/fcron.pam "$subpkgdir/etc/pam.d/fcron"
|
||||
install -Dm644 files/fcrontab.pam "$subpkgdir/etc/pam.d/fcrontab"
|
||||
}
|
||||
|
||||
md5sums="4b031c2fba32a98fa814d1557158b0e9 fcron-3.2.0.src.tar.gz
|
||||
64ece6028dc5d552107ca536dc11395b systab.orig
|
||||
225694ccc395fc21956593fa47959064 fcron.initd"
|
||||
sha256sums="eb13b86ed96805d117e19847f1da30b834f1990f7ef4c38f5007234d44679564 fcron-3.2.0.src.tar.gz
|
||||
d341910feee898102c810dcc73dfce48884f1662d9b0dfe3c8c4ca8228c4a497 systab.orig
|
||||
ee83fd59107c6aad60c06c6b58d154697c17fc30686533fdf2a6269a577bef2d fcron.initd"
|
||||
sha512sums="97b200dfec02ca0aba76abf3cf71f54608fbadf46aa29d81d7316920fb1bebbba81d0118925f658cd9062f362b6075467c7f595e736b47616995a95958ae776b fcron-3.2.0.src.tar.gz
|
||||
7516c9a51b1f6c29f1256c4697028b47f7883bf5fb08ccc585cf49e4edc7598a9730a225a03aaf3749698a94b9d01dda76cd3f352c0c868960fd09374df44199 systab.orig
|
||||
070f8bbcbb3c5ccfed6bbe2ca85ef959426d58ee1615dcee4b0289f62fb7c151895da78fa63218e3bcc8428ed18acf7c591b09981171040f5dfada685dd9b1c1 fcron.initd"
|
||||
29
testing/fcron/fcron.initd
Executable file
29
testing/fcron/fcron.initd
Executable file
@ -0,0 +1,29 @@
|
||||
#!/sbin/runscript
|
||||
|
||||
# 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
|
||||
}
|
||||
|
||||
start() {
|
||||
ebegin "Starting $name"
|
||||
start-stop-daemon --start --exec ${command} \
|
||||
--pidfile "$pidfile.pid"
|
||||
eend $?
|
||||
}
|
||||
|
||||
stop() {
|
||||
ebegin "Stopping $name"
|
||||
start-stop-daemon --stop --exec ${command} \
|
||||
--pidfile "$pidfile.pid"
|
||||
eend $?
|
||||
}
|
||||
4
testing/fcron/fcron.pre-install
Normal file
4
testing/fcron/fcron.pre-install
Normal file
@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
adduser -S -D fcron -H -s /sbin/nologin 2>/dev/null
|
||||
addgroup -S fcron
|
||||
exit 0
|
||||
5
testing/fcron/systab.orig
Normal file
5
testing/fcron/systab.orig
Normal file
@ -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
|
||||
Loading…
x
Reference in New Issue
Block a user