Add GNU MyServer.

svn path=/nixpkgs/trunk/; revision=16801
This commit is contained in:
Ludovic Courtès 2009-08-21 10:20:40 +00:00
parent a56fecb102
commit 4ad3ea4107
4 changed files with 149 additions and 0 deletions

View File

@ -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

View File

@ -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 ];
};
}

View File

@ -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:

View File

@ -4544,6 +4544,11 @@ let
inherit fetchurl stdenv apacheHttpd python;
};
myserver = import ../servers/http/myserver {
inherit fetchurl stdenv libgcrypt libevent libidn gnutls libxml2
zlib texinfo cppunit;
};
nginx = builderDefsPackage (import ../servers/http/nginx) {
inherit openssl pcre zlib libxml2 libxslt;
};