about summary refs log tree commit diff
path: root/pkgs/servers/http/myserver
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2009-08-21 10:20:40 +0000
committerLudovic Courtès <ludo@gnu.org>2009-08-21 10:20:40 +0000
commit4ad3ea41073ee52011a30a7520c98d6034b486a5 (patch)
tree564ad3aa289870daacb2708c2cebe788b6b23a8e /pkgs/servers/http/myserver
parenta56fecb1021085f88769497ebee6644a14f61b7a (diff)
downloadnixlib-4ad3ea41073ee52011a30a7520c98d6034b486a5.tar
nixlib-4ad3ea41073ee52011a30a7520c98d6034b486a5.tar.gz
nixlib-4ad3ea41073ee52011a30a7520c98d6034b486a5.tar.bz2
nixlib-4ad3ea41073ee52011a30a7520c98d6034b486a5.tar.lz
nixlib-4ad3ea41073ee52011a30a7520c98d6034b486a5.tar.xz
nixlib-4ad3ea41073ee52011a30a7520c98d6034b486a5.tar.zst
nixlib-4ad3ea41073ee52011a30a7520c98d6034b486a5.zip
Add GNU MyServer.
svn path=/nixpkgs/trunk/; revision=16801
Diffstat (limited to 'pkgs/servers/http/myserver')
-rw-r--r--pkgs/servers/http/myserver/TESTS.patch23
-rw-r--r--pkgs/servers/http/myserver/default.nix36
-rw-r--r--pkgs/servers/http/myserver/prefix.patch85
3 files changed, 144 insertions, 0 deletions
diff --git a/pkgs/servers/http/myserver/TESTS.patch b/pkgs/servers/http/myserver/TESTS.patch
new file mode 100644
index 000000000000..2308d811fc6d
--- /dev/null
+++ b/pkgs/servers/http/myserver/TESTS.patch
@@ -0,0 +1,23 @@
+This patch fixes the incorrect use of Automake's $(TESTS) in the
+top-level `Makefile.am'.
+
+--- myserver-0.9/Makefile.in	2009-08-10 19:00:59.000000000 +0200
++++ myserver-0.9/Makefile.in	2009-08-19 17:30:06.000000000 +0200
+@@ -243,14 +243,14 @@ target_vendor = @target_vendor@
+ top_build_prefix = @top_build_prefix@
+ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
+-@BUILD_TESTS_TRUE@TESTS = tests
++@BUILD_TESTS_TRUE@test_dir = tests
+ @BUILD_DOC_TRUE@DOCS = documentation
+ am__aclocal_m4_deps = $(top_srcdir)/m4/gnome-pthread-check.m4 \
+         $(top_srcdir)/m4/libtool.m4 \
+         $(top_srcdir)/m4/libxml.m4 $(top_srcdir)/m4/cppunit.m4 \
+         $(top_srcdir)/configure.in
+ 
+-SUBDIRS = src include $(CONTROL) $(CGI_LIB) binaries $(DOCS) $(TESTS)
++SUBDIRS = src include $(CONTROL) $(CGI_LIB) binaries $(DOCS) $(test_dir)
+ EXTRA_DIST = stdafx.h stdafx.cpp doxygen SConstruct
+ all: config.h
+ 	$(MAKE) $(AM_MAKEFLAGS) all-recursive
+
diff --git a/pkgs/servers/http/myserver/default.nix b/pkgs/servers/http/myserver/default.nix
new file mode 100644
index 000000000000..87bee922c820
--- /dev/null
+++ b/pkgs/servers/http/myserver/default.nix
@@ -0,0 +1,36 @@
+{ fetchurl, stdenv, libgcrypt, libevent, libidn, gnutls
+, libxml2, zlib, texinfo, cppunit }:
+
+let version = "0.9"; in
+  stdenv.mkDerivation rec {
+    name = "myserver-${version}";
+
+    src = fetchurl {
+      url = "mirror://gnu/myserver/${version}/${name}.tar.bz2";
+      sha256 = "1fhqgxfyhw6kygbicddpn2575mp8ybck3yffscbw26xmjkpm7nxy";
+    };
+
+    patches = [ ./prefix.patch ./TESTS.patch ];
+
+    buildInputs = [ libgcrypt libevent libidn gnutls libxml2 zlib texinfo ]
+      ++ stdenv.lib.optional doCheck cppunit;
+
+    doCheck = true;
+
+    meta = {
+      description = "GNU MyServer, a powerful and easy to configure web server";
+
+      longDescription = ''
+        GNU MyServer is a powerful and easy to configure web server.  Its
+        multi-threaded architecture makes it extremely scalable and usable in
+        large scale sites as well as in small networks, it has a lot of
+        built-in features.  Share your files in minutes!
+      '';
+
+      homepage = http://www.gnu.org/software/myserver/;
+
+      license = "GPLv3+";
+
+      maintainers = [ stdenv.lib.maintainers.ludo ];
+    };
+  }
diff --git a/pkgs/servers/http/myserver/prefix.patch b/pkgs/servers/http/myserver/prefix.patch
new file mode 100644
index 000000000000..c04f72b42ee2
--- /dev/null
+++ b/pkgs/servers/http/myserver/prefix.patch
@@ -0,0 +1,85 @@
+Don't attempt to create directories outside of $(prefix).
+
+--- myserver-0.9/binaries/logs/Makefile.in	2009-08-10 19:00:38.000000000 +0200
++++ myserver-0.9/binaries/logs/Makefile.in	2009-08-19 17:40:20.000000000 +0200
+@@ -370,7 +370,7 @@ uninstall-am:
+ 	mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am
+ 
+ install :
+-	$(INSTALL) -d $(DESTDIR)/var/log/myserver
++	true
+ 
+ # Tell versions [3.59,3.63) of GNU make to not export all variables.
+ # Otherwise a system limit (for SysV at least) may be exceeded.
+
+--- myserver-0.9/binaries/web/cgi-bin/Makefile.in	2009-08-10 19:00:40.000000000 +0200
++++ myserver-0.9/binaries/web/cgi-bin/Makefile.in	2009-08-19 20:39:01.000000000 +0200
+@@ -211,7 +211,7 @@ target_vendor = @target_vendor@
+ top_build_prefix = @top_build_prefix@
+ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
+-myserverdatadir = $(DESTDIR)/var/web/cgi-bin
++myserverdatadir = $(DESTDIR)$(prefix)/var/web/cgi-bin
+ dist_myserverdata_DATA = counter.html default.html counter.readme
+ all: all-am
+ 
+--- myserver-0.9/binaries/web/cgi-src/math_sum/Makefile.in	2009-08-10 19:00:40.000000000 +0200
++++ myserver-0.9/binaries/web/cgi-src/math_sum/Makefile.in	2009-08-20 17:28:19.000000000 +0200
+@@ -545,7 +545,7 @@ math_sum.mscgi : $(libmath_sum_a_OBJECTS
+ 	$(CXX) $(libmath_sum_a_OBJECTS) ../../../../src/libmyserver.a $(libmath_sum_a_LIBADD)  $(PTHREAD_LIB) $(IDN_LIB) $(XNET_LIB) $(EVENT_LIB) $(DL_LIB) $(SSL_LIB) $(ZLIB_LIB) $(XML_LIBS) $(LDFLAGS) -o math_sum.mscgi -shared $(CXXFLAGS) $(XML_CFLAGS)
+ 
+ install : math_sum.mscgi
+-	$(INSTALL) -D 'math_sum.mscgi' '$(DESTDIR)/var/web/cgi-bin/math_sum.mscgi'
++	$(INSTALL) -D 'math_sum.mscgi' '$(DESTDIR)$(prefix)/var/web/cgi-bin/math_sum.mscgi'
+ 
+ clean :
+ 	rm -f math_sum.mscgi
+
+--- myserver-0.9/binaries/web/cgi-src/post/Makefile.in	2009-08-10 19:00:40.000000000 +0200
++++ myserver-0.9/binaries/web/cgi-src/post/Makefile.in	2009-08-20 17:33:47.000000000 +0200
+@@ -545,7 +545,7 @@ post.mscgi : $(libpost_a_OBJECTS) $(libp
+ 	$(CXX) $(libpost_a_OBJECTS) ../../../../src/libmyserver.a $(libpost_a_LIBADD)  $(PTHREAD_LIB) $(IDN_LIB) $(XNET_LIB) $(EVENT_LIB) $(DL_LIB) $(SSL_LIB) $(ZLIB_LIB) $(XML_LIBS) $(LDFLAGS) -o post.mscgi -shared $(CXXFLAGS) $(XML_CFLAGS)
+ 
+ install : post.mscgi
+-	$(INSTALL) -D 'post.mscgi' '$(DESTDIR)/var/web/cgi-bin/post.mscgi'
++	$(INSTALL) -D 'post.mscgi' '$(DESTDIR)$(prefix)/var/web/cgi-bin/post.mscgi'
+ 
+ clean :
+ 	rm -f post.mscgi
+
+--- myserver-0.9/binaries/web/Makefile.in	2009-08-10 19:00:39.000000000 +0200
++++ myserver-0.9/binaries/web/Makefile.in	2009-08-20 22:37:43.000000000 +0200
+@@ -253,7 +253,7 @@ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
+ @BUILD_MSCGI_TRUE@CGI_SRC = cgi-src
+ SUBDIRS = cgi-bin $(CGI_SRC)
+-myserverdatadir = $(DESTDIR)/var/web
++myserverdatadir = $(DESTDIR)$(prefix)/var/web
+ dist_myserverdata_DATA = logo.png goto.png default.html link.html
+ all: all-recursive
+ 
+--- myserver-0.9/binaries/certificates/Makefile.in	2009-08-10 19:00:38.000000000 +0200
++++ myserver-0.9/binaries/certificates/Makefile.in	2009-08-21 11:18:31.000000000 +0200
+@@ -371,8 +371,8 @@ uninstall-am:
+ 	mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am
+ 
+ install :
+-	$(INSTALL) -d '$(DESTDIR)/etc/myserver/certificates'
+-	$(INSTALL) 'how_create_certificates.txt' '$(DESTDIR)/etc/myserver/certificates/how_create_certificates.txt'
++	$(INSTALL) -d '$(DESTDIR)$(prefix)/etc/myserver/certificates'
++	$(INSTALL) 'how_create_certificates.txt' '$(DESTDIR)$(prefix)/etc/myserver/certificates/how_create_certificates.txt'
+ 
+ # Tell versions [3.59,3.63) of GNU make to not export all variables.
+ # Otherwise a system limit (for SysV at least) may be exceeded.
+
+--- myserver-0.9/binaries/Makefile.in	2009-08-10 19:00:38.000000000 +0200
++++ myserver-0.9/binaries/Makefile.in	2009-08-21 11:59:43.000000000 +0200
+@@ -230,7 +230,7 @@ SUBDIRS = languages logs system web cert
+ EXTRA_DIST = myserver-daemon MIMEtypes.default.xml myserver.default.xml \
+ 						 virtualhosts.default.xml
+ 
+-configdir = $(DESTDIR)/etc/myserver
++configdir = $(DESTDIR)$(prefix)/etc/myserver
+ all: all-recursive
+ 
+ .SUFFIXES: