tLook for docs in --docdir, not --datadir - vaccinewars - be a doctor and try to vaccinate the world
(HTM) git clone git://src.adamsgaard.dk/vaccinewars
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit 8f502b41fe2c3d174516953b54689254eeb3d71d
(DIR) parent 6fe32bf9aa041d3b33f25b8c29fce15fb210817a
(HTM) Author: Ben Webb <ben@salilab.org>
Date: Wed, 2 Dec 2020 23:50:42 -0800
Look for docs in --docdir, not --datadir
Rather than installing (and looking for) HTML
docs in a custom subdirectory of --datadir,
use --docdir. This should ensure that they match
tthe RPM %doc location.
Diffstat:
M configure.ac | 6 +++++-
M doc/Makefile.am | 2 +-
M doc/help/Makefile.am | 2 +-
M src/dopewars.c | 2 +-
4 files changed, 8 insertions(+), 4 deletions(-)
---
(DIR) diff --git a/configure.ac b/configure.ac
t@@ -413,9 +413,13 @@ AC_SUBST(DPSCOREDIR)
DP_EXPAND_DIR(DPDATADIR, '${datadir}')
AC_DEFINE_UNQUOTED(DPDATADIR, "$DPDATADIR",
- [The directory containing the docs and sounds])
+ [The directory containing the sounds])
AC_SUBST(DPDATADIR)
+DP_EXPAND_DIR(DPDOCDIR, '${docdir}')
+AC_DEFINE_UNQUOTED(DPDOCDIR, "$DPDOCDIR",
+ [The directory containing the docs])
+
localedir=${datadir}/locale
AC_SUBST(localedir)
DP_EXPAND_DIR(LOCALEDIR, '${localedir}')
(DIR) diff --git a/doc/Makefile.am b/doc/Makefile.am
t@@ -1,4 +1,4 @@
-DOCPATH = ${DESTDIR}${datadir}/doc/${PACKAGE}-${VERSION}/
+DOCPATH = ${DESTDIR}${docdir}
DOCS = aiplayer.html configfile.html index.html i18n.html \
server.html clientplay.html credits.html example-cfg \
installation.html servercommands.html commandline.html \
(DIR) diff --git a/doc/help/Makefile.am b/doc/help/Makefile.am
t@@ -1,4 +1,4 @@
-DOCPATH = ${DESTDIR}${datadir}/doc/${PACKAGE}-${VERSION}/help
+DOCPATH = ${DESTDIR}${docdir}/help
DOCS = cops.html general.html locations.html sounds.html \
drugs.html guns.html server.html
EXTRA_DIST = ${DOCS}
(DIR) diff --git a/src/dopewars.c b/src/dopewars.c
t@@ -2319,7 +2319,7 @@ gchar *GetDocRoot(void)
path = g_strdup_printf("file://%s\\", bindir);
g_free(bindir);
#else
- path = g_strdup_printf("file://%s/doc/%s-%s/", DPDATADIR, PACKAGE, VERSION);
+ path = g_strdup_printf("file://%s/", DPDOCDIR);
#endif
return path;
}