doc: prepare for asciidoc based specification
diff --git a/docs/Makefile b/docs/Makefile
new file mode 100644
index 0000000..815909e
--- /dev/null
+++ b/docs/Makefile
@@ -0,0 +1,8 @@
+OSMO_GSM_MANUALS_DIR := $(shell ./osmo-gsm-manuals-dir.sh)
+srcdir=$(CURDIR)
+
+ASCIIDOC = imsi-pseudo-spec.adoc
+ASCIIDOC_DEPS =
+include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.asciidoc.inc
+
+include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.common.inc
diff --git a/docs/imsi-pseudo-spec-docinfo.xml b/docs/imsi-pseudo-spec-docinfo.xml
new file mode 100644
index 0000000..de798c7
--- /dev/null
+++ b/docs/imsi-pseudo-spec-docinfo.xml
@@ -0,0 +1,46 @@
+<revhistory>
+ <revision>
+ <revnumber>1</revnumber>
+ <date>2020-04-03</date>
+ <authorinitials>OS</authorinitials>
+ <revremark>
+ Initial version.
+ </revremark>
+ </revision>
+ </revhistory>
+
+<authorgroup>
+ <author>
+ <firstname>Oliver</firstname>
+ <surname>Smith</surname>
+ <email>osmith@sysmocom.de</email>
+ <authorinitials>OS</authorinitials>
+ <affiliation>
+ <shortaffil>sysmocom</shortaffil>
+ <orgname>sysmocom - s.f.m.c. GmbH</orgname>
+ <jobtitle>Employee</jobtitle>
+ </affiliation>
+ </author>
+</authorgroup>
+
+<copyright>
+ <year>2020</year>
+ <holder>sysmocom - s.f.m.c. GmbH</holder>
+</copyright>
+
+<legalnotice>
+ <para>
+ Permission is granted to copy, distribute and/or modify this
+ document under the terms of the GNU Free Documentation License,
+ Version 1.3 or any later version published by the Free Software
+ Foundation; with no Invariant Sections, no Front-Cover Texts,
+ and no Back-Cover Texts. A copy of the license is included in
+ the section entitled "GNU Free Documentation License".
+ </para>
+ <para>
+ The Asciidoc source code of this manual is linked at
+ <ulink url="https://osmocom.org/projects/imsi-pseudo/wiki">
+ https://osmocom.org/projects/imsi-pseudo/wiki
+ </ulink>
+ </para>
+</legalnotice>
diff --git a/docs/imsi-pseudo-spec.adoc b/docs/imsi-pseudo-spec.adoc
new file mode 100644
index 0000000..4cb365d
--- /dev/null
+++ b/docs/imsi-pseudo-spec.adoc
@@ -0,0 +1 @@
+= IMSI Pseudonymization
diff --git a/docs/osmo-gsm-manuals-dir.sh b/docs/osmo-gsm-manuals-dir.sh
new file mode 100755
index 0000000..d080bc7
--- /dev/null
+++ b/docs/osmo-gsm-manuals-dir.sh
@@ -0,0 +1,26 @@
+#!/bin/sh -e
+# Find OSMO_GSM_MANUALS_DIR and print it to stdout. Print where it was taken from to stderr.
+
+# Find it in env, pkg-conf and ../../osmo-gsm-manuals
+RET="$OSMO_GSM_MANUALS_DIR"
+if [ -n "$RET" ]; then
+ RET="$(realpath $RET)"
+ echo "OSMO_GSM_MANUALS_DIR: $RET (from env)" >&2
+else
+ RET="$(pkg-config osmo-gsm-manuals --variable=osmogsmmanualsdir 2>/dev/null || true)"
+ if [ -n "$RET" ]; then
+ echo "OSMO_GSM_MANUALS_DIR: $RET (from pkg-conf)" >&2
+ else
+ RET="$(realpath $(realpath $(dirname $0))/../../osmo-gsm-manuals)"
+ echo "OSMO_GSM_MANUALS_DIR: $RET (fallback)" >&2
+ fi
+fi
+
+# Print the result or error message
+if [ -d "$RET" ]; then
+ echo "$RET"
+else
+ echo "ERROR: OSMO_GSM_MANUALS_DIR does not exist!" >&2
+ echo "Install osmo-gsm-manuals or set OSMO_GSM_MANUALS_DIR." >&2
+ exit 1
+fi