initial import

This commit is contained in:
2025-06-22 20:39:04 -05:00
commit f8a70886f0
3428 changed files with 302546 additions and 0 deletions

56
fetchmail/PKGBUILD Normal file
View File

@@ -0,0 +1,56 @@
# Maintainer: Jesus E. <heckyel@riseup.net>
pkgname=fetchmail
pkgver=6.4.16
_debver=$pkgver
_debrel=4
pkgrel=2
pkgdesc='A remote-mail retrieval utility'
arch=('i686' 'x86_64')
url='https://www.fetchmail.info'
license=('custom:GPL-2+OpenSSL-Linking-Exception')
depends=('libressl')
makedepends=('quilt')
backup=('etc/conf.d/fetchmail')
options=('!makeflags')
install=fetchmail.install
source=("https://deb.debian.org/debian/pool/main/f/fetchmail/fetchmail_${pkgver}.orig.tar.xz"
"https://deb.debian.org/debian/pool/main/f/fetchmail/fetchmail_${_debver}-${_debrel}+deb11u1.debian.tar.xz"
"$pkgname.initd"
"$pkgname.confd")
sha512sums=('5e0d87739d73991c56111222cd84d6e16913b205c4d427feeb9b03d7f330442851f48769e168883ad75afc0a9db9b5267d1ad30e2ca0efe14263befd625dccf0'
'7079cd3782a01490ec8f8aca2ccfb380c4a36c429b044eae847eba89e00e260e139e10e061cadbbff26691813bec31b22fdb26026d1b2cdf9d1f0615ae7ddccd'
'571d7b42414256fab4fbf14ca89c9bc4d3a76ecfe476e8db802ffad7cee39b6969fe834ee9d4b9aae34a538bda089392eab6f841bddd09bff440c0f276b01de7'
'4dacd025d76a22c991c6dabe7c3d5b33b49348e83534d4de300a1b0d55a62dc0195e19065cb0a3a5da72f50700e7b92d4579be795a899f680e2a8be7dd508532')
prepare() {
cd ${pkgname}-${pkgver}
if [[ ${pkgver%.*} = ${_debver%.*} ]]; then
# Debian patches
export QUILT_PATCHES=debian/patches
export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index'
export QUILT_DIFF_ARGS='--no-timestamps'
mv "$srcdir"/debian .
quilt push -av
fi
}
build() {
cd ${pkgname}-${pkgver}
./configure --prefix=/usr --with-ssl=/usr
make
}
package() {
cd ${pkgname}-${pkgver}
make DESTDIR="${pkgdir}" install
rm "${pkgdir}/usr/bin/fetchmailconf"
install -Dm644 COPYING -t "${pkgdir}/usr/share/licenses/$pkgname"
install -Dm644 "${srcdir}/$pkgname.confd" "${pkgdir}/etc/conf.d/$pkgname"
install -Dm755 "${srcdir}/$pkgname.initd" "${pkgdir}/etc/init.d/$pkgname"
install -d -o 90 -g nobody "${pkgdir}/var/lib/$pkgname"
}

View File

@@ -0,0 +1,9 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# Polling frequency in seconds
# (fetchmail will daemonize and check for new mail at this interval)
polling_period="60"
# Directory where the pid file is kept
pid_dir="/var/run/fetchmail"

43
fetchmail/fetchmail.initd Normal file
View File

@@ -0,0 +1,43 @@
#!/sbin/openrc-run
piddir=${pid_dir:-/var/run/fetchmail}
pid_file=${piddir}/${RC_SVCNAME}.pid
rcfile=/etc/${RC_SVCNAME}rc
depend() {
need net
use mta
}
checkconfig() {
if [ ! -f ${rcfile} ]; then
eerror "Configuration file ${rcfile} not found"
return 1
fi
local fetchmail_instance
fetchmail_instance=${RC_SVCNAME##*.}
if [ -n "${fetchmail_instance}" -a "${RC_SVCNAME}" != "fetchmail" ]; then
fidfile=/var/lib/fetchmail/.fetchids.${RC_SVCNAME}
else
fidfile=/var/lib/fetchmail/.fetchids
fi
if [ ! -d ${piddir} ]; then
checkpath -q -d -o fetchmail:fetchmail -m 0755 ${piddir} || return 1
fi
}
start() {
checkconfig || return 1
ebegin "Starting ${RC_SVCNAME}"
start-stop-daemon --start --pidfile ${pid_file} \
--user fetchmail --exec /usr/bin/fetchmail \
-- -d ${polling_period} -f ${rcfile} \
--pidfile ${pid_file} -i ${fidfile}
eend ${?}
}
stop() {
ebegin "Stopping ${RC_SVCNAME}"
start-stop-daemon --stop --quiet --pidfile ${pid_file}
eend ${?}
}

View File

@@ -0,0 +1,43 @@
post_install() {
# /etc/fetchmail must be owned by fetchmail for service to work.
echo "If you run fetchmail as a service and not a cron job"
echo "then 'chown fetchmail /etc/fetchmailrc'"
if ! getent group fetchmail &>/dev/null; then
groupadd -r fetchmail >/dev/null
fi
if ! getent passwd fetchmail &>/dev/null; then
useradd -r -u 90 -g fetchmail -d /dev/null -s /bin/nologin -c "Fetchmail" fetchmail >/dev/null
fi
fetchmail_shell=$(getent passwd fetchmail | cut -d: -f7)
if [ "$fetchmail_shell" != '/bin/nologin' ]; then
chsh -s /bin/nologin fetchmail &>/dev/null
fi
}
post_upgrade() {
if ! getent group fetchmail &>/dev/null; then
groupadd -r fetchmail >/dev/null
fi
if ! getent passwd fetchmail &>/dev/null; then
useradd -r -u 90 -g fetchmail -d /dev/null -s /bin/nologin -c "Fetchmail" fetchmail >/dev/null
fi
if [ "$(vercmp $2 6.3.19-3)" -lt 0 ] ; then
usermod -d '/var/lib/fetchmail' -s /bin/nologin fetchmail
fi
fetchmail_shell=$(getent passwd fetchmail | cut -d: -f7)
if [ "$fetchmail_shell" != '/bin/nologin' ]; then
chsh -s /bin/nologin fetchmail &>/dev/null
fi
}
pre_remove() {
if getent passwd fetchmail &>/dev/null; then
userdel fetchmail >/dev/null
fi
if getent group fetchmail &>/dev/null; then
groupdel fetchmail >/dev/null
fi
}