mirror of
https://git.freebsd.org/ports.git
synced 2025-04-28 09:36:41 -04:00
mail/notimail: Server-side email notification manager with push support
NotiMail is a server-side email notification manager that utilizes various push providers for real-time alerts, conserving mobile battery life without compromising on notification immediacy. WWW: https://github.com/draga79/NotiMail PR: 274676
This commit is contained in:
parent
fc467fa00c
commit
27ecd7d58f
6 changed files with 105 additions and 0 deletions
36
mail/notimail/Makefile
Normal file
36
mail/notimail/Makefile
Normal file
|
@ -0,0 +1,36 @@
|
|||
PORTNAME= NotiMail
|
||||
DISTVERSIONPREFIX= v
|
||||
DISTVERSION= 2.0.1
|
||||
CATEGORIES= mail python
|
||||
|
||||
MAINTAINER= stefano@dragas.it
|
||||
COMMENT= Server-side email notification manager with push support
|
||||
WWW= https://github.com/draga79/NotiMail
|
||||
|
||||
LICENSE= BSD3CLAUSE
|
||||
LICENSE_FILE= ${WRKSRC}/LICENSE
|
||||
|
||||
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}requests>0:www/py-requests@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}sqlite3>0:databases/py-sqlite3@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}configparser>0:devel/py-configparser@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}argparse>0:devel/py-argparse@${PY_FLAVOR}
|
||||
|
||||
USES= python shebangfix
|
||||
USE_GITHUB= yes
|
||||
GH_ACCOUNT= draga79
|
||||
USE_RC_SUBR= notimail
|
||||
SHEBANG_FILES= NotiMail.py
|
||||
|
||||
NO_BUILD= yes
|
||||
NO_ARCH= yes
|
||||
SUB_FILES= pkg-message
|
||||
|
||||
do-install:
|
||||
${INSTALL_SCRIPT} ${WRKSRC}/NotiMail.py ${STAGEDIR}${PREFIX}/bin/notimail
|
||||
${MKDIR} ${STAGEDIR}${PREFIX}/etc/notimail
|
||||
${INSTALL_DATA} ${WRKSRC}/config.ini.sample ${STAGEDIR}${PREFIX}/etc/notimail/config.ini.sample
|
||||
${INSTALL_MAN} ${WRKSRC}/man/notimail.1 ${STAGEDIR}${PREFIX}/share/man/man1/
|
||||
${MKDIR} ${STAGEDIR}/var/cache/notimail
|
||||
${MKDIR} ${STAGEDIR}/var/log/notimail
|
||||
|
||||
.include <bsd.port.mk>
|
3
mail/notimail/distinfo
Normal file
3
mail/notimail/distinfo
Normal file
|
@ -0,0 +1,3 @@
|
|||
TIMESTAMP = 1740244881
|
||||
SHA256 (draga79-NotiMail-v2.0.1_GH0.tar.gz) = 297123f920607f5c4b4db4d7ebb2c7cb6e23bd40b9acb7bc8892251ce82ea880
|
||||
SIZE (draga79-NotiMail-v2.0.1_GH0.tar.gz) = 18061
|
49
mail/notimail/files/notimail.in
Normal file
49
mail/notimail/files/notimail.in
Normal file
|
@ -0,0 +1,49 @@
|
|||
#!/bin/sh
|
||||
|
||||
# PROVIDE: notimail
|
||||
# REQUIRE: DAEMON
|
||||
# KEYWORD: shutdown
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name="notimail"
|
||||
rcvar="${name}_enable"
|
||||
|
||||
load_rc_config $name
|
||||
|
||||
: ${notimail_enable:="NO"}
|
||||
: ${notimail_user:="daemon"}
|
||||
: ${notimail_group:="daemon"}
|
||||
: ${notimail_command:="%%PREFIX%%/bin/notimail"}
|
||||
: ${notimail_flags:="-c %%PREFIX%%/etc/notimail/config.ini"}
|
||||
|
||||
pidfile="/var/run/${name}.pid"
|
||||
command="/usr/sbin/daemon"
|
||||
command_args="-p ${pidfile} -f ${notimail_command} ${notimail_flags}"
|
||||
|
||||
start_cmd="${name}_start"
|
||||
stop_cmd="${name}_stop"
|
||||
restart_cmd="${name}_restart"
|
||||
|
||||
notimail_start() {
|
||||
echo "Starting ${name}."
|
||||
/usr/sbin/daemon -p ${pidfile} -f ${notimail_command} ${notimail_flags}
|
||||
}
|
||||
|
||||
notimail_stop() {
|
||||
echo "Stopping ${name}."
|
||||
if [ -e "${pidfile}" ]; then
|
||||
kill -s TERM `cat ${pidfile}`
|
||||
rm -f ${pidfile}
|
||||
else
|
||||
echo "${name} is not running."
|
||||
fi
|
||||
}
|
||||
|
||||
notimail_restart() {
|
||||
${name}_stop
|
||||
sleep 2
|
||||
${name}_start
|
||||
}
|
||||
|
||||
run_rc_command "$1"
|
9
mail/notimail/files/pkg-message.in
Normal file
9
mail/notimail/files/pkg-message.in
Normal file
|
@ -0,0 +1,9 @@
|
|||
Thank you for installing NotiMail!
|
||||
|
||||
To finalize the installation, please configure
|
||||
|
||||
%%PREFIX%%/etc/notimal/config.ini
|
||||
|
||||
according to your needs. If this is an upgrade and you already have
|
||||
a config.ini, the new config file is installed as config.ini.sample.
|
||||
Review and merge any necessary changes.
|
3
mail/notimail/pkg-descr
Normal file
3
mail/notimail/pkg-descr
Normal file
|
@ -0,0 +1,3 @@
|
|||
NotiMail is a server-side email notification manager that utilizes
|
||||
various push providers for real-time alerts, conserving mobile battery
|
||||
life without compromising on notification immediacy.
|
5
mail/notimail/pkg-plist
Normal file
5
mail/notimail/pkg-plist
Normal file
|
@ -0,0 +1,5 @@
|
|||
bin/notimail
|
||||
@sample(daemon,daemon,640) etc/notimail/config.ini.sample
|
||||
share/man/man1/notimail.1.gz
|
||||
@dir(daemon,daemon,755) /var/cache/notimail
|
||||
@dir(daemon,daemon,755) /var/log/notimail
|
Loading…
Add table
Reference in a new issue