summaryrefslogtreecommitdiff
path: root/doc/meson.build
diff options
context:
space:
mode:
authorRasmus Thomsen <oss@cogitri.dev>2020-04-16 23:32:02 +0200
committerTimo Teräs <timo.teras@iki.fi>2020-10-09 16:09:19 +0300
commitfe1de720d02ae91856ec966801f69b1f1a8e3168 (patch)
treeb6acb1123ab776c296351be8fd52b445a0c65e31 /doc/meson.build
parentefe0c4afecb9fd3da2ab4849d2b8edd5bea14d08 (diff)
downloadapk-tools-fe1de720d02ae91856ec966801f69b1f1a8e3168.tar.gz
apk-tools-fe1de720d02ae91856ec966801f69b1f1a8e3168.tar.bz2
apk-tools-fe1de720d02ae91856ec966801f69b1f1a8e3168.tar.xz
apk-tools-fe1de720d02ae91856ec966801f69b1f1a8e3168.zip
build: add support for building with meson
Diffstat (limited to 'doc/meson.build')
-rw-r--r--doc/meson.build46
1 files changed, 46 insertions, 0 deletions
diff --git a/doc/meson.build b/doc/meson.build
new file mode 100644
index 0000000..6142884
--- /dev/null
+++ b/doc/meson.build
@@ -0,0 +1,46 @@
+scdoc_prog = find_program(scdoc.get_pkgconfig_variable('scdoc'), native: true)
+sh = find_program('sh', native: true)
+mandir = get_option('mandir')
+
+man_files = [
+ 'apk.8.scd',
+ 'apk-add.8.scd',
+ 'apk-audit.8.scd',
+ 'apk-cache.5.scd',
+ 'apk-cache.8.scd',
+ 'apk-del.8.scd',
+ 'apk-dot.8.scd',
+ 'apk-fetch.8.scd',
+ 'apk-fix.8.scd',
+ 'apk-index.8.scd',
+ 'apk-info.8.scd',
+ 'apk-keys.5.scd',
+ 'apk-list.8.scd',
+ 'apk-manifest.8.scd',
+ 'apk-policy.8.scd',
+ 'apk-repositories.5.scd',
+ 'apk-stats.8.scd',
+ 'apk-update.8.scd',
+ 'apk-upgrade.8.scd',
+ 'apk-verify.8.scd',
+ 'apk-version.8.scd',
+ 'apk-world.5.scd',
+]
+
+foreach filename : man_files
+ topic = filename.split('.')[-3].split('/')[-1]
+ section = filename.split('.')[-2]
+ output = '@0@.@1@'.format(topic, section)
+
+ custom_target(
+ output,
+ input: filename,
+ capture: true,
+ output: output,
+ command: [
+ sh, '-c', '@0@ < @INPUT@'.format(scdoc_prog.path())
+ ],
+ install: true,
+ install_dir: '@0@/man@1@'.format(mandir, section)
+ )
+endforeach \ No newline at end of file