mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 07:23:20 +00:00
Adding prayer. It builds on linux x86_64, but I've not tried to run it.
svn path=/nixpkgs/trunk/; revision=30347
This commit is contained in:
parent
4473afa297
commit
d72fe9fee2
36
pkgs/servers/prayer/default.nix
Normal file
36
pkgs/servers/prayer/default.nix
Normal file
@ -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+";
|
||||
};
|
||||
}
|
170
pkgs/servers/prayer/install.patch
Normal file
170
pkgs/servers/prayer/install.patch
Normal file
@ -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)
|
38
pkgs/tools/networking/uwimap/default.nix
Normal file
38
pkgs/tools/networking/uwimap/default.nix
Normal file
@ -0,0 +1,38 @@
|
||||
{stdenv, fetchurl, pam, openssl}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "uw-imap-2007";
|
||||
|
||||
src = fetchurl {
|
||||
url = "ftp://ftp.cac.washington.edu/imap/imap-2007f.tar.gz";
|
||||
sha256 = "0a2a00hbakh0640r2wdpnwr8789z59wnk7rfsihh3j0vbhmmmqak";
|
||||
};
|
||||
|
||||
makeFlags = "lnp"; # Linux with PAM modules
|
||||
|
||||
buildInputs = [ pam openssl ];
|
||||
|
||||
patchPhase = ''
|
||||
sed -i -e s,/usr/local/ssl,${openssl}, \
|
||||
src/osdep/unix/Makefile
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
ensureDir $out/bin $out/lib $out/include
|
||||
cp c-client/*.h c-client/linkage.c $out/include
|
||||
cp c-client/c-client.a $out/lib/libc-client.a
|
||||
cp mailutil/mailutil imapd/imapd dmail/dmail mlock/mlock mtest/mtest tmail/tmail \
|
||||
tools/{an,ua} $out/bin
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = http://www.washington.edu/imap/;
|
||||
description = "UW IMAP toolkit - IMAP-supporting software developed by the UW";
|
||||
license = "Apache2";
|
||||
platforms = with stdenv.lib.platforms; linux;
|
||||
};
|
||||
|
||||
passthru = {
|
||||
withSSL = true;
|
||||
};
|
||||
}
|
@ -5909,6 +5909,8 @@ let
|
||||
|
||||
powertop = callPackage ../os-specific/linux/powertop { };
|
||||
|
||||
prayer = callPackage ../servers/prayer { };
|
||||
|
||||
procps = callPackage ../os-specific/linux/procps { };
|
||||
|
||||
pwdutils = callPackage ../os-specific/linux/pwdutils { };
|
||||
@ -7416,6 +7418,8 @@ let
|
||||
|
||||
uucp = callPackage ../tools/misc/uucp { };
|
||||
|
||||
uwimap = callPackage ../tools/networking/uwimap { };
|
||||
|
||||
uzbl = builderDefsPackage (import ../applications/networking/browsers/uzbl) {
|
||||
inherit pkgconfig webkit makeWrapper;
|
||||
inherit (gtkLibs) gtk glib;
|
||||
|
Loading…
Reference in New Issue
Block a user