From 7e9608832e6d7f5be6dc176295b3a4c0507444e6 Mon Sep 17 00:00:00 2001 Message-Id: <7e9608832e6d7f5be6dc176295b3a4c0507444e6.1714156510.git.mdw@distorted.org.uk> From: Mark Wooding Date: Thu, 26 Nov 2009 18:16:01 +0000 Subject: [PATCH] Install Disobedience manual and make Disobedience use it in preference to the HTML versio of the man page. Organization: Straylight/Edgeware From: Richard Kettlewell --- .bzrignore | 1 + configure.ac | 6 ++++++ disobedience/Makefile.am | 10 ++-------- disobedience/help.c | 2 +- disobedience/manual/Makefile.am | 27 +++++++++++++++++++++++++++ disobedience/menu.c | 2 +- lib/Makefile.am | 1 + lib/defs.c | 3 +++ lib/defs.h | 1 + 9 files changed, 43 insertions(+), 10 deletions(-) create mode 100644 disobedience/manual/Makefile.am diff --git a/.bzrignore b/.bzrignore index 0cb8173..4551219 100644 --- a/.bzrignore +++ b/.bzrignore @@ -203,3 +203,4 @@ server/endian clients/rtpmon libtests/t-resample clients/resample +disobedience/manual/Makefile diff --git a/configure.ac b/configure.ac index e48cce2..80e8e24 100644 --- a/configure.ac +++ b/configure.ac @@ -326,6 +326,11 @@ if test -z "$pkghttpdir"; then fi AC_SUBST([pkghttpdir]) +if test -z "$dochtmldir"; then + dochtmldir='$(docdir)/html' +fi +AC_SUBST([dochtmldir]) + subdirs="scripts lib" if test $want_tests = yes; then subdirs="${subdirs} libtests" @@ -823,6 +828,7 @@ AC_CONFIG_FILES([Makefile cgi/Makefile clients/Makefile disobedience/Makefile + disobedience/manual/Makefile doc/Makefile templates/Makefile plugins/Makefile diff --git a/disobedience/Makefile.am b/disobedience/Makefile.am index 0171633..9b86bd7 100644 --- a/disobedience/Makefile.am +++ b/disobedience/Makefile.am @@ -17,7 +17,7 @@ # bin_PROGRAMS=disobedience -pkgdata_DATA=disobedience.html +SUBDIRS=manual AM_CPPFLAGS=-I${top_srcdir}/lib -I../lib AM_CFLAGS=$(GLIB_CFLAGS) $(GTK_CFLAGS) @@ -39,12 +39,6 @@ install-exec-hook: check: check-help -disobedience.html: ../doc/disobedience.1 $(top_srcdir)/scripts/htmlman - rm -f $@.new - $(top_srcdir)/scripts/htmlman $< >$@.new - chmod 444 $@.new - mv -f $@.new $@ - misc.o: images.h images.h: $(PNGS) @@ -67,7 +61,7 @@ check-help: all unset DISPLAY;./disobedience --version > /dev/null unset DISPLAY;./disobedience --help > /dev/null -CLEANFILES=disobedience.html images.h \ +CLEANFILES=images.h \ *.gcda *.gcov *.gcno *.c.html index.html export GNUSED diff --git a/disobedience/help.c b/disobedience/help.c index 8ec405c..5ebe457 100644 --- a/disobedience/help.c +++ b/disobedience/help.c @@ -29,7 +29,7 @@ void popup_help(void) { pid_t pid; int w; - byte_xasprintf(&path, "%s/disobedience.html", pkgdatadir); + byte_xasprintf(&path, "%s/index.html", dochtmldir); if(!(pid = xfork())) { exitfn = _exit; if(!xfork()) { diff --git a/disobedience/manual/Makefile.am b/disobedience/manual/Makefile.am new file mode 100644 index 0000000..6eddcbc --- /dev/null +++ b/disobedience/manual/Makefile.am @@ -0,0 +1,27 @@ +# +# This file is part of DisOrder. +# Copyright (C) 2009 Richard Kettlewell +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# + +dochtml_DATA=index.html intro.html tabs.html window.html \ + disobedience.css \ + arch-simple.png button-pause.png button-playing.png \ + button-random.png button-rtp.png button-scratch.png \ + choose-search.png choose.png disobedience-debian-menu.png \ + disobedience-terminal.png disorder-email-confirm.png \ + disorder-web-login.png login.png menu-control.png \ + menu-edit.png menu-help.png menu-server.png queue-menu.png \ + queue.png queue2.png recent.png volume-slider.png diff --git a/disobedience/menu.c b/disobedience/menu.c index 3566745..0433f9c 100644 --- a/disobedience/menu.c +++ b/disobedience/menu.c @@ -364,7 +364,7 @@ GtkWidget *menubar(GtkWidget *w) { 0 /* extra_data */ }, { - (char *)"/Help/Manual page", /* path */ + (char *)"/Help/Manual", /* path */ 0, /* accelerator */ manual_popup, /* callback */ 0, /* callback_action */ diff --git a/lib/Makefile.am b/lib/Makefile.am index 3505eb9..11040db 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -122,6 +122,7 @@ definitions.h: Makefile echo "#define PKGCONFDIR \"${sysconfdir}/\"PACKAGE" >> $@.new echo "#define PKGSTATEDIR \"${localstatedir}/\"PACKAGE" >> $@.new echo "#define PKGDATADIR \"${pkgdatadir}/\"" >> $@.new + echo "#define DOCHTMLDIR \"${dochtmldir}\"" >> $@.new echo "#define SBINDIR \"${sbindir}/\"" >> $@.new echo "#define BINDIR \"${bindir}/\"" >> $@.new echo "#define FINKBINDIR \"${finkbindir}/\"" >> $@.new diff --git a/lib/defs.c b/lib/defs.c index 633d56a..f0e35b2 100644 --- a/lib/defs.c +++ b/lib/defs.c @@ -41,6 +41,9 @@ const char pkgstatedir[] = PKGSTATEDIR; /** @brief Package fixed data directory */ const char pkgdatadir[] = PKGDATADIR; +/** @brief Package HTML documentation directory */ +const char dochtmldir[] = DOCHTMLDIR; + /** @brief Binary directory */ const char bindir[] = BINDIR; diff --git a/lib/defs.h b/lib/defs.h index 41b65ea..e13b857 100644 --- a/lib/defs.h +++ b/lib/defs.h @@ -25,6 +25,7 @@ extern const char pkglibdir[]; extern const char pkgconfdir[]; extern const char pkgstatedir[]; extern const char pkgdatadir[]; +extern const char dochtmldir[]; extern const char bindir[]; extern const char sbindir[]; extern const char finkbindir[]; -- [mdw]