summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@anylike.org>2009-12-25 07:49:33 +0000
committerChristian Pointner <equinox@anylike.org>2009-12-25 07:49:33 +0000
commitfee76a99f13148d95b7e660b6bf787cd695f9df8 (patch)
tree54e60dd61164e0512a67a493883ff102aeeb6073
parentadded configure, makefile and initial manpage (diff)
added main files
updated readme (dependencies)
-rw-r--r--README85
-rw-r--r--src/Makefile14
-rw-r--r--src/anylike.c44
-rwxr-xr-xsrc/configure2
-rw-r--r--src/main_loop.lua3
5 files changed, 140 insertions, 8 deletions
diff --git a/README b/README
index 7a5fc30..1781a96 100644
--- a/README
+++ b/README
@@ -1,2 +1,85 @@
-... fill in some info ...
+Dependencies
+============
+anylike can be built using either libgcrypt or the openssl-crypto library.
+The latter is more performant in most cases but there are some license
+issues when using this library. It also needs more space when installed.
+
+
+Linux
+-----
+
+using libgcrypt:
+
+ build-essential
+ libgcrypt11-dev
+ liblua50-dev
+ liblualib50-dev
+
+using ssl crypto library:
+
+ build-essential
+ libssl-dev
+ liblua50-dev
+ liblualib50-dev
+
+if you want to rebuild the manpage:
+
+ asciidoc
+
+
+
+Installation
+============
+
+Getting the source via subversion:
+----------------------------------
+
+svn co https://svn.anylike.org/anylike/trunk anylike
+cd anylike
+
+
+Building from source
+--------------------
+
+using libgcrypt:
+
+# cd src
+# ./configure
+# make
+
+using ssl crypto library:
+
+# cd src
+# ./configure --use-ssl-crypto
+# make
+
+Notes:
+ - try './configure --help' for further information
+
+
+Installing
+----------
+
+# sudo make install
+
+This will install anylike under the --prefix defined with configure.
+
+
+Uninstalling
+------------
+
+# sudo make remove
+
+This removes everytthing except for the config files
+
+# sudo make purge
+
+This also removes the config files
+
+
+
+Usage:
+======
+
+tba.. \ No newline at end of file
diff --git a/src/Makefile b/src/Makefile
index 4e2710f..4252608 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -29,12 +29,14 @@ endif
EXECUTABLE := anylike
-OBJ := log.o \
- string_list.o \
- sig_handler.o \
- sysexec.o \
- options.o \
- anylike.o
+# OBJ := log.o \
+# string_list.o \
+# sig_handler.o \
+# sysexec.o \
+# options.o \
+# anylike.o
+
+OBJ := anylike.o
SRC := $(OBJ:%.o=%.c)
diff --git a/src/anylike.c b/src/anylike.c
new file mode 100644
index 0000000..ae65ef9
--- /dev/null
+++ b/src/anylike.c
@@ -0,0 +1,44 @@
+/*
+ * anylike
+ *
+ * anylike is a ...
+ *
+ *
+ * Copyright (C) 2009-2010 Markus Grueneis <gimpf@anylike.org>
+ * Christian Pointner <equinox@anylike.org>
+ *
+ * This file is part of anylike.
+ *
+ * anylike is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * any later version.
+ *
+ * anylike is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with anylike. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <stdlib.h>
+#include <stdio.h>
+
+#include <lua50/lua.h>
+
+int main(int argc, char* argv[])
+{
+ lua_State *L;
+ L = lua_open();
+ luaopen_base(L);
+
+ printf("will now start main_loop.lua:\n");
+ lua_dofile(L, "main_loop.lua");
+ printf("script.lua just returned\n");
+
+ lua_close(L);
+
+ return 0;
+}
diff --git a/src/configure b/src/configure
index 73e9695..a0e07dc 100755
--- a/src/configure
+++ b/src/configure
@@ -27,7 +27,7 @@ TARGET=`uname -s`
EBUILD_COMPAT=0
CFLAGS='-g -O2'
-LDFLAGS='-g -Wall -O2'
+LDFLAGS='-g -Wall -O2 -ldl -llua50 -llualib50'
CRYPTO_LIB='gcrypt'
diff --git a/src/main_loop.lua b/src/main_loop.lua
new file mode 100644
index 0000000..861e401
--- /dev/null
+++ b/src/main_loop.lua
@@ -0,0 +1,3 @@
+-- sample lua script
+print("lua: main_loop started");
+-- end lua script \ No newline at end of file