summaryrefslogtreecommitdiff
path: root/community-staging
diff options
context:
space:
mode:
Diffstat (limited to 'community-staging')
-rw-r--r--community-staging/fcron/PKGBUILD80
-rw-r--r--community-staging/fcron/fcron.rc36
-rw-r--r--community-staging/fcron/fcron.service10
-rw-r--r--community-staging/fcron/run-cron14
-rw-r--r--community-staging/fcron/systabbin0 -> 478 bytes
-rw-r--r--community-staging/fcron/systab.orig4
-rw-r--r--community-staging/polipo/PKGBUILD55
-rw-r--r--community-staging/polipo/polipo.conf.d4
-rw-r--r--community-staging/polipo/polipo.cron2
-rw-r--r--community-staging/polipo/polipo.install25
-rw-r--r--community-staging/polipo/polipo.rc.d71
-rw-r--r--community-staging/polipo/polipo.service10
12 files changed, 311 insertions, 0 deletions
diff --git a/community-staging/fcron/PKGBUILD b/community-staging/fcron/PKGBUILD
new file mode 100644
index 000000000..0785774f7
--- /dev/null
+++ b/community-staging/fcron/PKGBUILD
@@ -0,0 +1,80 @@
+# $Id: PKGBUILD 72351 2012-06-12 20:43:12Z ttopper $
+# Contributor: Giorgio Lando <lando at imap dot cc>
+# Contributor: Sergej Pupykin
+# Contributor: Thomas Bächler
+# Maintainer: Thorsten Töpper <atsutane-tu@freethoughts.de>
+
+pkgname=fcron
+pkgver=3.0.6
+pkgrel=7
+pkgdesc="feature-rich cron implementation"
+arch=(i686 x86_64)
+url="http://fcron.free.fr"
+license=('GPL')
+depends=('pam')
+makedepends=('smtp-server')
+optdepends=('smtp-server: to receive mails from cron jobs')
+provides=('cron')
+conflicts=('dcron')
+backup=(etc/fcron/fcron.conf etc/fcron/fcron.allow etc/fcron/fcron.deny \
+ var/spool/fcron/systab var/spool/fcron/systab.orig)
+options=('emptydirs' '!makeflags')
+source=(http://fcron.free.fr/archives/$pkgname-$pkgver.src.tar.gz fcron.rc \
+ systab systab.orig run-cron fcron.service)
+md5sums=('69ebcb41921e2a282f41ebecb3a27053'
+ 'e0c3f0bdc3c98fbbe46eff19001c18f2'
+ '938722c6654ef7b07f4aa10001905ba1'
+ 'bfb7daa22ebe22b9917e455c1ca4a382'
+ '5ff0cdcb9ec99778938ac6ef26800327'
+ 'ab589cc6813ec32b5e96bf05c2b51c4c')
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc/fcron \
+ --with-answer-all=no \
+ --with-boot-install=no \
+ --with-username=root \
+ --with-groupname=root \
+ --datarootdir=/usr/share \
+ --datadir=/usr/share \
+ --with-docdir=/usr/share/doc \
+ --localstatedir=/var \
+ --with-editor=/usr/bin/vi \
+ --with-sendmail=/usr/sbin/sendmail
+ make
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ make DESTDIR="$pkgdir/" install
+ install -D -m755 "$srcdir/fcron.rc" "$pkgdir/etc/rc.d/fcron"
+ install -D -m644 "$srcdir/$pkgname-$pkgver/files/fcron.pam" "$pkgdir/etc/pam.d/fcron"
+
+ install -D -m644 "$srcdir/$pkgname-$pkgver/files/fcrontab.pam" "$pkgdir/etc/pam.d/fcrontab"
+ # Install default fcrontab so that fcron can completely replace dcron
+
+ install -D -m600 "$srcdir/systab" "$pkgdir/var/spool/fcron/systab"
+ # In order to preserve the systab crontab in any case it is better to have
+ # it in non-binary form too
+ install -D -m600 "$srcdir/systab.orig" "$pkgdir/var/spool/fcron/systab.orig"
+
+ # Add cron.* directories
+ install -d -m755 "$pkgdir/etc/cron.daily"
+ install -d -m755 "$pkgdir/etc/cron.hourly"
+ install -d -m755 "$pkgdir/etc/cron.monthly"
+ install -d -m755 "$pkgdir/etc/cron.weekly"
+
+ # Install run-cron script to make fcron run without dcron
+ install -D -m755 "$srcdir/run-cron" "$pkgdir/usr/sbin/run-cron"
+
+ # Install systemd service
+ install -D -m644 "$srcdir/fcron.service" \
+ "$pkgdir/usr/lib/systemd/system/fcron.service"
+
+ # avoid conflict with filesystem>=2012.06
+ rmdir "$pkgdir/var/run"
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/community-staging/fcron/fcron.rc b/community-staging/fcron/fcron.rc
new file mode 100644
index 000000000..880439a1d
--- /dev/null
+++ b/community-staging/fcron/fcron.rc
@@ -0,0 +1,36 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+PID=`pidof -o %PPID /usr/sbin/fcron`
+case "$1" in
+ start)
+ stat_busy "Starting Fcron Daemon"
+ [ -z "$PID" ] && /usr/sbin/fcron -b
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon fcron
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping Fcron Daemon"
+ [ -n "$PID" ] && kill $PID >/dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon fcron
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0
diff --git a/community-staging/fcron/fcron.service b/community-staging/fcron/fcron.service
new file mode 100644
index 000000000..a47b4f19b
--- /dev/null
+++ b/community-staging/fcron/fcron.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Cron Daemon
+
+[Service]
+Type=forking
+PIDFile=/run/fcron.pid
+ExecStart=/usr/sbin/fcron
+
+[Install]
+WantedBy=multi-user.target
diff --git a/community-staging/fcron/run-cron b/community-staging/fcron/run-cron
new file mode 100644
index 000000000..51007a15a
--- /dev/null
+++ b/community-staging/fcron/run-cron
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+
+if [ -z $1 ]; then
+ echo "Usage: $0 crondir"
+ exit 1
+fi
+
+for cron in $1/* ; do
+ if [ -x $cron ]; then
+ $cron
+ fi
+done
+unset cron
diff --git a/community-staging/fcron/systab b/community-staging/fcron/systab
new file mode 100644
index 000000000..11c7e2fd0
--- /dev/null
+++ b/community-staging/fcron/systab
Binary files differ
diff --git a/community-staging/fcron/systab.orig b/community-staging/fcron/systab.orig
new file mode 100644
index 000000000..5b0045626
--- /dev/null
+++ b/community-staging/fcron/systab.orig
@@ -0,0 +1,4 @@
+&bootrun 01 * * * * /usr/sbin/run-cron /etc/cron.hourly
+&bootrun 02 00 * * * /usr/sbin/run-cron /etc/cron.daily
+&bootrun 22 00 * * 0 /usr/sbin/run-cron /etc/cron.weekly
+&bootrun 42 00 1 * * /usr/sbin/run-cron /etc/cron.monthly
diff --git a/community-staging/polipo/PKGBUILD b/community-staging/polipo/PKGBUILD
new file mode 100644
index 000000000..558d0eacc
--- /dev/null
+++ b/community-staging/polipo/PKGBUILD
@@ -0,0 +1,55 @@
+# $Id: PKGBUILD 72349 2012-06-12 20:25:00Z ttopper $
+# Maintainer: Thorsten Töpper <atsutane-tu@freethoughts.de>
+# Contributor: Jelle van der Waa <jelle vdwaa nl>
+# Contributor: Thomas Holmquist <thomas@vorget.com>
+# Contributor: Jan Boehringer <ja(a)bm-boehringer.de>
+# Contributor: Alex Griffin <griffin.aj(a)gmail.com>
+
+pkgname=polipo
+pkgver=1.0.4.1
+pkgrel=3
+pkgdesc="A small and fast caching web proxy."
+arch=('i686' 'x86_64')
+url="http://www.pps.jussieu.fr/~jch/software/polipo/"
+license=('GPL')
+depends=('bash')
+makedepends=('texinfo')
+install=polipo.install
+source=("http://freehaven.net/~chrisd/polipo/polipo-$pkgver.tar.gz"
+ "polipo.cron" "polipo.rc.d" "polipo.conf.d" "polipo.service")
+md5sums=('bfc5c85289519658280e093a270d6703'
+ 'bac0e1a871964c931eb5f7a369b3243c'
+ '8f096b7d77a71e0772ce71a8c8b1b3e3'
+ '685aa0c6070dee11c701932d23afcc6a'
+ '109d0e8c15d669281ff14f8991ad0ed8')
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ make
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+ make PREFIX="$pkgdir/usr" \
+ MANDIR="$pkgdir/usr/share/man" \
+ INFODIR="$pkgdir/usr/share/info" \
+ LOCAL_ROOT="$pkgdir/usr/share/polipo/www" \
+ DISK_CACHE_ROOT="$pkgdir/var/cache/polipo" \
+ install
+
+
+ # install config files
+ install -Dm 644 config.sample $pkgdir/etc/polipo/config.sample
+ install -Dm 644 forbidden.sample $pkgdir/etc/polipo/forbidden.sample
+
+ # install license
+ install -Dm644 COPYING $pkgdir/usr/share/licenses/polipo/LICENSE
+
+ # install daemon scripts / cron
+ install -Dm 755 $srcdir/polipo.rc.d $pkgdir/etc/rc.d/polipo
+ install -Dm 755 $srcdir/polipo.cron $pkgdir/usr/share/polipo/polipo.cron
+ install -Dm 644 $srcdir/polipo.service $pkgdir/usr/lib/systemd/system/polipo.service
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/community-staging/polipo/polipo.conf.d b/community-staging/polipo/polipo.conf.d
new file mode 100644
index 000000000..dc879d32b
--- /dev/null
+++ b/community-staging/polipo/polipo.conf.d
@@ -0,0 +1,4 @@
+#
+# Parameters to be passed to polipo
+#
+POLIPO_ARGS="daemonise=true logFile=\"/var/log/polipo.log\""
diff --git a/community-staging/polipo/polipo.cron b/community-staging/polipo/polipo.cron
new file mode 100644
index 000000000..8270d0a05
--- /dev/null
+++ b/community-staging/polipo/polipo.cron
@@ -0,0 +1,2 @@
+#!/bin/bash
+/etc/rc.d/polipo purge >/dev/null 2>&1
diff --git a/community-staging/polipo/polipo.install b/community-staging/polipo/polipo.install
new file mode 100644
index 000000000..bacc46377
--- /dev/null
+++ b/community-staging/polipo/polipo.install
@@ -0,0 +1,25 @@
+infodir=/usr/share/info
+filelist=(polipo.info)
+
+post_install() {
+ [ -x usr/bin/install-info ] || return 0
+ for file in ${filelist[@]}; do
+ install-info $infodir/$file $infodir/dir 2> /dev/null
+ done
+ install -d /var/cache/polipo 2> /dev/null
+ touch /var/log/polipo.log 2> /dev/null
+ chown -R nobody:nobody /var/cache/polipo /var/log/polipo.log 2> /dev/null
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+pre_remove() {
+ [ -x usr/bin/install-info ] || return 0
+ for file in ${filelist[@]}; do
+ install-info --delete $infodir/$file $infodir/dir 2> /dev/null
+ done
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/community-staging/polipo/polipo.rc.d b/community-staging/polipo/polipo.rc.d
new file mode 100644
index 000000000..260fab050
--- /dev/null
+++ b/community-staging/polipo/polipo.rc.d
@@ -0,0 +1,71 @@
+#!/bin/bash
+
+daemon_name=polipo
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+. /etc/conf.d/$daemon_name.conf
+
+get_pid() {
+ pidof -o %PPID $daemon_name
+}
+
+case "$1" in
+ start)
+ stat_busy "Starting $daemon_name daemon"
+
+ PID=$(get_pid)
+ if [[ -z $PID ]]; then
+ [[ -f /run/$daemon_name.pid ]] &&
+ rm -f /run/$daemon_name.pid
+ # RUN
+ sudo -u nobody /usr/bin/$daemon_name ${POLIPO_ARGS}
+ #
+ if [[ $? -gt 0 ]]; then
+ stat_fail
+ exit 1
+ else
+ echo $(get_pid) > /run/$daemon_name.pid
+ add_daemon $daemon_name
+ stat_done
+ fi
+ else
+ stat_fail
+ exit 1
+ fi
+ ;;
+
+ stop)
+ stat_busy "Stopping $daemon_name daemon"
+ PID=$(get_pid)
+ # KILL
+ [[ -n $PID ]] && kill $PID &> /dev/null
+ #
+ if [[ $? -gt 0 ]]; then
+ stat_fail
+ exit 1
+ else
+ rm -f /run/$daemon_name.pid &> /dev/null
+ rm_daemon $daemon_name
+ stat_done
+ fi
+ ;;
+
+ restart)
+ $0 stop
+ sleep 3
+ $0 start
+ ;;
+
+ status)
+ stat_busy "Checking $daemon_name status";
+ ck_status $daemon_name
+ ;;
+
+ *)
+ echo "usage: $0 {start|stop|restart|status}"
+esac
+
+exit 0
+
+# vim:set ts=2 sw=2 et:
diff --git a/community-staging/polipo/polipo.service b/community-staging/polipo/polipo.service
new file mode 100644
index 000000000..a1bdd9aa2
--- /dev/null
+++ b/community-staging/polipo/polipo.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Polipo Proxy Server
+
+[Service]
+ExecStart=/usr/bin/polipo
+User=nobody
+ExecReload=/bin/kill -USR1 $MAINPID
+
+[Install]
+WantedBy=multi-user.target