aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md59
1 files changed, 46 insertions, 13 deletions
diff --git a/README.md b/README.md
index 1065ea6..0911a8e 100644
--- a/README.md
+++ b/README.md
@@ -6,6 +6,9 @@ nimisewi is a small program that outputs random toki pona phrase.
[first implementation](https://fsl.aaoth.xyz/nimisewi.py)
was created using python, but then i decided to create more portable version.
+## dependencies
+- cmake (>=3.10)
+
## installation
installation is very straightforward:
@@ -13,20 +16,39 @@ installation is very straightforward:
```terminal
$ fsl clone https://fsl.aaoth.xyz/nimisewi.c
$ cd nimisewi
-$ ./configure
-$ make
+$ mkdir build && cd build
+$ cmake ..
+$ cmake --build .
$ doas make install
```
-by default it will compile also `nimisewi.cgi` and `nimisewi_gemini.cgi` and
-if you wish, you can throw them into your cgi-bin folder and serve them using
-whatever cgi thing you want. also they are statically linked, so you don't
-need to worry if your web server is chrooted.
+### compilation options
+
+- BUILD_CGI -- compile `nimisewi.cgi`, a cgi version
+ of nimisewi (default OFF).
+
+ [see example](https://aaoth.xyz/nimisewi).
+
+- CGI_INSTALL_DIR -- installation directory for `nimisewi.cgi`
+ (default -- "$PREFIX/var/www/htdocs/cgi-bin").
-see examples here:
+- BUILD_GEMINI_CGI -- compile `nimisewi_gemini.cgi`, a cgi script
+ for gemini protocol.
+
+ [see example](gemini://aaoth.xyz/cgi-bin/nimisewi)
-- [http](https://aaoth.xyz/nimisewi)
-- [gemini](gemini://aaoth.xyz/cgi-bin/nimisewi)
+- GEMINI_CGI_INSTALL_DIR -- installation directory for `nimisewi_gemini.cgi`
+ (default -- "$PREFIX/var/gemini/cgi-bin")
+
+to specify these options, pass them as `-D{OPTION}` to initial cmake
+invocation. for example, these commands result in building both http and gemini
+versions of cgi script.
+
+``` terminal
+$ mkdir build && cd build
+$ cmake -DBUILD_CGI=ON -DBUILD_GEMINI=ON ..
+$ cmake --build .
+```
## usage
@@ -44,12 +66,25 @@ then, just clean everything and recompile the program.
```terminal
$ vim nimitoki.txt
-$ make distclean
-$ ./configure
+$ cd build
$ make
...
```
+## changelog
+
+- 0.0.1 -- initial release
+- 0.0.2 -- added license and comments to the code
+- 0.0.3 -- added cgi for http and gemini, separated main code from nimisewi core
+- 0.0.3.1 -- fixed errors in http header
+- 0.0.4 -- added title and favicon to http cgi
+- 0.0.4.1 -- fixed errors in http cgi
+- 0.0.4.2 -- added missing error check to main
+- 0.1.0 -- added words from lipu ku, added gnu autotools build system
+- 0.1.1 -- added 'ku' word itself
+- 0.2.0 -- switched to cmake build system, added '-v' and '--version' flags to
+ nimisewi, that are outputting version information and compile features
+
## bugs
i am pretty much beginner in c, so it is possible that the code contains some
@@ -66,5 +101,3 @@ all code that makes up `nimisewi`, `nimisewi.cgi`, `nimisewi_gemini.cgi` and
`nimitoki.txt` is in public domain.
-GNU Autotools (in autotools directory) are licensed under GPLv3 license
-(see [autotools/LICENSE.txt](/file?name=autotools/LICENSE.txt&ci=tip)).