diff --git a/GNUmakefile b/GNUmakefile index 43223ed..0f5b734 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -48,6 +48,7 @@ else DESTDIR ?= / UHUB_CONF_DIR ?= $(DESTDIR)/etc/uhub UHUB_PREFIX ?= $(DESTDIR)/usr/local +UHUB_MOD_DIR ?= $(DESTDIR)/var/lib/uhub CFLAGS += -I/usr/local/include LDFLAGS += -L/usr/local/lib BIN_EXT ?= @@ -301,6 +302,10 @@ install: $(uhub_BINARY) @if [ ! -d $(UHUB_CONF_DIR) ]; then echo Creating $(UHUB_CONF_DIR); mkdir -p $(UHUB_CONF_DIR); fi @if [ ! -f $(UHUB_CONF_DIR)/uhub.conf ]; then cp doc/uhub.conf $(UHUB_CONF_DIR); fi @if [ ! -f $(UHUB_CONF_DIR)/users.conf ]; then cp doc/users.conf $(UHUB_CONF_DIR); fi + @if [ ! -f $(UHUB_CONF_DIR)/rules.txt ]; then cp doc/rules.txt $(UHUB_CONF_DIR); fi + @if [ ! -f $(UHUB_CONF_DIR)/plugins.conf ]; then cp doc/plugins.conf $(UHUB_CONF_DIR); fi + @if [ ! -d $(UHUB_MOD_DIR) ]; then echo Creating $(UHUB_MOD_DIR); mkdir -p $(UHUB_MOD_DIR); fi + @cp -f mod_*.so $(UHUB_MOD_DIR) @touch $(UHUB_CONF_DIR)/motd.txt @echo done. endif diff --git a/doc/compile.txt b/doc/compile.txt index 8886488..3dc3a43 100644 --- a/doc/compile.txt +++ b/doc/compile.txt @@ -9,6 +9,11 @@ Before you try to compile µHub, please make sure the following prerequisites ar * GNU make * gcc > 3.0 (or MinGW on Windows) * Perl 5 + * openssl > 0.9.8 (or use "make USE_SSL=NO") + * sqlite > 3.x + +or read http://www.uhub.org/compile.php for more info. + Linux, Mac OSX, FreeBSD, NetBSD and OpenBSD ------------------------------------------- diff --git a/tools/convert_to_sqlite.pl b/tools/convert_to_sqlite.pl index 52a2ffc..9499ca9 100755 --- a/tools/convert_to_sqlite.pl +++ b/tools/convert_to_sqlite.pl @@ -1,7 +1,11 @@ #!/usr/bin/perl +# use script +# sqlite3 users.db < `tools/convert_to_sqlite.pl /etc/uhub/users.conf` + my $input = $ARGV[0]; + open (FILE, "$input") || die "# Unable to open input file $input: $!"; my @lines = ; close (FILE);