aboutsummaryrefslogtreecommitdiffstats
path: root/extra/fetchmail
diff options
context:
space:
mode:
authorCarlo Lanmdeter <clandmeter@gmail>2009-03-05 14:48:30 +0000
committerCarlo Lanmdeter <clandmeter@gmail>2009-03-05 14:48:30 +0000
commitdf930dbd9fb00c1c381229a2c5ce68d82eaa53eb (patch)
treea90740e8ab2134ad00ecf6ae8b205ec9f7c4990f /extra/fetchmail
parent87f8eb8ec3fad06f3d1ab02fc4aa36e4143c3baa (diff)
parent739bdededdec7f411de9223fe440fc8141afe80b (diff)
downloadaports-df930dbd9fb00c1c381229a2c5ce68d82eaa53eb.tar.bz2
aports-df930dbd9fb00c1c381229a2c5ce68d82eaa53eb.tar.xz
Merge commit 'ncopa/master'
Diffstat (limited to 'extra/fetchmail')
-rw-r--r--extra/fetchmail/APKBUILD39
-rwxr-xr-xextra/fetchmail/fetchmail.initrd30
2 files changed, 69 insertions, 0 deletions
diff --git a/extra/fetchmail/APKBUILD b/extra/fetchmail/APKBUILD
new file mode 100644
index 0000000000..e04e23c349
--- /dev/null
+++ b/extra/fetchmail/APKBUILD
@@ -0,0 +1,39 @@
+# Contributor: Michael Mason <ms13sp@gmail.com>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+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="openssl-dev"
+install=
+subpackages="$pkgname-doc fetchmailconf"
+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 \
+ --with-ssl \
+ --disable-nls
+ make || return 1
+ make DESTDIR="$pkgdir" install
+ install -Dm755 $srcdir/fetchmail.initrd "$pkgdir"/etc/init.d/fetchmail
+}
+
+fetchmailconf() {
+ depends="python"
+ pkgdesc="A GUI for generating fetchmail configuration files"
+ mkdir -p "$subpkgdir"/usr/bin
+ cd "$pkgdir"
+ mv usr/bin/fetchmailconf "$subpkgdir"/usr/bin/
+ mv usr/lib "$subpkgdir"/usr/
+}
+
+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 0000000000..30eea50369
--- /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 ${?}
+}
+