installer

This commit is contained in:
stacksmith 2022-03-05 12:41:13 -05:00
parent 73bcdd6369
commit 6648a467e6
3 changed files with 21 additions and 10 deletions

View File

@ -1,5 +1,4 @@
# http://creativecommons.org/publicdomain/zero/1.0/
bin := ~/bin
SPADIR := $(HOME)/.spa
logfile := '"$(SPADIR)/spa.log"'
map20file := '"$(SPADIR)/spa.map20"'
@ -30,21 +29,18 @@ main.o: main.c global.h
link: main.o db.o comm.o url.o sigil.o gemtext.o log.o
gcc -Wall -o spa main.o db.o comm.o url.o sigil.o gemtext.o log.o
strip spa
mv spa $(bin)/
lookup.o: lookup.c db.h global.h sigil.h
gcc -Wall -c lookup.c
lookup: lookup.o db.o log.o sigil.o
gcc -Wall -o lookup lookup.o db.o log.o sigil.o
mv lookup $(bin)/
clean:
rm -f *~ *# *.o spa
rm $(bin)/spa
wipe:
mkdir -p $(SPADIR)
rm -f $(SPADIR)/spa.log
rm -f $(SPADIR)/spa.map20
truncate -s 1K $(SPADIR)/spa.log

View File

@ -1,6 +1,6 @@
# spa - a Spartan Client powered by HorseWare
WIP!
WIP! BSD 3-clause license.
`spa` is an experimental, terminal, client for the [Spartan Protocol](https://portal.mozz.us/spartan/spartan.mozz.us/), a minimized, unencrypted version of the Gemini protocol.
@ -31,11 +31,15 @@ A linux machine with a GCC compiler.
The compiled binary is < 20K.
Upon installation, a db.log file is created in the `.spa` directory. It will contain every spartan URL seen by the system. Each url is stored once and only once. In addition, db.map20 file is created containing an index for fast lookup (hashtable). The file is fixed at 4MB, but it is a sparse file and will generally take up substantially less (and never more) space.
### Building
`make` to build spa
### Installing
Modify the Makefile to set your build folder, the folder into which spa will be placed (I keep a ~/bin directory which is in my PATH).
Copy `spa` to somewhere in your path.
Create a .spa directory in your HOME (unless you want it elsewhere, but change the Makefile accordingly);
`make wipe` to create a `~/.spa` directory and initialize the database. If you ever need to wipe the database clean, use this command.
`make` to build spa and move it to the specified bin directory.
# Work In Progress
`make wipe` to create the log and index files in the .spa directory.
This is pre-alpha software, created for the purposes of research. No warranties of any sort, express or implied, are provided.

11
license.txt Normal file
View File

@ -0,0 +1,11 @@
Copyright 2022, StackSmith
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.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
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 HOLDER 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.