Permalink
Browse files

First version of package, comments welcome

  • Loading branch information...
0 parents commit 3062cd2a72a33bd7e3a31bfab713a29cbc5d3737 Torsten Raudssus committed Jul 17, 2010
Showing 442 changed files with 252,462 additions and 0 deletions.
@@ -0,0 +1,41 @@
+use inc::Module::Install;
+
+# Create the Makefile
+name 'Alien-APE-Server';
+perl_version '5.008';
+license 'perl';
+all_from 'lib/Alien/APE/Server.pm';
+requires 'File::ShareDir';
+test_requires 'Test::More' => '0.42';
+
+auto_install;
+
+my $S = ($^O eq 'MSWin32') ? "\\" : "\/";
+my $root = "\$(INST_LIB)${S}auto${S}share${S}dist${S}\$(DISTNAME)";
+
+sub MY::postamble {
+ return <<"APE_BUILD_SH";
+
+all :: ape-server/bin/aped
+
+ape-server/bin/aped: ape-server/build.sh
+ ( cd ape-server && ./build.sh )
+
+install :: install_aped
+
+install_aped: ape-server/bin/aped
+ \$(NOECHO) \$(MKPATH) $root
+ \$(NOECHO) \$(CHMOD) 0755 $root
+ \$(NOECHO) \$(CP) -ar ape-server/bin $root
+ \$(NOECHO) \$(CP) -ar ape-server/modules $root
+ \$(NOECHO) \$(CP) -ar ape-server/scripts $root
+
+clean :: delete_aped
+
+delete_aped:
+ \$(RM_F) ape-server/bin/aped
+
+APE_BUILD_SH
+}
+
+WriteAll;
@@ -0,0 +1,8 @@
+http://www.ape-project.org/
+
+Weelya <contact _at_ weelya _dot_ com>
+
+- Anthony Catel (paraboul)
+- Nicolas Trani (efyx)
+- Florian Gasquez (Fy-)
+- John Chavarria (psi)

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -0,0 +1,26 @@
+EXEC=bin/aped
+
+prefix = /usr/local
+bindir = $(prefix)/bin
+
+
+SRC=src/entry.c src/sock.c src/hash.c src/handle_http.c src/cmd.c src/users.c src/channel.c src/config.c src/json.c src/json_parser.c src/plugins.c src/http.c src/extend.c src/utils.c src/ticks.c src/base64.c src/pipe.c src/raw.c src/events.c src/event_kqueue.c src/event_epoll.c src/transports.c src/servers.c src/dns.c src/sha1.c src/log.c src/parser.c src/md5.c
+
+CFLAGS = -Wall -O2 -minline-all-stringops -rdynamic -I ./deps/udns-0.0.9/
+LFLAGS=-ldl -lm -lpthread
+CC=gcc -D_GNU_SOURCE
+RM=rm -f
+
+all: aped
+
+aped: $(SRC)
+ $(CC) $(CFLAGS) $(SRC) -o $(EXEC) $(LFLAGS) ./deps/udns-0.0.9/libudns.a -I ./deps/udns-0.0.9/
+install:
+ install -d $(bindir)
+ install -m 755 $(EXEC) $(bindir)
+
+uninstall:
+ $(RM) $(bindir)/aped
+
+clean:
+ $(RM) $(EXEC)
@@ -0,0 +1,2 @@
+run build.sh
+-> sh build.sh
@@ -0,0 +1,41 @@
+uid {
+ # "aped" switch to this user/group if it run as root
+ user = daemon
+ group = daemon
+}
+
+
+Server {
+ port = 6969
+ daemon = no
+ ip_listen = 0.0.0.0
+ domain = auto
+ rlimit_nofile = 10000
+ pid_file = /var/run/aped.pid
+}
+
+Log {
+ debug = 1
+ use_syslog = 0
+ logfile = ./ape.log
+}
+
+JSONP {
+ eval_func = Ape.transport.read
+ allowed = 1
+}
+
+Config {
+#relative to ape.conf
+ modules = ../modules/lib/
+ modules_conf = ../modules/conf/
+}
+
+# Proxy section is used to resolve hostname and allow access to a IP:port (Middleware-TCPSocket feature)
+
+#Proxy {
+# id = freenode
+# host = irc.freenode.net
+# port = 6667
+# readonly = false
+#}
@@ -0,0 +1,36 @@
+#!/bin/bash
+
+OS_TARGET=`uname -s`
+
+case "$OS_TARGET" in
+ linux* | Linux*)
+ HOST_OS=Linux
+ echo "#define USE_EPOLL_HANDLER" > ./src/configure.h
+ echo "LINUX_BUILD = 1" > ./modules/plateform.mk;;
+ Darwin*)
+ HOST_OS=Darwin
+ echo "#define USE_KQUEUE_HANDLER" > ./src/configure.h
+ echo "DARWIN_BUILD = 1" > ./modules/plateform.mk;;
+ *)
+ HOST_IS=Linux;;
+esac
+
+if [ -e "/usr/include/mysql/mysql.h" ]
+then
+ echo "HAS_MYSQL = yes" > ./modules/mysql.mk
+ echo "#define _USE_MYSQL 1" >> ./src/configure.h
+ cd ./modules/deps/mysac/
+ make
+ cd ../../../
+else
+ echo "HAS_MYSQL = 0" > ./modules/mysql.mk
+ echo "#undef _USE_MYSQL" >> ./src/configure.h
+fi
+
+cd ./deps/udns-0.0.9/
+make clean && ./configure && make
+cd ../js/src/
+./configure && make
+cd ../../../
+make
+cd ./modules/ && make
Oops, something went wrong.

0 comments on commit 3062cd2

Please sign in to comment.