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

Collapse All | Expand All

(-)./Makefile (-26 / +31 lines)
Lines 6-57 Link Here
6
#
6
#
7
7
8
PORTNAME=	prayer
8
PORTNAME=	prayer
9
PORTVERSION=	1.1.0
9
PORTVERSION=	1.3.1
10
PORTREVISION=	1
11
CATEGORIES=	mail www
10
CATEGORIES=	mail www
12
MASTER_SITES=	ftp://ftp.csx.cam.ac.uk/pub/software/email/prayer/
11
MASTER_SITES=	ftp://ftp.csx.cam.ac.uk/pub/software/email/prayer/
13
12
14
MAINTAINER=	ports@FreeBSD.org
13
MAINTAINER=	baptiste.daroussin@gmail.com
15
COMMENT=	Prayer Webmail System
14
COMMENT=	Prayer Webmail System
16
15
17
BUILD_DEPENDS=	${LOCALBASE}/lib/libc-client4.a:${PORTSDIR}/mail/cclient
16
BUILD_DEPENDS=	${LOCALBASE}/lib/libc-client4.a:${PORTSDIR}/mail/cclient
18
.if !defined(PRAYER_WITHOUT_SESSION_CACHE)
19
LIB_DEPENDS+=	db-4.2:${PORTSDIR}/databases/db42
20
.endif
21
17
22
USE_OPENLDAP=	yes
18
USE_OPENLDAP=	yes
23
USE_GMAKE=	yes
19
USE_GMAKE=	yes
24
USE_OPENSSL=	yes
20
USE_OPENSSL=	yes
25
USE_PERL5_BUILD=	yes
26
USE_ICONV=	yes
21
USE_ICONV=	yes
27
MAKE_ENV+=	PORTCFLAGS="${CFLAGS}"
22
LDFLAGS+=	-L${LOCALBASE}/lib
23
MAKE_ENV+=	PORTCFLAGS="${CFLAGS} -I${LOCALBASE}/include" \
24
		PORTLDFLAGS="${LDFLAGS}"
28
25
29
PORTDOCS=	ACCOUNTD CMD_LINE DESIGN DONE DONE-OLD FEATURES ICONLIST \
26
PORTDOCS=	ACCOUNTD CMD_LINE DESIGN DONE DONE-OLD FEATURES ICONLIST \
30
		INSTALL LOGS NOTICE README ROADMAP SECURITY TODO URL_OPTIONS
27
		INSTALL LOGS NOTICE README ROADMAP SECURITY TODO URL_OPTIONS
31
28
32
post-extract:
29
USE_RC_SUBR=	prayer
33
	@${FIND} ${WRKSRC} -depth -type d -name CVS -exec ${RM} -rf {} \;
30
31
OPTIONS=	SESSIONCACHE	"Activate Session Cache" On
32
33
.include <bsd.port.pre.mk>
34
35
.if defined(WITH_SESSIONCACHE)
36
USE_BDB=	yes
37
.endif
34
38
35
pre-patch:
39
pre-patch:
36
	${CP} ${WRKSRC}/defaults/Config ${WRKSRC}/Config
40
	@${CP} ${WRKSRC}/defaults/Config ${WRKSRC}/Config
37
41
38
do-configure:
42
post-patch:
39
	@${SED} -e "s=%%PREFIX%%=${PREFIX}=" ${FILESDIR}/prayer.sh \
43
	# correct chroot
40
		> ${WRKSRC}/prayer.sh
44
	@${REINPLACE_CMD} "s#\"/chroot/prayer\"#config->var_prefix#" ${WRKSRC}/servers/prayer_chroot.c
41
.if defined(PRAYER_WITHOUT_SESSION_CACHE)
45
	# change the user in the default config
42
	${REINPLACE_CMD} \
46
	@${REINPLACE_CMD} "s#prayer_user           = \"prayer\"#prayer_user           = \"_prayer\"#" ${WRKSRC}/files/etc/prayer.cf.SRC
43
	    -e 's|SESSION_CACHE_ENABLE = true |SESSION_CACHE_ENABLE = false|' \
47
44
	    -e 's|/usr/local/prayer|${PREFIX}/prayer|' \
48
post-configure:
45
		${WRKSRC}/Config
49
.if defined(WITH_SESSIONCACHE)
50
	@${REINPLACE_CMD} "s#^DB_INCLUDE=.*#DB_INCLUDE=-I${BDB_INCLUDE_DIR}#" ${WRKSRC}/Config
51
	@${REINPLACE_CMD} "s#^DB_LIBS=.*#DB_LIBS=-L${BDB_LIB_DIR} -l${BDB_LIB_NAME}#" ${WRKSRC}/Config
52
.else
53
	@${REINPLACE_CMD} "s#^SESSION_CACHE_ENABLE = true#SESSION_CACHE_ENABLE = false#" ${WRKSRC}/Config
46
.endif
54
.endif
55
	@${REINPLACE_CMD} "s#^RW_USER    = prayer#RW_USER    = _prayer#" ${WRKSRC}/Config
47
56
48
pre-install:
57
pre-install:
49
	if ! pw groupshow prayer; then pw groupadd prayer; fi
58
	@${MKDIR} ${LOCALBASE}/etc/prayer
50
	if ! pw usershow prayer; then pw useradd prayer -g prayer \
59
	@${SH} ${PKGINSTALL} ${PORTNAME} PRE-INSTALL
51
		-h - -d /nonexistent -s /nonexistent -c "Prayer Webmail"; fi
52
	${MKDIR} ${PREFIX}/prayer
53
	${INSTALL_SCRIPT} ${WRKSRC}/prayer.sh \
54
		${LOCALBASE}/etc/rc.d/prayer.sh.sample
55
60
56
post-install:
61
post-install:
57
.if !defined(NOPORTDOCS)
62
.if !defined(NOPORTDOCS)
Lines 59-62 Link Here
59
	@cd ${WRKSRC}/docs && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}
64
	@cd ${WRKSRC}/docs && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}
60
.endif
65
.endif
61
66
62
.include <bsd.port.mk>
67
.include <bsd.port.post.mk>
(-)./distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
MD5 (prayer-1.1.0.tar.gz) = 3a65b0db709146a160a5dc23510c767a
1
MD5 (prayer-1.3.1.tar.gz) = 5b124c7ac901e3425cc12884de39d6b3
2
SHA256 (prayer-1.1.0.tar.gz) = 4cff355aa3847aa8c0816d2be433567eb106f2cd031b4606323bdbe37d2698bd
2
SHA256 (prayer-1.3.1.tar.gz) = 77b2791973eda7831c72bf22a1177e5bea024c3e1b238677be43763a38cdd651
3
SIZE (prayer-1.1.0.tar.gz) = 576023
3
SIZE (prayer-1.3.1.tar.gz) = 706034
(-)./files/patch-Config (-21 / +49 lines)
Lines 1-6 Link Here
1
--- Config.orig	2008-04-16 00:43:56.000000000 -0800
1
--- ./Config.orig	2009-03-13 14:29:17.984455869 +0100
2
+++ Config	2008-04-16 00:44:36.000000000 -0800
2
+++ ./Config	2009-03-13 14:31:47.924955178 +0100
3
@@ -28,7 +28,7 @@
3
@@ -27,31 +27,31 @@
4
 
4
 
5
 ############################################################################
5
 ############################################################################
6
 # Location of compiler
6
 # Location of compiler
Lines 9-41 Link Here
9
 # Location of make program (GNU make required)
9
 # Location of make program (GNU make required)
10
 MAKE         = gmake
10
 MAKE         = gmake
11
 # Location of install program (GNU install or compatible required)
11
 # Location of install program (GNU install or compatible required)
12
@@ -37,9 +37,10 @@
12
 INSTALL      = install
13
 # Base Compiler options for GCC.
13
 
14
 #BASECFLAGS   = -Wall -g
14
-# Base Compiler options for GCC (use CPPFLAGS and LDFLAGS if passed in)
15
 #BASELDFLAGS  = -g
15
-ifdef CPPFLAGS
16
-BASECFLAGS   = -Wall -g -O2
16
-  BASECFLAGS   = $(CPPFLAGS)
17
+#BASECFLAGS   = -Wall -g -O2
17
+# Base Compiler options for GCC (use PORTCFLAGS and LDFLAGS if passed in)
18
+BASECFLAGS   = -Wall -g ${PORTCFLAGS}
18
+ifdef PORTCFLAGS
19
 BASELDFLAGS  = -g -O2
19
+  BASECFLAGS   = $(PORTCFLAGS)
20
 else
21
   BASECFLAGS   = -Wall -g -O2
22
 endif
23
 ifdef INCLUDES
24
   BASECFLAGS += $(INCLUDES)
25
 endif
26
-ifdef LDFLAGS
27
- BASELDFLAGS  = $(LDFLAGS)
28
+ifdef PORTLDFLAGS
29
+ BASELDFLAGS  = $(PORTLDFLAGS)
30
 else
31
  BASELDFLAGS  = -g
32
 endif
33
 
34
 # Minimal libraries needed by Linux
20
-BASE_LIBS    = -lcrypt
35
-BASE_LIBS    = -lcrypt
21
+BASE_LIBS    = -lcrypt -liconv
36
+# BASE_LIBS    = -lcrypt
37
 # FreeBSD needs some extra libraries:
38
-# BASE_LIBS   = -lcrypt -liconv -lutil
39
+BASE_LIBS   = -lcrypt -liconv -lutil
40
 # Solaris needs even more libararies:
41
 # BASE_LIBS   = -lcrypt -lxnet -lnsl -lsocket
22
 
42
 
23
 # Base Compiler options for Sun SUNWspro compiler
43
@@ -71,9 +71,9 @@
24
 #CC          = /opt/SUNWspro/bin/cc
25
@@ -58,9 +59,9 @@
26
 # which points to ../../imap/c-client. This just reduces the amount of
44
 # which points to ../../imap/c-client. This just reduces the amount of
27
 # noise output on each line when building the package.
45
 # noise output on each line when building the package.
28
 #
46
 #
29
-CCLIENT_DIR=./c-client
47
-CCLIENT_DIR=../c-client
30
-CCLIENT_INCLUDE=-I $(CCLIENT_DIR)
48
-CCLIENT_INCLUDE=-I $(CCLIENT_DIR)
31
-CCLIENT_LIBS=./$(CCLIENT_DIR)/c-client.a
49
-CCLIENT_LIBS=./$(CCLIENT_DIR)/c-client.a
32
+#CCLIENT_DIR=./c-client
50
+#CCLIENT_DIR=../c-client
33
+#CCLIENT_INCLUDE=-I $(CCLIENT_DIR)
51
+#CCLIENT_INCLUDE=-I $(CCLIENT_DIR)
34
+#CCLIENT_LIBS=./$(CCLIENT_DIR)/c-client.a
52
+#CCLIENT_LIBS=./$(CCLIENT_DIR)/c-client.a
35
 CCLIENT_SSL_ENABLE  = true
36
 
53
 
37
 #
54
 #
38
@@ -80,12 +81,14 @@
55
 # Following works with imap-devel RPM package from Redhat 7.
56
@@ -92,12 +92,14 @@
39
 # Following works with the mail/cclient port from FreeBSD
57
 # Following works with the mail/cclient port from FreeBSD
40
 #
58
 #
41
 #CCLIENT_INCLUDE = -I/usr/local/include/c-client
59
 #CCLIENT_INCLUDE = -I/usr/local/include/c-client
Lines 51-57 Link Here
51
 #CCLIENT_KERB_ENABLE = true
69
 #CCLIENT_KERB_ENABLE = true
52
 
70
 
53
 ############################################################################
71
 ############################################################################
54
@@ -99,7 +102,7 @@
72
@@ -111,7 +113,7 @@
55
 Z_LIBS    = -lz
73
 Z_LIBS    = -lz
56
 
74
 
57
 # LDAP (required if LDAP_ENABLE set)
75
 # LDAP (required if LDAP_ENABLE set)
Lines 60-66 Link Here
60
 LDAP_LIBS    = -lldap
78
 LDAP_LIBS    = -lldap
61
 
79
 
62
 # Pam (required if CCLIENT_PAM_ENABLE set)
80
 # Pam (required if CCLIENT_PAM_ENABLE set)
63
@@ -128,12 +131,12 @@
81
@@ -140,12 +142,12 @@
64
 # DB definitions (required if SESSION_CACHE_ENABLE set)
82
 # DB definitions (required if SESSION_CACHE_ENABLE set)
65
 #
83
 #
66
 # Following suitable for Redhat Linux which has DB 3 preinstalled
84
 # Following suitable for Redhat Linux which has DB 3 preinstalled
Lines 77-79 Link Here
77
 
95
 
78
 ############################################################################
96
 ############################################################################
79
 
97
 
98
@@ -181,6 +183,6 @@
99
 PRIVATE_FILE = 0640
100
 
101
 # Location of configuration files and binaries
102
-PRAYER_CONFIG_FILE   = ${PREFIX}/etc/prayer.cf
103
-BIN_DIR              = ${PREFIX}/sbin
104
-ACCOUNTD_CONFIG_FILE = ${PREFIX}/etc/prayer-accountd.cf
105
+PRAYER_CONFIG_FILE   = ${LOCALBASE}/etc/prayer/prayer.cf
106
+BIN_DIR              = ${LOCALBASE}/sbin
107
+ACCOUNTD_CONFIG_FILE = ${LOCALBASE}/etc/prayer/accountd.cf
(-)./files/patch-templates-remove-url-prefix (+184 lines)
Line 0 Link Here
1
diff -Naur templates.orig/cam/frontend_compose_timeout.t templates/cam/frontend_compose_timeout.t
2
--- templates.orig/cam/frontend_compose_timeout.t	2008-10-14 10:07:08.000000000 +0200
3
+++ templates/cam/frontend_compose_timeout.t	2009-03-13 12:18:28.859721000 +0100
4
@@ -46,7 +46,7 @@
5
 </div>
6
 </form>
7
 
8
-<p><a href="<% $url_prefix |n %>/login/<% $user |u %>">\
9
+<p><a href="/login/<% $user |u %>">\
10
 Click here to login again</a></p>
11
 % CALL container_end
12
 % CALL footer
13
diff -Naur templates.orig/cam/frontend_login_error.t templates/cam/frontend_login_error.t
14
--- templates.orig/cam/frontend_login_error.t	2008-10-14 10:07:08.000000000 +0200
15
+++ templates/cam/frontend_login_error.t	2009-03-13 12:18:54.133542000 +0100
16
@@ -12,10 +12,10 @@
17
 % ENDIF
18
 
19
 % IFDEF $user
20
-<p>Please <a href="<% $url_prefix |n %>/login/<% $user |u %>">\
21
+<p>Please <a href="/login/<% $user |u %>">\
22
 try again</a></p>
23
 % ELSE
24
-<p>Please <a href="<% $url_prefix |n %>/">try again</a></p>
25
+<p>Please <a href="/">try again</a></p>
26
 % ENDIF
27
 
28
 % CALL container_end
29
diff -Naur templates.orig/cam/frontend_security.t templates/cam/frontend_security.t
30
--- templates.orig/cam/frontend_security.t	2008-10-02 09:01:56.000000000 +0200
31
+++ templates/cam/frontend_security.t	2009-03-13 12:19:23.592170000 +0100
32
@@ -5,7 +5,7 @@
33
 <h2>Security Alert</h2>
34
 
35
 <p>Login request did not come from
36
-  <a href = "<% $url_prefix |n %>"><% $url_prefix |h %></a></p>
37
+  <a href = "/"><% $url_prefix |h %></a></p>
38
 
39
 % CALL container_end
40
 % CALL footer
41
diff -Naur templates.orig/cam/frontend_session.t templates/cam/frontend_session.t
42
--- templates.orig/cam/frontend_session.t	2008-10-14 10:07:08.000000000 +0200
43
+++ templates/cam/frontend_session.t	2009-03-13 12:19:42.839703000 +0100
44
@@ -4,7 +4,7 @@
45
 % CALL container_start
46
 <h3>Couldn't connect to Webmail session server</h3>
47
 
48
-<p><a href="<% $url_prefix |n %>/login/<% $user |u %>">\
49
+<p><a href="/login/<% $user |u %>">\
50
 Try again</a> later</p>
51
 % CALL container_end
52
 % CALL footer
53
diff -Naur templates.orig/cam/frontend_timeout.t templates/cam/frontend_timeout.t
54
--- templates.orig/cam/frontend_timeout.t	2008-10-14 10:07:08.000000000 +0200
55
+++ templates/cam/frontend_timeout.t	2009-03-13 12:19:55.817016000 +0100
56
@@ -4,7 +4,7 @@
57
 % CALL container_start
58
 <h3>Couldn't connect to session. Maybe it timed out?</h3>
59
 
60
-<p><a href="<% $url_prefix |n %>/login/<% $user |u %>">\
61
+<p><a href="/login/<% $user |u %>">\
62
 Click here to login again</a></p>
63
 % CALL container_end
64
 % CALL footer
65
diff -Naur templates.orig/cam/login.t templates/cam/login.t
66
--- templates.orig/cam/login.t	2008-10-07 10:36:43.000000000 +0200
67
+++ templates/cam/login.t	2009-03-13 12:20:17.892743000 +0100
68
@@ -82,7 +82,7 @@
69
 </table>
70
 % ENDIF
71
 <form method="post" accept-charset="UTF-8" enctype="multipart/form-data"
72
-      action="<% ${url_prefix} |n %>" class="lookup" id="credentials">
73
+      action="/" class="lookup" id="credentials">
74
 <fieldset>
75
 <div>
76
 <table id="login"><tr>
77
diff -Naur templates.orig/cam/login_hermes.t templates/cam/login_hermes.t
78
--- templates.orig/cam/login_hermes.t	2008-10-27 12:43:06.000000000 +0100
79
+++ templates/cam/login_hermes.t	2009-03-13 12:20:36.756388000 +0100
80
@@ -106,7 +106,7 @@
81
 </table>
82
 % ENDIF
83
 <form method="post" accept-charset="UTF-8" enctype="multipart/form-data"
84
-      action="<% ${url_prefix} |n %>" class="lookup" id="credentials">
85
+      action="/" class="lookup" id="credentials">
86
 <fieldset>
87
 <div>
88
 % IFDEF $raven_enable
89
diff -Naur templates.orig/cam/raven_blocked.t templates/cam/raven_blocked.t
90
--- templates.orig/cam/raven_blocked.t	2008-09-16 12:52:45.000000000 +0200
91
+++ templates/cam/raven_blocked.t	2009-03-13 12:21:04.147607000 +0100
92
@@ -7,7 +7,7 @@
93
 <p>Raven logins have been disabled for this account. You will need to log
94
 in using the normal <% $g_service_name |h %> username and password</p>
95
 
96
-<p><a href="<% $url_prefix |n %>/login/<% $username |u %>">Click here</a>
97
+<p><a href="/login/<% $username |u %>">Click here</a>
98
 to return to the login screen</p>
99
 % CALL container_end
100
 % CALL footer
101
diff -Naur templates.orig/old/frontend_compose_timeout.t templates/old/frontend_compose_timeout.t
102
--- templates.orig/old/frontend_compose_timeout.t	2008-10-14 10:07:08.000000000 +0200
103
+++ templates/old/frontend_compose_timeout.t	2009-03-13 12:25:09.617868000 +0100
104
@@ -45,7 +45,7 @@
105
 </div>
106
 </form>
107
 
108
-<p><a href="<% $url_prefix |n %>/login/<% $user |u %>">\
109
+<p><a href="/login/<% $user |u %>">\
110
 Click here</a> to login again</p>
111
 
112
 % CALL footer
113
diff -Naur templates.orig/old/frontend_login_error.t templates/old/frontend_login_error.t
114
--- templates.orig/old/frontend_login_error.t	2008-10-14 10:07:08.000000000 +0200
115
+++ templates/old/frontend_login_error.t	2009-03-13 12:27:01.925958000 +0100
116
@@ -11,9 +11,9 @@
117
 % ENDIF
118
 
119
 % IFDEF $user
120
-<p>Please <a href="<% $url_prefix |n %>/login/<% $user |u %>">\
121
+<p>Please <a href="/login/<% $user |u %>">\
122
 try again</a></p>
123
 % ELSE
124
-<p>Please <a href="<% $url_prefix |n %>/">try again</a></p>
125
+<p>Please <a href="/">try again</a></p>
126
 % ENDIF
127
 % CALL footer
128
diff -Naur templates.orig/old/frontend_security.t templates/old/frontend_security.t
129
--- templates.orig/old/frontend_security.t	2008-10-02 09:01:57.000000000 +0200
130
+++ templates/old/frontend_security.t	2009-03-13 12:27:52.204673000 +0100
131
@@ -4,6 +4,6 @@
132
 <h2>Security Alert</h2>
133
 
134
 <p>Login request did not come from
135
-  <a href = "<% $url_prefix |n %>"><% $url_prefix |h %></a></p>
136
+  <a href = "/"><% $url_prefix |h %></a></p>
137
 
138
 % CALL footer
139
diff -Naur templates.orig/old/frontend_session.t templates/old/frontend_session.t
140
--- templates.orig/old/frontend_session.t	2008-10-14 10:07:08.000000000 +0200
141
+++ templates/old/frontend_session.t	2009-03-13 12:28:05.778814000 +0100
142
@@ -3,6 +3,6 @@
143
 % CALL header
144
 <h3>Couldn't connect to Webmail session server</h3>
145
 
146
-<p><a href="<% $url_prefix |n %>/login/<% $user |u %>">\
147
+<p><a href="/login/<% $user |u %>">\
148
 Try again</a> later</p>
149
 % CALL footer
150
diff -Naur templates.orig/old/frontend_timeout.t templates/old/frontend_timeout.t
151
--- templates.orig/old/frontend_timeout.t	2008-10-14 10:07:08.000000000 +0200
152
+++ templates/old/frontend_timeout.t	2009-03-13 12:28:24.240569000 +0100
153
@@ -3,6 +3,6 @@
154
 % CALL header
155
 <h3>Couldn't connect to session. Maybe it timed out?</h3>
156
 
157
-<p><a href="<% $url_prefix |n %>/login/<% $user |u %>">\
158
+<p><a href="/login/<% $user |u %>">\
159
 Click here</a> to login again</p>
160
 % CALL footer
161
diff -Naur templates.orig/old/login.t templates/old/login.t
162
--- templates.orig/old/login.t	2008-10-02 09:01:57.000000000 +0200
163
+++ templates/old/login.t	2009-03-13 12:28:39.815144000 +0100
164
@@ -37,7 +37,7 @@
165
 % ENDIF
166
 %
167
 <form method="post" accept-charset="UTF-8" enctype="multipart/form-data"
168
-      action="<% ${url_prefix} |n %>" id="credentials">
169
+      action="/" id="credentials">
170
 <table cellpadding="5">
171
 <tr>
172
   <td>Username</td>
173
diff -Naur templates.orig/old/raven_blocked.t templates/old/raven_blocked.t
174
--- templates.orig/old/raven_blocked.t	2008-09-16 12:52:48.000000000 +0200
175
+++ templates/old/raven_blocked.t	2009-03-13 12:28:57.300178000 +0100
176
@@ -6,7 +6,7 @@
177
 <p>Raven logins have been disabled for this account. You will need to log
178
 in using the normal <% $g_service_name |h %> username and password</p>
179
 
180
-<p><a href="<% $url_prefix |n %>/login/<% $username |u %>">Click here</a>
181
+<p><a href="/login/<% $username |u %>">Click here</a>
182
 to return to the login screen</p>
183
 
184
 % CALL footer
(-)./files/prayer.in (+53 lines)
Line 0 Link Here
1
#!/bin/sh
2
3
#
4
# PROVIDE: prayer
5
#
6
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
7
# to enable this service:
8
#
9
# prayer_enable (bool): Set to NO by default.
10
# prayer_chrooted (bool): Set to NO by default.
11
#	Force prayer to be executed in chrooted
12
# prayer_prefork (bool): Set to NO by default.
13
# 	Allow prayer to prefork itself at startup
14
# 
15
16
. /etc/rc.subr
17
18
name="prayer"
19
rcvar=${name}_enable
20
21
command=/usr/local/sbin/${name}
22
23
pidfile="/var/spool/prayer/pid/${name}.pid"
24
25
start_precmd="prayer_prestart"
26
stop_postcmd="prayer_poststop"
27
28
prayer_prestart()
29
{
30
	if checkyesno prayer_enable; then
31
		if checkyesno prayer_chrooted; then	
32
			echo "Chroot no fully functionnal for now so not activated"
33
		#	command=/usr/local/sbin/${name}-chroot
34
		fi
35
		if ! checkyesno prayer_prefork; then
36
			command_args="--disable-prefork"
37
		fi
38
	fi
39
	return 0
40
}
41
42
prayer_poststop()
43
{
44
	kill -15 `head -1 /var/spool/prayer/pid/${name}-session.pid` 
45
}
46
47
load_rc_config $name
48
49
: ${prayer_enable="NO"}
50
: ${prayer_chrooted="NO"}
51
: ${prayer_prefork="NO"}
52
53
run_rc_command $1
(-)./pkg-install (+35 lines)
Line 0 Link Here
1
#!/bin/sh
2
3
PATH=/bin:/usr/sbin
4
5
USER=_prayer
6
GROUP=prayer
7
UID=917
8
GID=917
9
10
case $2 in
11
  PRE-INSTALL)
12
  if pw group show "$GROUP" 2>/dev/null;then
13
    echo "You already have a group \"${GROUP}\", so I will use it."
14
  else
15
    if pw groupadd "${GROUP}" -g ${GID};then
16
      echo "Added group \"${GROUP}\"."
17
    else 
18
      echo "Adding group \"${GROUP}\" failed..."
19
      exit 1
20
    fi
21
  fi
22
  if pw user show "${USER}" 2>/dev/null; then
23
    echo "You already have a user \"${USER}\", so I will use it."
24
  else
25
    if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \
26
      -s /sbin/nologin -L daemon -d /nonexistent -c "Prayer Account"
27
    then
28
      echo "Added user \"${USER}\"."
29
    else
30
      echo "Adding user \"${USER}\" failed..."
31
      exit 1
32
    fi
33
  fi
34
  ;;
35
esac
(-)./pkg-plist (-63 / +52 lines)
Lines 1-51 Link Here
1
@exec if ! pw groupshow prayer; then pw groupadd prayer; fi
1
prayer/icons/bg-home-menu-top.gif
2
@exec if ! pw usershow prayer; then pw useradd prayer -g prayer -h - -d /nonexistent -s /nonexistent -c "Prayer Webmail"; fi
2
prayer/icons/bg-nav-primary.gif
3
etc/rc.d/prayer.sh.sample
3
prayer/icons/bg-tab-left-active.gif
4
prayer/help/compose/large.html
4
prayer/icons/bg-tab-left-over.gif
5
prayer/help/compose/normal.html
5
prayer/icons/bg-tab-left.gif
6
prayer/help/compose/postponed.html
6
prayer/icons/bg-tab-right-active.gif
7
prayer/help/compose/role_list.html
7
prayer/icons/bg-tab-right-over.gif
8
prayer/help/abook_add.html
8
prayer/icons/bg-tab-right.gif
9
prayer/help/abook_list.html
9
prayer/icons/button-search.gif
10
prayer/help/abook_lookup.html
10
prayer/icons/button2-bm.png
11
prayer/help/abook_search.html
11
prayer/icons/divider-site-tools-small.gif
12
prayer/help/abook_take.html
12
prayer/icons/icon-alert-normal.gif
13
prayer/help/abook_update.html
13
prayer/icons/icon-alert-warning.gif
14
prayer/help/abook_xfer.html
14
prayer/icons/icon-arrow-home-menu-orange.gif
15
prayer/help/attachments.html
15
prayer/icons/icon-arrow-home-menu.gif
16
prayer/help/block.html
16
prayer/icons/icon-arrow-nav-breadcrumb.gif
17
prayer/help/copy.html
17
prayer/icons/icon-arrow-nav-primary-down.gif
18
prayer/help/dictionary.html
18
prayer/icons/icon-arrow-nav-primary-up.gif
19
prayer/help/display.html
19
prayer/icons/icon-arrow-nav-primary.gif
20
prayer/help/favourites.html
20
prayer/icons/icon-home.gif
21
prayer/help/filter.html
21
prayer/icons/icon-quick-links.gif
22
prayer/help/filter_select.html
22
prayer/icons/icon-section.gif
23
prayer/help/folders.html
23
prayer/icons/identifier.gif
24
prayer/help/fullname.html
24
prayer/icons/identifier800.gif
25
prayer/help/include.html
25
prayer/icons/ifmlogo-small.gif
26
prayer/help/list.html
26
prayer/icons/ifmlogo.gif
27
prayer/help/manage.html
27
prayer/icons/msg-seen.png
28
prayer/help/passwd.html
28
prayer/icons/next-white.gif
29
prayer/help/quota.html
29
prayer/icons/next.gif
30
prayer/help/rename.html
30
prayer/icons/prev-white.gif
31
prayer/help/redirect.html
31
prayer/icons/previous.gif
32
prayer/help/reply.html
32
prayer/icons/raven.gif
33
prayer/help/roles_entry.html
33
prayer/icons/rssfeed.gif
34
prayer/help/roles_list.html
34
prayer/icons/sort-d.gif
35
prayer/help/search.html
35
prayer/icons/sort-u.gif
36
prayer/help/sieve.html
36
prayer/icons/srssfeed.gif
37
prayer/help/spam.html
37
prayer/icons/ucs-id-small.jpg
38
prayer/help/toolbar.html
38
prayer/icons/ucs-s.gif
39
prayer/help/transfer.html
39
prayer/icons/ucs.gif
40
prayer/help/upload_select.html
41
prayer/help/vacation.html
42
prayer/help/vaclog.html
43
prayer/help/welcome.html
44
prayer/help/prefs/compose1.html
45
prayer/help/prefs/compose2.html
46
prayer/help/prefs/display1.html
47
prayer/help/prefs/folder.html
48
prayer/help/prefs/general.html
49
prayer/icons/addressbook-inactive.gif
40
prayer/icons/addressbook-inactive.gif
50
prayer/icons/addressbook.gif
41
prayer/icons/addressbook.gif
51
prayer/icons/back.gif
42
prayer/icons/back.gif
Lines 83-108 Link Here
83
prayer/icons/rightright.gif
74
prayer/icons/rightright.gif
84
prayer/icons/tick.gif
75
prayer/icons/tick.gif
85
prayer/icons/univheader.gif
76
prayer/icons/univheader.gif
86
prayer/etc/prayer.cf-dist
77
etc/prayer/prayer.cf-dist
87
prayer/etc/prayer-accountd.cf-dist
78
etc/prayer/accountd.cf-dist
88
prayer/etc/motd.html
79
prayer/etc/motd.html
89
prayer/etc/welcome.html
80
sbin/prayer
90
prayer/sbin/prayer
81
sbin/prayer-db-prune
91
prayer/sbin/prayer-db-prune
82
sbin/prayer-session
92
prayer/sbin/prayer-session
83
sbin/prayer-ssl-prune
93
prayer/sbin/prayer-ssl-prune
84
sbin/prayer-sem-prune
94
prayer/sbin/prayer-sem-prune
85
sbin/prayer-cyclog
95
prayer/sbin/prayer-cyclog
86
sbin/prayer-chroot
96
prayer/sbin/prayer-chroot
97
@dirrm prayer/help/compose
98
@dirrm prayer/help/prefs
99
@dirrm prayer/help
100
@dirrm prayer/icons
87
@dirrm prayer/icons
101
@dirrm prayer/etc
88
@dirrm prayer/etc
102
@exec mkdir -p %D/prayer/certs
89
@exec mkdir -p %D/prayer/certs
103
@dirrm prayer/certs
90
@dirrm prayer/certs
104
@dirrm prayer/sbin
105
@dirrm prayer
91
@dirrm prayer
92
@exec mkdir -p %D/etc/prayer
93
@dirrmtry etc/prayer
106
@exec mkdir -p /var/spool/prayer
94
@exec mkdir -p /var/spool/prayer
107
@exec chown -R prayer:prayer /var/spool/prayer
95
@exec chown -R _prayer:prayer /var/spool/prayer
108
@dirrmtry /var/spool/prayer
96
@dirrmtry /var/spool/prayer
97
@stopdaemon prayer

Return to bug 132611