summaryrefslogtreecommitdiffstats
path: root/extra/fetchmail
diff options
context:
space:
mode:
authorMichael Mason <ms13sp@gmail.com>2009-02-26 22:31:58 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-02-27 07:19:42 +0000
commit3eb1befcd88fe9c7c39a43e77ab108726f340f46 (patch)
treec8949a0a45bac7f4d7a8b3c6433c2e00fa657929 /extra/fetchmail
parent068beeae0ca51eb4216244e4008054be48d7dbce (diff)
downloadaports-3eb1befcd88fe9c7c39a43e77ab108726f340f46.tar.bz2
aports-3eb1befcd88fe9c7c39a43e77ab108726f340f46.tar.xz
extra/fetchmail Initial Commit
Diffstat (limited to 'extra/fetchmail')
-rw-r--r--extra/fetchmail/APKBUILD29
-rwxr-xr-xextra/fetchmail/fetchmail.initrd30
2 files changed, 59 insertions, 0 deletions
diff --git a/extra/fetchmail/APKBUILD b/extra/fetchmail/APKBUILD
new file mode 100644
index 00000000..d209ead5
--- /dev/null
+++ b/extra/fetchmail/APKBUILD
@@ -0,0 +1,29 @@
+# Contributor:
+# Maintainer:
+pkgname=fetchmail
+pkgver=6.3.9
+pkgrel=0
+pkgdesc="A remote-mail retrieval and forwarding utility"
+url="http://fetchmail.berlios.de/"
+license="GPL"
+depends="openssl uclibc"
+makedepends=""
+install=
+subpackages="$pkgname-doc"
+source="http://download.berlios.de/fetchmail/$pkgname-$pkgver.tar.bz2
+ fetchmail.initrd"
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --disable-nls
+ make || return 1
+ make DESTDIR="$pkgdir" install
+ install -Dm755 $srcdir/fetchmail.initrd "$pkgdir"/etc/init.d/fetchmail
+}
+
+md5sums="72c20ad2b9629f1a109668b05a84d823 fetchmail-6.3.9.tar.bz2
+b6b95767279d77c98acdc3aa4d00ec89 fetchmail.initrd"
diff --git a/extra/fetchmail/fetchmail.initrd b/extra/fetchmail/fetchmail.initrd
new file mode 100755
index 00000000..30eea503
--- /dev/null
+++ b/extra/fetchmail/fetchmail.initrd
@@ -0,0 +1,30 @@
+#!/sbin/runscript
+
+depend() {
+ need net
+ use mta
+}
+
+checkconfig() {
+ if [ ! -f /etc/fetchmailrc ]; then
+ eerror "Configuration file /etc/fetchmailrc not found"
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+
+ ebegin "Starting fetchmail"
+ start-stop-daemon --start --quiet --exec /usr/bin/fetchmail \
+ --chuid ${USER:-fetchmail}:${GROUP:-fetchmail} \
+ -- -d ${polling_period} -f /etc/fetchmailrc
+ eend ${?}
+}
+
+stop() {
+ ebegin "Stopping fetchmail"
+ start-stop-daemon --stop --quiet --pidfile /var/run/fetchmail.pid
+ eend ${?}
+}
+