summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorme_desk <me_desk@fb96df88-216d-11de-830c-f3023f12d8ac>2012-08-13 22:34:10 +0000
committerme_desk <me_desk@fb96df88-216d-11de-830c-f3023f12d8ac>2012-08-13 22:34:10 +0000
commit55ef99afd7118414c7379ab4de9d4bf6bce94b01 (patch)
treeb87cabc7e338e3d5a81eb1200e431ac33c5f13f3
parent66a561c45becb9b193353f97a22afdd88de3869b (diff)
downloadpica-pica-55ef99afd7118414c7379ab4de9d4bf6bce94b01.tar.gz
pica-pica-55ef99afd7118414c7379ab4de9d4bf6bce94b01.zip
creating initial database during build process; README and LICENSE files added
git-svn-id: svn://localhost/project_picapica/trunk@163 fb96df88-216d-11de-830c-f3023f12d8ac
-rw-r--r--LICENSE23
-rw-r--r--Makefile.am12
-rw-r--r--README3
-rw-r--r--nodelist_db_create.sql13
4 files changed, 51 insertions, 0 deletions
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..dd9c8d3
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,23 @@
+Copyright (c) 2012, Anton Sviridenko
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
diff --git a/Makefile.am b/Makefile.am
index df6cc2a..11a6441 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -14,4 +14,16 @@ pica_node_CPPFLAGS = -DPICA_PREFIX=\"$(prefix)\"
dist_pkgdata_DATA = CA.pem
+pkglocalstatedir = $(localstatedir)/pica-node
+dist_pkglocalstate_DATA = nodelist.db
+
+nodelist.db: nodelist_db_create.sql
+ echo "Creating and initializing nodelist database..."
+ sqlite3 $@ "`cat $<`"
+
+
+EXTRA_DIST = nodelist_db_create.sql \
+ iniparser/LICENSE \
+ LICENSE \
+ README
diff --git a/README b/README
new file mode 100644
index 0000000..1bafacf
--- /dev/null
+++ b/README
@@ -0,0 +1,3 @@
+Pica Pica Messenger Node v0.5
+(c) 2012 Anton Sviridenko
+
diff --git a/nodelist_db_create.sql b/nodelist_db_create.sql
new file mode 100644
index 0000000..c7c94dd
--- /dev/null
+++ b/nodelist_db_create.sql
@@ -0,0 +1,13 @@
+-- create table schema and insert initial node addresses
+
+create table if not exists nodes
+ (
+ address varchar(255) not null,
+ port int not null,
+ last_active int not null,
+ inactive_count int not null,
+ constraint pk primary key (address,port) on conflict replace
+ );
+insert into nodes values("picapica.im", 2299, 0, 0);
+insert into nodes values("picapica.ge", 2299, 0, 0);
+