diff options
author | rafan <rafan@FreeBSD.org> | 2009-03-16 23:28:23 +0800 |
---|---|---|
committer | rafan <rafan@FreeBSD.org> | 2009-03-16 23:28:23 +0800 |
commit | 7c647e381ab26eaa1db9a089e7ab9e8143d6be9e (patch) | |
tree | 5381c2c2ec32196676d8c928ac825746d0622dd6 | |
parent | 40c3a1469da5a141e4322a333d9f257ff57dd0f1 (diff) | |
download | freebsd-ports-gnome-7c647e381ab26eaa1db9a089e7ab9e8143d6be9e.tar.gz freebsd-ports-gnome-7c647e381ab26eaa1db9a089e7ab9e8143d6be9e.tar.zst freebsd-ports-gnome-7c647e381ab26eaa1db9a089e7ab9e8143d6be9e.zip |
- Update to 1.3.1
- Convert old style rc script to the new world order
- Some other cleanups
PR: ports/132611
Submitted by: Bapt <baptiste.daroussin at gmail.com>
-rw-r--r-- | mail/prayer/Makefile | 66 | ||||
-rw-r--r-- | mail/prayer/distinfo | 6 | ||||
-rw-r--r-- | mail/prayer/files/patch-Config | 79 | ||||
-rw-r--r-- | mail/prayer/files/patch-lib-mydb.c (renamed from mail/prayer/files/patch-prayer-mydb.c) | 4 | ||||
-rw-r--r-- | mail/prayer/files/patch-man-Makefile | 22 | ||||
-rw-r--r-- | mail/prayer/files/patch-os_bsd.c | 18 | ||||
-rw-r--r-- | mail/prayer/files/patch-servers-Makefile | 11 | ||||
-rw-r--r-- | mail/prayer/files/patch-templates-remove-url-prefix | 184 | ||||
-rw-r--r-- | mail/prayer/files/prayer.in | 52 | ||||
-rw-r--r-- | mail/prayer/files/prayer.sh | 38 | ||||
-rw-r--r-- | mail/prayer/pkg-install | 35 | ||||
-rw-r--r-- | mail/prayer/pkg-plist | 135 |
12 files changed, 477 insertions, 173 deletions
diff --git a/mail/prayer/Makefile b/mail/prayer/Makefile index 1997b42a98f4..6f6e395e20d5 100644 --- a/mail/prayer/Makefile +++ b/mail/prayer/Makefile @@ -6,52 +6,62 @@ # PORTNAME= prayer -PORTVERSION= 1.1.0 -PORTREVISION= 1 +PORTVERSION= 1.3.1 CATEGORIES= mail www MASTER_SITES= ftp://ftp.csx.cam.ac.uk/pub/software/email/prayer/ -MAINTAINER= ports@FreeBSD.org +MAINTAINER= baptiste.daroussin@gmail.com COMMENT= Prayer Webmail System BUILD_DEPENDS= ${LOCALBASE}/lib/libc-client4.a:${PORTSDIR}/mail/cclient -.if !defined(PRAYER_WITHOUT_SESSION_CACHE) -LIB_DEPENDS+= db-4.2:${PORTSDIR}/databases/db42 -.endif USE_OPENLDAP= yes USE_GMAKE= yes USE_OPENSSL= yes -USE_PERL5_BUILD= yes +USE_PERL5_BUILD=yes USE_ICONV= yes -MAKE_ENV+= PORTCFLAGS="${CFLAGS}" +LDFLAGS+= -L${LOCALBASE}/lib +MAKE_ENV+= PORTCFLAGS="${CFLAGS} -I${LOCALBASE}/include" \ + PORTLDFLAGS="${LDFLAGS}" PORTDOCS= ACCOUNTD CMD_LINE DESIGN DONE DONE-OLD FEATURES ICONLIST \ - INSTALL LOGS NOTICE README ROADMAP SECURITY TODO URL_OPTIONS + INSTALL LOGS NOTICE README ROADMAP SECURITY TODO + +USE_RC_SUBR= prayer + +OPTIONS= SESSIONCACHE "Activate Session Cache" On + +MAN5= prayer.cf.5 +MAN8= prayer-session.8 prayer-ssl-prune.8 prayer.8 -post-extract: - @${FIND} ${WRKSRC} -depth -type d -name CVS -exec ${RM} -rf {} \; +.include <bsd.port.pre.mk> + +.if defined(WITH_SESSIONCACHE) +USE_BDB= yes +.endif pre-patch: - ${CP} ${WRKSRC}/defaults/Config ${WRKSRC}/Config - -do-configure: - @${SED} -e "s=%%PREFIX%%=${PREFIX}=" ${FILESDIR}/prayer.sh \ - > ${WRKSRC}/prayer.sh -.if defined(PRAYER_WITHOUT_SESSION_CACHE) - ${REINPLACE_CMD} \ - -e 's|SESSION_CACHE_ENABLE = true |SESSION_CACHE_ENABLE = false|' \ - -e 's|/usr/local/prayer|${PREFIX}/prayer|' \ - ${WRKSRC}/Config + @${CP} ${WRKSRC}/defaults/Config ${WRKSRC}/Config + +post-patch: + # correct chroot + @${REINPLACE_CMD} "s#\"/chroot/prayer\"#config->var_prefix#" ${WRKSRC}/servers/prayer_chroot.c + # change the user in the default config + @${REINPLACE_CMD} "s#prayer_user = \"prayer\"#prayer_user = \"_prayer\"#" ${WRKSRC}/files/etc/prayer.cf.SRC + @${REINPLACE_CMD} "s#%%PREFIX%%#${PREFIX}#" ${WRKSRC}/Config + +post-configure: +.if defined(WITH_SESSIONCACHE) + @${REINPLACE_CMD} "s#^DB_INCLUDE=.*#DB_INCLUDE=-I${BDB_INCLUDE_DIR}#" ${WRKSRC}/Config + @${REINPLACE_CMD} "s#^DB_LIBS=.*#DB_LIBS=-L${BDB_LIB_DIR} -l${BDB_LIB_NAME}#" ${WRKSRC}/Config +.else + @${REINPLACE_CMD} "s#^SESSION_CACHE_ENABLE = true#SESSION_CACHE_ENABLE = false#" ${WRKSRC}/Config .endif + @${REINPLACE_CMD} "s#^RW_USER = prayer#RW_USER = _prayer#" ${WRKSRC}/Config pre-install: - if ! pw groupshow prayer; then pw groupadd prayer; fi - if ! pw usershow prayer; then pw useradd prayer -g prayer \ - -h - -d /nonexistent -s /nonexistent -c "Prayer Webmail"; fi - ${MKDIR} ${PREFIX}/prayer - ${INSTALL_SCRIPT} ${WRKSRC}/prayer.sh \ - ${LOCALBASE}/etc/rc.d/prayer.sh.sample + @${MKDIR} ${PREFIX}/etc/prayer + @${SH} ${PKGINSTALL} ${PORTNAME} PRE-INSTALL post-install: .if !defined(NOPORTDOCS) @@ -59,4 +69,4 @@ post-install: @cd ${WRKSRC}/docs && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR} .endif -.include <bsd.port.mk> +.include <bsd.port.post.mk> diff --git a/mail/prayer/distinfo b/mail/prayer/distinfo index 299fceeee99c..64448be67177 100644 --- a/mail/prayer/distinfo +++ b/mail/prayer/distinfo @@ -1,3 +1,3 @@ -MD5 (prayer-1.1.0.tar.gz) = 3a65b0db709146a160a5dc23510c767a -SHA256 (prayer-1.1.0.tar.gz) = 4cff355aa3847aa8c0816d2be433567eb106f2cd031b4606323bdbe37d2698bd -SIZE (prayer-1.1.0.tar.gz) = 576023 +MD5 (prayer-1.3.1.tar.gz) = 5b124c7ac901e3425cc12884de39d6b3 +SHA256 (prayer-1.3.1.tar.gz) = 77b2791973eda7831c72bf22a1177e5bea024c3e1b238677be43763a38cdd651 +SIZE (prayer-1.3.1.tar.gz) = 706034 diff --git a/mail/prayer/files/patch-Config b/mail/prayer/files/patch-Config index f8c621381eb8..f86a591e0e5c 100644 --- a/mail/prayer/files/patch-Config +++ b/mail/prayer/files/patch-Config @@ -1,6 +1,6 @@ ---- Config.orig 2008-04-16 00:43:56.000000000 -0800 -+++ Config 2008-04-16 00:44:36.000000000 -0800 -@@ -28,7 +28,7 @@ +--- Config.orig 2009-03-16 00:51:45.000000000 +0800 ++++ Config 2009-03-16 00:52:23.000000000 +0800 +@@ -27,31 +27,31 @@ ############################################################################ # Location of compiler @@ -9,33 +9,51 @@ # Location of make program (GNU make required) MAKE = gmake # Location of install program (GNU install or compatible required) -@@ -37,9 +37,10 @@ - # Base Compiler options for GCC. - #BASECFLAGS = -Wall -g - #BASELDFLAGS = -g --BASECFLAGS = -Wall -g -O2 -+#BASECFLAGS = -Wall -g -O2 -+BASECFLAGS = -Wall -g ${PORTCFLAGS} - BASELDFLAGS = -g -O2 + INSTALL = install + +-# Base Compiler options for GCC (use CPPFLAGS and LDFLAGS if passed in) +-ifdef CPPFLAGS +- BASECFLAGS = $(CPPFLAGS) ++# Base Compiler options for GCC (use PORTCFLAGS and LDFLAGS if passed in) ++ifdef PORTCFLAGS ++ BASECFLAGS = $(PORTCFLAGS) + else + BASECFLAGS = -Wall -g -O2 + endif + ifdef INCLUDES + BASECFLAGS += $(INCLUDES) + endif +-ifdef LDFLAGS +- BASELDFLAGS = $(LDFLAGS) ++ifdef PORTLDFLAGS ++ BASELDFLAGS = $(PORTLDFLAGS) + else + BASELDFLAGS = -g + endif + + # Minimal libraries needed by Linux -BASE_LIBS = -lcrypt -+BASE_LIBS = -lcrypt -liconv ++# BASE_LIBS = -lcrypt + # FreeBSD needs some extra libraries: +-# BASE_LIBS = -lcrypt -liconv -lutil ++BASE_LIBS = -lcrypt -liconv -lutil + # Solaris needs even more libararies: + # BASE_LIBS = -lcrypt -lxnet -lnsl -lsocket - # Base Compiler options for Sun SUNWspro compiler - #CC = /opt/SUNWspro/bin/cc -@@ -58,9 +59,9 @@ +@@ -71,9 +71,9 @@ # which points to ../../imap/c-client. This just reduces the amount of # noise output on each line when building the package. # --CCLIENT_DIR=./c-client +-CCLIENT_DIR=../c-client -CCLIENT_INCLUDE=-I $(CCLIENT_DIR) -CCLIENT_LIBS=./$(CCLIENT_DIR)/c-client.a -+#CCLIENT_DIR=./c-client ++#CCLIENT_DIR=../c-client +#CCLIENT_INCLUDE=-I $(CCLIENT_DIR) +#CCLIENT_LIBS=./$(CCLIENT_DIR)/c-client.a - CCLIENT_SSL_ENABLE = true # -@@ -80,12 +81,14 @@ + # Following works with imap-devel RPM package from Redhat 7. +@@ -92,12 +92,14 @@ # Following works with the mail/cclient port from FreeBSD # #CCLIENT_INCLUDE = -I/usr/local/include/c-client @@ -51,7 +69,7 @@ #CCLIENT_KERB_ENABLE = true ############################################################################ -@@ -99,7 +102,7 @@ +@@ -111,7 +113,7 @@ Z_LIBS = -lz # LDAP (required if LDAP_ENABLE set) @@ -60,7 +78,7 @@ LDAP_LIBS = -lldap # Pam (required if CCLIENT_PAM_ENABLE set) -@@ -128,12 +131,12 @@ +@@ -140,12 +142,12 @@ # DB definitions (required if SESSION_CACHE_ENABLE set) # # Following suitable for Redhat Linux which has DB 3 preinstalled @@ -77,3 +95,22 @@ ############################################################################ +@@ -166,7 +168,7 @@ + # Default configuration and permissions does not allow prayer user to + # update prayer configuration file. + +-PREFIX = /usr/local/prayer ++PREFIX = %%PREFIX%%/prayer + RO_USER = root + RO_GROUP = prayer + +@@ -181,8 +183,8 @@ + PRIVATE_FILE = 0640 + + # Location of configuration files and binaries +-PRAYER_CONFIG_FILE = ${PREFIX}/etc/prayer.cf ++PRAYER_CONFIG_FILE = %%PREFIX%%/etc/prayer/prayer.cf +-BIN_DIR = ${PREFIX}/sbin ++BIN_DIR = %%PREFIX%%/sbin +-ACCOUNTD_CONFIG_FILE = ${PREFIX}/etc/prayer-accountd.cf ++ACCOUNTD_CONFIG_FILE = %%PREFIX%%/etc/prayer/accountd.cf diff --git a/mail/prayer/files/patch-prayer-mydb.c b/mail/prayer/files/patch-lib-mydb.c index e962244c01a3..9cd1d0017133 100644 --- a/mail/prayer/files/patch-prayer-mydb.c +++ b/mail/prayer/files/patch-lib-mydb.c @@ -1,5 +1,5 @@ ---- prayer/mydb.c.orig Thu Feb 17 23:09:40 2005 -+++ prayer/mydb.c Thu Feb 17 23:06:11 2005 +--- lib/mydb.c.orig Thu Feb 17 23:09:40 2005 ++++ lib/mydb.c Thu Feb 17 23:06:11 2005 @@ -49,12 +49,12 @@ #include <string.h> #include <stdio.h> diff --git a/mail/prayer/files/patch-man-Makefile b/mail/prayer/files/patch-man-Makefile new file mode 100644 index 000000000000..ab8e8e273a74 --- /dev/null +++ b/mail/prayer/files/patch-man-Makefile @@ -0,0 +1,22 @@ +--- man/Makefile.orig 2009-03-16 13:46:41.000000000 +0800 ++++ man/Makefile 2009-03-16 13:46:56.000000000 +0800 +@@ -20,12 +20,12 @@ + PUBLIC_EXEC=$(PUBLIC_FILE) PRIVATE_EXEC=$(PRIVATE_EXEC) \ + BIN_DIR=$(BIN_DIR) INSTALL=$(INSTALL) \ + +- mkdir -p $(BROOT)$(PREFIX)/man +- mkdir -p $(BROOT)$(PREFIX)/man/man5 +- mkdir -p $(BROOT)$(PREFIX)/man/man8 ++ mkdir -p $(BROOT)$(MANPREFIX)/man ++ mkdir -p $(BROOT)$(MANPREFIX)/man/man5 ++ mkdir -p $(BROOT)$(MANPREFIX)/man/man8 + +- $(INSTALL) prayer.cf.5 $(BROOT)$(PREFIX)/man/man5 +- $(INSTALL) prayer.8 $(BROOT)$(PREFIX)/man/man8 +- $(INSTALL) prayer-session.8 $(BROOT)$(PREFIX)/man/man8 +- $(INSTALL) prayer-ssl-prune.8 $(BROOT)$(PREFIX)/man/man8 ++ $(INSTALL) prayer.cf.5 $(BROOT)$(MANPREFIX)/man/man5 ++ $(INSTALL) prayer.8 $(BROOT)$(MANPREFIX)/man/man8 ++ $(INSTALL) prayer-session.8 $(BROOT)$(MANPREFIX)/man/man8 ++ $(INSTALL) prayer-ssl-prune.8 $(BROOT)$(MANPREFIX)/man/man8 + diff --git a/mail/prayer/files/patch-os_bsd.c b/mail/prayer/files/patch-os_bsd.c deleted file mode 100644 index 7b88e9b19af8..000000000000 --- a/mail/prayer/files/patch-os_bsd.c +++ /dev/null @@ -1,18 +0,0 @@ ---- prayer/os_bsd.c.orig 2008-04-09 12:58:30.000000000 -0800 -+++ prayer/os_bsd.c 2008-04-16 00:23:36.000000000 -0800 -@@ -576,14 +576,7 @@ - void - os_limit_vm(unsigned long x) - { -- struct rlimit rl; -- rlim_t y = (rlim_t)x; -- -- rl.rlim_cur = y; -- rl.rlim_max = y; -- if (setrlimit(RLIMIT_DATA, &rl) < 0) { -- log_misc("setrlimit: Unable to set vm limit to %ld: %m", x); -- } -+ /* Linux specific */ - } - - void diff --git a/mail/prayer/files/patch-servers-Makefile b/mail/prayer/files/patch-servers-Makefile new file mode 100644 index 000000000000..2d3383e821dc --- /dev/null +++ b/mail/prayer/files/patch-servers-Makefile @@ -0,0 +1,11 @@ +--- servers/Makefile.orig 2009-03-16 22:51:20.000000000 +0800 ++++ servers/Makefile 2009-03-16 22:51:25.000000000 +0800 +@@ -98,8 +98,6 @@ + -rm -f $(BIN) core *.o *.flc *~ \#*\# + + install: all +- $(INSTALL) -o $(RO_USER) -g $(RO_GROUP) -m $(PUBLIC_DIR) -d \ +- $(BROOT)$(BIN_DIR) + $(INSTALL) -o $(RO_USER) -g $(RO_GROUP) -m $(PUBLIC_EXEC) \ + prayer $(BROOT)$(BIN_DIR) + $(INSTALL) -o $(RO_USER) -g $(RO_GROUP) -m $(PUBLIC_EXEC) \ diff --git a/mail/prayer/files/patch-templates-remove-url-prefix b/mail/prayer/files/patch-templates-remove-url-prefix new file mode 100644 index 000000000000..85f6f2a20c18 --- /dev/null +++ b/mail/prayer/files/patch-templates-remove-url-prefix @@ -0,0 +1,184 @@ +diff -Naur templates.orig/cam/frontend_compose_timeout.t templates/cam/frontend_compose_timeout.t +--- templates.orig/cam/frontend_compose_timeout.t 2008-10-14 10:07:08.000000000 +0200 ++++ templates/cam/frontend_compose_timeout.t 2009-03-13 12:18:28.859721000 +0100 +@@ -46,7 +46,7 @@ + </div> + </form> + +-<p><a href="<% $url_prefix |n %>/login/<% $user |u %>">\ ++<p><a href="/login/<% $user |u %>">\ + Click here to login again</a></p> + % CALL container_end + % CALL footer +diff -Naur templates.orig/cam/frontend_login_error.t templates/cam/frontend_login_error.t +--- templates.orig/cam/frontend_login_error.t 2008-10-14 10:07:08.000000000 +0200 ++++ templates/cam/frontend_login_error.t 2009-03-13 12:18:54.133542000 +0100 +@@ -12,10 +12,10 @@ + % ENDIF + + % IFDEF $user +-<p>Please <a href="<% $url_prefix |n %>/login/<% $user |u %>">\ ++<p>Please <a href="/login/<% $user |u %>">\ + try again</a></p> + % ELSE +-<p>Please <a href="<% $url_prefix |n %>/">try again</a></p> ++<p>Please <a href="/">try again</a></p> + % ENDIF + + % CALL container_end +diff -Naur templates.orig/cam/frontend_security.t templates/cam/frontend_security.t +--- templates.orig/cam/frontend_security.t 2008-10-02 09:01:56.000000000 +0200 ++++ templates/cam/frontend_security.t 2009-03-13 12:19:23.592170000 +0100 +@@ -5,7 +5,7 @@ + <h2>Security Alert</h2> + + <p>Login request did not come from +- <a href = "<% $url_prefix |n %>"><% $url_prefix |h %></a></p> ++ <a href = "/"><% $url_prefix |h %></a></p> + + % CALL container_end + % CALL footer +diff -Naur templates.orig/cam/frontend_session.t templates/cam/frontend_session.t +--- templates.orig/cam/frontend_session.t 2008-10-14 10:07:08.000000000 +0200 ++++ templates/cam/frontend_session.t 2009-03-13 12:19:42.839703000 +0100 +@@ -4,7 +4,7 @@ + % CALL container_start + <h3>Couldn't connect to Webmail session server</h3> + +-<p><a href="<% $url_prefix |n %>/login/<% $user |u %>">\ ++<p><a href="/login/<% $user |u %>">\ + Try again</a> later</p> + % CALL container_end + % CALL footer +diff -Naur templates.orig/cam/frontend_timeout.t templates/cam/frontend_timeout.t +--- templates.orig/cam/frontend_timeout.t 2008-10-14 10:07:08.000000000 +0200 ++++ templates/cam/frontend_timeout.t 2009-03-13 12:19:55.817016000 +0100 +@@ -4,7 +4,7 @@ + % CALL container_start + <h3>Couldn't connect to session. Maybe it timed out?</h3> + +-<p><a href="<% $url_prefix |n %>/login/<% $user |u %>">\ ++<p><a href="/login/<% $user |u %>">\ + Click here to login again</a></p> + % CALL container_end + % CALL footer +diff -Naur templates.orig/cam/login.t templates/cam/login.t +--- templates.orig/cam/login.t 2008-10-07 10:36:43.000000000 +0200 ++++ templates/cam/login.t 2009-03-13 12:20:17.892743000 +0100 +@@ -82,7 +82,7 @@ + </table> + % ENDIF + <form method="post" accept-charset="UTF-8" enctype="multipart/form-data" +- action="<% ${url_prefix} |n %>" class="lookup" id="credentials"> ++ action="/" class="lookup" id="credentials"> + <fieldset> + <div> + <table id="login"><tr> +diff -Naur templates.orig/cam/login_hermes.t templates/cam/login_hermes.t +--- templates.orig/cam/login_hermes.t 2008-10-27 12:43:06.000000000 +0100 ++++ templates/cam/login_hermes.t 2009-03-13 12:20:36.756388000 +0100 +@@ -106,7 +106,7 @@ + </table> + % ENDIF + <form method="post" accept-charset="UTF-8" enctype="multipart/form-data" +- action="<% ${url_prefix} |n %>" class="lookup" id="credentials"> ++ action="/" class="lookup" id="credentials"> + <fieldset> + <div> + % IFDEF $raven_enable +diff -Naur templates.orig/cam/raven_blocked.t templates/cam/raven_blocked.t +--- templates.orig/cam/raven_blocked.t 2008-09-16 12:52:45.000000000 +0200 ++++ templates/cam/raven_blocked.t 2009-03-13 12:21:04.147607000 +0100 +@@ -7,7 +7,7 @@ + <p>Raven logins have been disabled for this account. You will need to log + in using the normal <% $g_service_name |h %> username and password</p> + +-<p><a href="<% $url_prefix |n %>/login/<% $username |u %>">Click here</a> ++<p><a href="/login/<% $username |u %>">Click here</a> + to return to the login screen</p> + % CALL container_end + % CALL footer +diff -Naur templates.orig/old/frontend_compose_timeout.t templates/old/frontend_compose_timeout.t +--- templates.orig/old/frontend_compose_timeout.t 2008-10-14 10:07:08.000000000 +0200 ++++ templates/old/frontend_compose_timeout.t 2009-03-13 12:25:09.617868000 +0100 +@@ -45,7 +45,7 @@ + </div> + </form> + +-<p><a href="<% $url_prefix |n %>/login/<% $user |u %>">\ ++<p><a href="/login/<% $user |u %>">\ + Click here</a> to login again</p> + + % CALL footer +diff -Naur templates.orig/old/frontend_login_error.t templates/old/frontend_login_error.t +--- templates.orig/old/frontend_login_error.t 2008-10-14 10:07:08.000000000 +0200 ++++ templates/old/frontend_login_error.t 2009-03-13 12:27:01.925958000 +0100 +@@ -11,9 +11,9 @@ + % ENDIF + + % IFDEF $user +-<p>Please <a href="<% $url_prefix |n %>/login/<% $user |u %>">\ ++<p>Please <a href="/login/<% $user |u %>">\ + try again</a></p> + % ELSE +-<p>Please <a href="<% $url_prefix |n %>/">try again</a></p> ++<p>Please <a href="/">try again</a></p> + % ENDIF + % CALL footer +diff -Naur templates.orig/old/frontend_security.t templates/old/frontend_security.t +--- templates.orig/old/frontend_security.t 2008-10-02 09:01:57.000000000 +0200 ++++ templates/old/frontend_security.t 2009-03-13 12:27:52.204673000 +0100 +@@ -4,6 +4,6 @@ + <h2>Security Alert</h2> + + <p>Login request did not come from +- <a href = "<% $url_prefix |n %>"><% $url_prefix |h %></a></p> ++ <a href = "/"><% $url_prefix |h %></a></p> + + % CALL footer +diff -Naur templates.orig/old/frontend_session.t templates/old/frontend_session.t +--- templates.orig/old/frontend_session.t 2008-10-14 10:07:08.000000000 +0200 ++++ templates/old/frontend_session.t 2009-03-13 12:28:05.778814000 +0100 +@@ -3,6 +3,6 @@ + % CALL header + <h3>Couldn't connect to Webmail session server</h3> + +-<p><a href="<% $url_prefix |n %>/login/<% $user |u %>">\ ++<p><a href="/login/<% $user |u %>">\ + Try again</a> later</p> + % CALL footer +diff -Naur templates.orig/old/frontend_timeout.t templates/old/frontend_timeout.t +--- templates.orig/old/frontend_timeout.t 2008-10-14 10:07:08.000000000 +0200 ++++ templates/old/frontend_timeout.t 2009-03-13 12:28:24.240569000 +0100 +@@ -3,6 +3,6 @@ + % CALL header + <h3>Couldn't connect to session. Maybe it timed out?</h3> + +-<p><a href="<% $url_prefix |n %>/login/<% $user |u %>">\ ++<p><a href="/login/<% $user |u %>">\ + Click here</a> to login again</p> + % CALL footer +diff -Naur templates.orig/old/login.t templates/old/login.t +--- templates.orig/old/login.t 2008-10-02 09:01:57.000000000 +0200 ++++ templates/old/login.t 2009-03-13 12:28:39.815144000 +0100 +@@ -37,7 +37,7 @@ + % ENDIF + % + <form method="post" accept-charset="UTF-8" enctype="multipart/form-data" +- action="<% ${url_prefix} |n %>" id="credentials"> ++ action="/" id="credentials"> + <table cellpadding="5"> + <tr> + <td>Username</td> +diff -Naur templates.orig/old/raven_blocked.t templates/old/raven_blocked.t +--- templates.orig/old/raven_blocked.t 2008-09-16 12:52:48.000000000 +0200 ++++ templates/old/raven_blocked.t 2009-03-13 12:28:57.300178000 +0100 +@@ -6,7 +6,7 @@ + <p>Raven logins have been disabled for this account. You will need to log + in using the normal <% $g_service_name |h %> username and password</p> + +-<p><a href="<% $url_prefix |n %>/login/<% $username |u %>">Click here</a> ++<p><a href="/login/<% $username |u %>">Click here</a> + to return to the login screen</p> + + % CALL footer diff --git a/mail/prayer/files/prayer.in b/mail/prayer/files/prayer.in new file mode 100644 index 000000000000..529a1a62fd52 --- /dev/null +++ b/mail/prayer/files/prayer.in @@ -0,0 +1,52 @@ +#!/bin/sh + +# PROVIDE: prayer +# REQUIRE: LOGIN +# +# Add the following lines to /etc/rc.conf.local or /etc/rc.conf +# to enable this service: +# +# prayer_enable (bool): Set to NO by default. +# prayer_chrooted (bool): Set to NO by default. +# Force prayer to be executed in chrooted +# prayer_prefork (bool): Set to NO by default. +# Allow prayer to prefork itself at startup +# + +. %%RC_SUBR%% + +name="prayer" +rcvar=${name}_enable + +command=%%PREFIX%%/sbin/${name} +pidfile="/var/spool/prayer/pid/${name}.pid" + +start_precmd="prayer_prestart" +stop_postcmd="prayer_poststop" + +load_rc_config $name + +: ${prayer_enable="NO"} +: ${prayer_chrooted="NO"} +: ${prayer_prefork="NO"} + +prayer_prestart() +{ + if checkyesno prayer_enable; then + if checkyesno prayer_chrooted; then + echo "Chroot no fully functionnal for now so not activated" + # command=/usr/local/sbin/${name}-chroot + fi + if ! checkyesno prayer_prefork; then + command_args="--disable-prefork" + fi + fi + return 0 +} + +prayer_poststop() +{ + kill -15 `head -1 /var/spool/prayer/pid/${name}-session.pid` +} + +run_rc_command "$1" diff --git a/mail/prayer/files/prayer.sh b/mail/prayer/files/prayer.sh deleted file mode 100644 index f0f6ccb99979..000000000000 --- a/mail/prayer/files/prayer.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ -# -if ! test -x %%PREFIX%%/prayer/sbin/prayer -then - exit 0 -fi -# -case "$1" in -start) - %%PREFIX%%/prayer/sbin/prayer && - echo -n ' prayer' - ;; -stop) - for i in \ - /var/spool/prayer/pid/prayer-session \ - /var/spool/prayer/pid/prayer - do - if test -e ${i} - then - kill `head -1 ${i}` - rm -f "${i}" - fi - done - killall prayer-session - killall prayer - echo -n ' prayer' - ;; -restart) - $0 stop - $0 start - ;; -*) - echo "Usage: ${0##*/}: { start | stop | restart }" >&2 - exit 64 - ;; -esac diff --git a/mail/prayer/pkg-install b/mail/prayer/pkg-install new file mode 100644 index 000000000000..c3a8a50581bc --- /dev/null +++ b/mail/prayer/pkg-install @@ -0,0 +1,35 @@ +#!/bin/sh + +PATH=/bin:/usr/sbin + +USER=_prayer +GROUP=prayer +UID=917 +GID=917 + +case $2 in + PRE-INSTALL) + if pw group show "$GROUP" 2>/dev/null;then + echo "You already have a group \"${GROUP}\", so I will use it." + else + if pw groupadd "${GROUP}" -g ${GID};then + echo "Added group \"${GROUP}\"." + else + echo "Adding group \"${GROUP}\" failed..." + exit 1 + fi + fi + if pw user show "${USER}" 2>/dev/null; then + echo "You already have a user \"${USER}\", so I will use it." + else + if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \ + -s /sbin/nologin -L daemon -d /nonexistent -c "Prayer Account" + then + echo "Added user \"${USER}\"." + else + echo "Adding user \"${USER}\" failed..." + exit 1 + fi + fi + ;; +esac diff --git a/mail/prayer/pkg-plist b/mail/prayer/pkg-plist index ab964dda75fe..ec45657cd1b0 100644 --- a/mail/prayer/pkg-plist +++ b/mail/prayer/pkg-plist @@ -1,51 +1,42 @@ -@exec if ! pw groupshow prayer; then pw groupadd prayer; fi -@exec if ! pw usershow prayer; then pw useradd prayer -g prayer -h - -d /nonexistent -s /nonexistent -c "Prayer Webmail"; fi -etc/rc.d/prayer.sh.sample -prayer/help/compose/large.html -prayer/help/compose/normal.html -prayer/help/compose/postponed.html -prayer/help/compose/role_list.html -prayer/help/abook_add.html -prayer/help/abook_list.html -prayer/help/abook_lookup.html -prayer/help/abook_search.html -prayer/help/abook_take.html -prayer/help/abook_update.html -prayer/help/abook_xfer.html -prayer/help/attachments.html -prayer/help/block.html -prayer/help/copy.html -prayer/help/dictionary.html -prayer/help/display.html -prayer/help/favourites.html -prayer/help/filter.html -prayer/help/filter_select.html -prayer/help/folders.html -prayer/help/fullname.html -prayer/help/include.html -prayer/help/list.html -prayer/help/manage.html -prayer/help/passwd.html -prayer/help/quota.html -prayer/help/rename.html -prayer/help/redirect.html -prayer/help/reply.html -prayer/help/roles_entry.html -prayer/help/roles_list.html -prayer/help/search.html -prayer/help/sieve.html -prayer/help/spam.html -prayer/help/toolbar.html -prayer/help/transfer.html -prayer/help/upload_select.html -prayer/help/vacation.html -prayer/help/vaclog.html -prayer/help/welcome.html -prayer/help/prefs/compose1.html -prayer/help/prefs/compose2.html -prayer/help/prefs/display1.html -prayer/help/prefs/folder.html -prayer/help/prefs/general.html +prayer/icons/bg-home-menu-top.gif +prayer/icons/bg-nav-primary.gif +prayer/icons/bg-tab-left-active.gif +prayer/icons/bg-tab-left-over.gif +prayer/icons/bg-tab-left.gif +prayer/icons/bg-tab-right-active.gif +prayer/icons/bg-tab-right-over.gif +prayer/icons/bg-tab-right.gif +prayer/icons/button-search.gif +prayer/icons/button2-bm.png +prayer/icons/divider-site-tools-small.gif +prayer/icons/icon-alert-normal.gif +prayer/icons/icon-alert-warning.gif +prayer/icons/icon-arrow-home-menu-orange.gif +prayer/icons/icon-arrow-home-menu.gif +prayer/icons/icon-arrow-nav-breadcrumb.gif +prayer/icons/icon-arrow-nav-primary-down.gif +prayer/icons/icon-arrow-nav-primary-up.gif +prayer/icons/icon-arrow-nav-primary.gif +prayer/icons/icon-home.gif +prayer/icons/icon-quick-links.gif +prayer/icons/icon-section.gif +prayer/icons/identifier.gif +prayer/icons/identifier800.gif +prayer/icons/ifmlogo-small.gif +prayer/icons/ifmlogo.gif +prayer/icons/msg-seen.png +prayer/icons/next-white.gif +prayer/icons/next.gif +prayer/icons/prev-white.gif +prayer/icons/previous.gif +prayer/icons/raven.gif +prayer/icons/rssfeed.gif +prayer/icons/sort-d.gif +prayer/icons/sort-u.gif +prayer/icons/srssfeed.gif +prayer/icons/ucs-id-small.jpg +prayer/icons/ucs-s.gif +prayer/icons/ucs.gif prayer/icons/addressbook-inactive.gif prayer/icons/addressbook.gif prayer/icons/back.gif @@ -83,26 +74,44 @@ prayer/icons/rightright-inactive.gif prayer/icons/rightright.gif prayer/icons/tick.gif prayer/icons/univheader.gif -prayer/etc/prayer.cf-dist -prayer/etc/prayer-accountd.cf-dist +prayer/static/blue.css +prayer/static/camstyle.css +prayer/static/common.css +prayer/static/content.css +prayer/static/forms.css +prayer/static/gray.css +prayer/static/green.css +prayer/static/help.css +prayer/static/high.css +prayer/static/ie6.css +prayer/static/ie7.css +prayer/static/layout.css +prayer/static/links.css +prayer/static/minmax.js +prayer/static/print.css +prayer/static/reset.css +prayer/static/rssfeed.css +prayer/static/typography.css +prayer/static/yellow.css +etc/prayer/prayer.cf-dist +etc/prayer/accountd.cf-dist prayer/etc/motd.html -prayer/etc/welcome.html -prayer/sbin/prayer -prayer/sbin/prayer-db-prune -prayer/sbin/prayer-session -prayer/sbin/prayer-ssl-prune -prayer/sbin/prayer-sem-prune -prayer/sbin/prayer-cyclog -prayer/sbin/prayer-chroot -@dirrm prayer/help/compose -@dirrm prayer/help/prefs -@dirrm prayer/help +sbin/prayer +sbin/prayer-db-prune +sbin/prayer-session +sbin/prayer-ssl-prune +sbin/prayer-sem-prune +sbin/prayer-cyclog +sbin/prayer-chroot +@dirrm prayer/static @dirrm prayer/icons @dirrm prayer/etc @exec mkdir -p %D/prayer/certs @dirrm prayer/certs -@dirrm prayer/sbin @dirrm prayer +@exec mkdir -p %D/etc/prayer +@dirrmtry etc/prayer @exec mkdir -p /var/spool/prayer -@exec chown -R prayer:prayer /var/spool/prayer +@exec chown -R _prayer:prayer /var/spool/prayer @dirrmtry /var/spool/prayer +@stopdaemon prayer |