summary refs log tree commit diff
path: root/pkgs/servers/prayer
diff options
context:
space:
mode:
authorLluís Batlle i Rossell <viric@vicerveza.homeunix.net>2011-11-08 21:07:57 +0000
committerLluís Batlle i Rossell <viric@vicerveza.homeunix.net>2011-11-08 21:07:57 +0000
commitd72fe9fee285829665108a73a0bf2f557b49d047 (patch)
tree3af4d48622a498fc77df04ae0ee1ffc4404a4d2a /pkgs/servers/prayer
parent4473afa29712c5c115dd75ba0998a07c98ad9140 (diff)
downloadnixpkgs-d72fe9fee285829665108a73a0bf2f557b49d047.tar
nixpkgs-d72fe9fee285829665108a73a0bf2f557b49d047.tar.gz
nixpkgs-d72fe9fee285829665108a73a0bf2f557b49d047.tar.bz2
nixpkgs-d72fe9fee285829665108a73a0bf2f557b49d047.tar.lz
nixpkgs-d72fe9fee285829665108a73a0bf2f557b49d047.tar.xz
nixpkgs-d72fe9fee285829665108a73a0bf2f557b49d047.tar.zst
nixpkgs-d72fe9fee285829665108a73a0bf2f557b49d047.zip
Adding prayer. It builds on linux x86_64, but I've not tried to run it.
svn path=/nixpkgs/trunk/; revision=30347
Diffstat (limited to 'pkgs/servers/prayer')
-rw-r--r--pkgs/servers/prayer/default.nix36
-rw-r--r--pkgs/servers/prayer/install.patch170
2 files changed, 206 insertions, 0 deletions
diff --git a/pkgs/servers/prayer/default.nix b/pkgs/servers/prayer/default.nix
new file mode 100644
index 00000000000..c67d2c8a010
--- /dev/null
+++ b/pkgs/servers/prayer/default.nix
@@ -0,0 +1,36 @@
+{ stdenv, fetchurl, perl, openssl, db4, zlib, uwimap, htmlTidy, pam}:
+
+let
+  ssl = stdenv.lib.optionals uwimap.withSSL
+    "-e 's/CCLIENT_SSL_ENABLE.*= false/CCLIENT_SSL_ENABLE=true/'";
+in
+stdenv.mkDerivation rec {
+  name = "prayer-1.3.4";
+  
+  src = fetchurl {
+    url = "ftp://ftp.csx.cam.ac.uk/pub/software/email/prayer/${name}.tar.gz";
+    sha256 = "0a2nmrlwdq4n5019j3mw2xbbc61s7sssjih5ql6r5rvyrrr48szc";
+  };
+
+  buildInputs = [ openssl db4 zlib uwimap htmlTidy pam ];
+  buildNativeInputs = [ perl ];
+
+  NIX_LDFLAGS = "-lpam";
+
+  patches = [ ./install.patch ];
+  postPatch = ''
+    sed -i -e s/gmake/make/ -e 's/LDAP_ENABLE.*= true/LDAP_ENABLE=false/' \
+      ${ssl} \
+      -e 's/CCLIENT_LIBS=.*/CCLIENT_LIBS=-lc-client/' \
+      -e 's,^PREFIX .*,PREFIX='$out, \
+      Config
+    sed -i -e s,/usr/bin/perl,${perl}/bin/perl, \
+      templates/src/*.pl
+  '';
+
+  meta = {
+    homepage = http://www-uxsup.csx.cam.ac.uk/~dpc22/prayer/;
+    description = "Yet another Webmail interface for IMAP servers on Unix systems written in C";
+    license = "GPLv2+";
+  };
+}
diff --git a/pkgs/servers/prayer/install.patch b/pkgs/servers/prayer/install.patch
new file mode 100644
index 00000000000..439202dd955
--- /dev/null
+++ b/pkgs/servers/prayer/install.patch
@@ -0,0 +1,170 @@
+diff --git a/accountd/Makefile b/accountd/Makefile
+index c3e8107..7946776 100644
+--- a/accountd/Makefile
++++ b/accountd/Makefile
+@@ -75,6 +75,6 @@ clean:
+ 	-rm -f prayer-accountd test core *.o *~ \#*\# 
+ 
+ install:
+-	$(INSTALL) -m 755 -o ${RO_USER} -g ${RW_GROUP} \
++	$(INSTALL) -m 755 \
+ 	prayer-accountd ${BROOT}${BIN_DIR}
+ 
+diff --git a/files/Makefile b/files/Makefile
+index 743d0ed..7eff064 100644
+--- a/files/Makefile
++++ b/files/Makefile
+@@ -52,20 +52,20 @@ distclean:
+ 
+ install-cert:
+ 	if [ -f certs/prayer.pem ]; then \
+-	$(INSTALL) -o $(RO_USER) -g $(RO_GROUP) \
++	$(INSTALL) \
+ 	-m $(PRIVATE_FILE) certs/prayer.pem ${BROOT}${PREFIX}/certs; \
+ 	fi
+ 
+ install-config: etc/prayer.cf
+-	$(INSTALL) -D -o $(RO_USER) -g $(RO_GROUP) -m $(PUBLIC_FILE) \
++	$(INSTALL) -D -m $(PUBLIC_FILE) \
+ 	etc/prayer.cf ${BROOT}${PRAYER_CONFIG_FILE}
+ 
+ install-aconfig:
+-	$(INSTALL) -D -o $(RO_USER) -g $(RO_GROUP) -m $(PUBLIC_FILE) \
++	$(INSTALL) -D -m $(PUBLIC_FILE) \
+ 	etc/prayer-accountd.cf ${BROOT}${ACCOUNTD_CONFIG_FILE}
+ 
+ install-motd:
+-	$(INSTALL) -o $(RO_USER) -g $(RO_GROUP) -m $(PUBLIC_FILE) \
++	$(INSTALL) -m $(PUBLIC_FILE) \
+ 	etc/motd.html ${BROOT}${PREFIX}/etc
+ 
+ install:
+@@ -83,6 +83,6 @@ install:
+ 	if [ ! -f $(BROOT)$(PREFIX)/etc/motd.html ]; then $(MAKE) install-motd; fi
+ 
+ redhat-install-init.d:
+-	install -D -o root -g root -m 755 \
++	install -D -m 755 \
+ 		./init.d/prayer $(BROOT)/etc/rc.d/init.d/prayer
+ 	#chkconfig prayer --level 2345 on
+diff --git a/files/install.sh b/files/install.sh
+index 8d1d1f4..0804a08 100755
+--- a/files/install.sh
++++ b/files/install.sh
+@@ -2,8 +2,6 @@
+ #
+ # $Cambridge: hermes/src/prayer/files/install.sh,v 1.7 2008/09/16 09:59:56 dpc22 Exp $
+ 
+-PATH=/bin:/sbin/:/usr/bin:/usr/sbin
+-
+ error=0
+ 
+ if [ "x$PREFIX" = "x" ]; then
+@@ -55,24 +53,20 @@ if [ $error != 0 ]; then
+     exit 1
+ fi
+ 
+-if [ ! -d ${VAR_PREFIX} -a `whoami` = "root" ]; then
+-    ${INSTALL} -d -o ${RW_USER} -g ${RW_GROUP} -m ${PRIVATE_DIR} ${VAR_PREFIX}
+-fi
+-
+ if [ ! -d ${PREFIX} ]; then
+-    ${INSTALL} -d -o ${RO_USER} -g ${RO_GROUP} -m ${PUBLIC_DIR} ${PREFIX}
++    ${INSTALL} -d -m ${PUBLIC_DIR} ${PREFIX}
+ fi
+ 
+ if [ ! -d ${PREFIX}/etc ]; then
+-    ${INSTALL} -d -o ${RO_USER} -g ${RO_GROUP} -m ${PUBLIC_DIR} ${PREFIX}/etc
++    ${INSTALL} -d -m ${PUBLIC_DIR} ${PREFIX}/etc
+ fi
+ 
+ if [ ! -d ${PREFIX}/certs ]; then
+-    ${INSTALL} -d -o ${RO_USER} -g ${RO_GROUP} -m ${PRIVATE_DIR} ${PREFIX}/certs
++    ${INSTALL} -d -m ${PRIVATE_DIR} ${PREFIX}/certs
+ fi
+ 
+ if [ ! -d ${BIN_DIR} ]; then
+-    ${INSTALL} -d -o ${RO_USER} -g ${RO_GROUP} -m ${PUBLIC_DIR} ${BIN_DIR}
++    ${INSTALL} -d -m ${PUBLIC_DIR} ${BIN_DIR}
+ fi
+ 
+ for i in icons static
+@@ -83,5 +77,4 @@ do
+     fi
+     echo Copying ${i}
+     (tar cf - ${i}) | (cd ${PREFIX} ; tar xf -)
+-    (cd ${PREFIX}; chown -R ${RO_USER}:${RO_GROUP} ${i})
+ done
+diff --git a/servers/Makefile b/servers/Makefile
+index 021aed5..5ccbd08 100644
+--- a/servers/Makefile
++++ b/servers/Makefile
+@@ -107,13 +107,13 @@ clean:
+ 	-rm -f $(BIN) core *.o *.flc *~ \#*\#
+ 
+ install: all
+-	$(INSTALL) -o $(RO_USER) -g $(RO_GROUP) -m $(PUBLIC_DIR) -d \
++	$(INSTALL) -m $(PUBLIC_DIR) -d \
+ 	  $(BROOT)$(BIN_DIR)
+-	$(INSTALL) -o $(RO_USER) -g $(RO_GROUP) -m $(PUBLIC_EXEC) \
++	$(INSTALL) -m $(PUBLIC_EXEC) \
+ 	  prayer           $(BROOT)$(BIN_DIR)
+-	$(INSTALL) -o $(RO_USER) -g $(RO_GROUP) -m $(PUBLIC_EXEC) \
++	$(INSTALL) -m $(PUBLIC_EXEC) \
+ 	  prayer-chroot           $(BROOT)$(BIN_DIR)
+-	$(INSTALL) -o $(RO_USER) -g $(RO_GROUP) -m $(PUBLIC_EXEC) \
++	$(INSTALL) -m $(PUBLIC_EXEC) \
+ 	  prayer-session   $(BROOT)$(BIN_DIR)
+ 
+ prayer: $(PRAYER_OBJS) prayer_main.o
+diff --git a/templates/cam/Makefile b/templates/cam/Makefile
+index 9f4122a..396b628 100644
+--- a/templates/cam/Makefile
++++ b/templates/cam/Makefile
+@@ -124,7 +124,7 @@ _template_index.c:
+ 	$(COMPILE) $(TYPE) $@ $*
+ 
+ install:
+-	$(INSTALL) -o $(RO_USER) -g $(RO_GROUP) -m $(PUBLIC_DIR) -d \
++	$(INSTALL) -m $(PUBLIC_DIR) -d \
+ 	  $(BROOT)$(PREFIX)/templates/$(TYPE)
+ 	cp *.t $(BROOT)$(PREFIX)/templates/$(TYPE)
+ 	cp *.vars $(BROOT)$(PREFIX)/templates/$(TYPE)
+diff --git a/templates/old/Makefile b/templates/old/Makefile
+index 31016cf..288a64c 100644
+--- a/templates/old/Makefile
++++ b/templates/old/Makefile
+@@ -123,7 +123,7 @@ _template_index.c:
+ 	$(COMPILE) $(TYPE) $@ $*
+ 
+ install:
+-	$(INSTALL) -o $(RO_USER) -g $(RO_GROUP) -m $(PUBLIC_DIR) -d \
++	$(INSTALL) -m $(PUBLIC_DIR) -d \
+ 	  $(BROOT)$(PREFIX)/templates/$(TYPE)
+ 	cp *.t $(BROOT)$(PREFIX)/templates/$(TYPE)
+ 	cp *.vars $(BROOT)$(PREFIX)/templates/$(TYPE)
+diff --git a/utils/Makefile b/utils/Makefile
+index 9c79916..ef82481 100644
+--- a/utils/Makefile
++++ b/utils/Makefile
+@@ -72,15 +72,15 @@ clean:
+ 	-rm -f $(BIN) core *.o *.flc *~ \#*\#
+ 
+ install: all
+-	$(INSTALL) -o $(RO_USER) -g $(RO_GROUP) -m $(PUBLIC_DIR) -d \
++	$(INSTALL) -m $(PUBLIC_DIR) -d \
+ 	  $(BROOT)$(BIN_DIR)
+-	$(INSTALL) -o $(RO_USER) -g $(RO_GROUP) -m $(PUBLIC_EXEC) \
++	$(INSTALL) -m $(PUBLIC_EXEC) \
+ 	  prayer-ssl-prune $(BROOT)$(BIN_DIR)
+-	$(INSTALL) -o $(RO_USER) -g $(RO_GROUP) -m $(PUBLIC_EXEC) \
++	$(INSTALL) -m $(PUBLIC_EXEC) \
+ 	  prayer-sem-prune $(BROOT)$(BIN_DIR)
+-	$(INSTALL) -o $(RO_USER) -g $(RO_GROUP) -m $(PUBLIC_EXEC) \
++	$(INSTALL) -m $(PUBLIC_EXEC) \
+ 	  prayer-db-prune $(BROOT)$(BIN_DIR)
+-	$(INSTALL) -o $(RO_USER) -g $(RO_GROUP) -m $(PUBLIC_EXEC) \
++	$(INSTALL) -m $(PUBLIC_EXEC) \
+ 	  prayer-cyclog    $(BROOT)$(BIN_DIR)
+ 
+ prayer-ssl-prune: $(PRUNE_OBJS)