View | Details | Raw Unified | Return to bug 274676 | Differences between
and this patch

Collapse All | Expand All

(-)b/mail/notimail/Makefile (+38 lines)
Added Link Here
1
PORTNAME=    notimail
2
DISTVERSIONPREFIX= v
3
DISTVERSION= 2.0.1
4
CATEGORIES=  mail python
5
PKGNAMEPREFIX=  ${PYTHON_PKGNAMEPREFIX}
6
7
MAINTAINER=  stefano@dragas.it
8
COMMENT=     Server-side email notification manager with push support
9
WWW=         https://github.com/draga79/NotiMail
10
11
LICENSE=     BSD3CLAUSE
12
LICENSE_FILE=    ${WRKSRC}/LICENSE
13
14
RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}requests>0:www/py-requests@${PY_FLAVOR} \
15
		${PYTHON_PKGNAMEPREFIX}sqlite3>0:databases/py-sqlite3@${PY_FLAVOR} \
16
		${PYTHON_PKGNAMEPREFIX}configparser>0:devel/py-configparser@${PY_FLAVOR} \
17
		${PYTHON_PKGNAMEPREFIX}argparse>0:devel/py-argparse@${PY_FLAVOR}
18
19
USES=        python shebangfix
20
SHEBANG_FILES=    NotiMail.py
21
NO_BUILD=    yes
22
USE_GITHUB=  yes
23
GH_ACCOUNT=  draga79
24
GH_PROJECT=  NotiMail
25
26
NO_ARCH=     yes
27
28
USE_RC_SUBR= notimail
29
30
do-install:
31
	${INSTALL_SCRIPT} ${WRKSRC}/NotiMail.py ${STAGEDIR}${PREFIX}/bin/notimail
32
	${MKDIR} ${STAGEDIR}${PREFIX}/etc/notimail
33
	${INSTALL_DATA} ${WRKSRC}/config.ini.sample ${STAGEDIR}${PREFIX}/etc/notimail/config.ini.sample
34
	${INSTALL_MAN} ${WRKSRC}/man/notimail.1 ${STAGEDIR}${PREFIX}/share/man/man1/
35
	${MKDIR} ${STAGEDIR}/var/cache/notimail
36
	${MKDIR} ${STAGEDIR}/var/log/notimail
37
38
.include <bsd.port.mk>
(-)b/mail/notimail/distinfo (+3 lines)
Added Link Here
1
TIMESTAMP = 1740244881
2
SHA256 (draga79-NotiMail-v2.0.1_GH0.tar.gz) = 297123f920607f5c4b4db4d7ebb2c7cb6e23bd40b9acb7bc8892251ce82ea880
3
SIZE (draga79-NotiMail-v2.0.1_GH0.tar.gz) = 18061
(-)b/mail/notimail/files/notimail.in (+49 lines)
Added Link Here
1
#!/bin/sh
2
3
# PROVIDE: notimail
4
# REQUIRE: DAEMON
5
# KEYWORD: shutdown
6
7
. /etc/rc.subr
8
9
name="notimail"
10
rcvar="${name}_enable"
11
12
load_rc_config $name
13
14
: ${notimail_enable:="NO"}
15
: ${notimail_user:="daemon"}
16
: ${notimail_group:="daemon"}
17
: ${notimail_command:="%%PREFIX%%/bin/notimail"}
18
: ${notimail_flags:="-c %%PREFIX%%/etc/notimail/config.ini"}
19
20
pidfile="/var/run/${name}.pid"
21
command="/usr/sbin/daemon"
22
command_args="-p ${pidfile} -f ${notimail_command} ${notimail_flags}"
23
24
start_cmd="${name}_start"
25
stop_cmd="${name}_stop"
26
restart_cmd="${name}_restart"
27
28
notimail_start() {
29
    echo "Starting ${name}."
30
    /usr/sbin/daemon -p ${pidfile} -f ${notimail_command} ${notimail_flags}
31
}
32
33
notimail_stop() {
34
    echo "Stopping ${name}."
35
    if [ -e "${pidfile}" ]; then
36
        kill -s TERM `cat ${pidfile}`
37
        rm -f ${pidfile}
38
    else
39
        echo "${name} is not running."
40
    fi
41
}
42
43
notimail_restart() {
44
    ${name}_stop
45
    sleep 2
46
    ${name}_start
47
}
48
49
run_rc_command "$1"
(-)b/mail/notimail/pkg-descr (+3 lines)
Added Link Here
1
NotiMail is a server-side email notification manager that utilizes
2
various push providers for real-time alerts, conserving mobile battery
3
life without compromising on notification immediacy.
(-)b/mail/notimail/pkg-message (+14 lines)
Added Link Here
1
Thank you for installing NotiMail!
2
3
To finalize the installation, please perform the following steps:
4
5
1. If this is your first installation, copy the sample configuration:
6
    cp ${PREFIX}/etc/notimail/config.ini.sample ${PREFIX}/etc/notimail/config.ini
7
8
2. Configure the `config.ini` according to your needs.
9
10
3. Set the proper permissions:
11
    chown daemon:daemon ${PREFIX}/etc/notimail/config.ini
12
    chmod 640 ${PREFIX}/etc/notimail/config.ini
13
14
4. 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.
(-)b/mail/notimail/pkg-plist (-1 / +5 lines)
Added Link Here
0
-
1
bin/notimail
2
@sample etc/notimail/config.ini.sample
3
share/man/man1/notimail.1.gz
4
@dir(daemon,daemon,755) /var/cache/notimail
5
@dir(daemon,daemon,755) /var/log/notimail

Return to bug 274676