diff --git a/CMakeLists.txt b/CMakeLists.txt index 1f3d3cee9..73525efb9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -37,6 +37,7 @@ SET (TASK_MAN1DIR share/man/man1 CACHE STRING "Installation directory for man pa SET (TASK_MAN5DIR share/man/man5 CACHE STRING "Installation directory for man pages, section 5") endif (FREEBSD) SET (TASK_DOCDIR share/doc/task CACHE STRING "Installation directory for doc files") +SET (TASK_RCDIR "${TASK_DOCDIR}/rc" CACHE STRING "Installation directory for configuration files") SET (TASK_BINDIR bin CACHE STRING "Installation directory for the binary") message ("-- Looking for SHA1 references") diff --git a/INSTALL b/INSTALL index 98bacd59a..7cb906de9 100644 --- a/INSTALL +++ b/INSTALL @@ -67,6 +67,7 @@ lists them and their defaults plus the CMAKE_INSTALL_PREFIX: CMAKE_INSTALL_PREFIX /usr/local TASK_BINDIR bin TASK_DOCDIR share/doc/task + TASK_RCDIR share/doc/task/rc TASK_MAN1DIR share/man/man1 TASK_MAN5DIR share/man/man5 @@ -75,6 +76,7 @@ get absolute installation directories: CMAKE_INSTALL_PREFIX/TASK_BINDIR /usr/local/bin CMAKE_INSTALL_PREFIX/TASK_DOCDIR /usr/local/share/doc/task + CMAKE_INSTALL_PREFIX/TASK_RCDIR /usr/local/share/doc/task/rc CMAKE_INSTALL_PREFIX/TASK_MAN1DIR /usr/local/share/man/man1 CMAKE_INSTALL_PREFIX/TASK_MAN5DIR /usr/local/share/man/man5 diff --git a/cmake.h.in b/cmake.h.in index 3a0b2ac4d..5739d4fdf 100644 --- a/cmake.h.in +++ b/cmake.h.in @@ -13,7 +13,7 @@ #define PACKAGE_STRING "${PACKAGE_STRING}" /* Installation details */ -#define TASK_RCDIR "${CMAKE_INSTALL_PREFIX}/${TASK_DOCDIR}/rc" +#define TASK_RCDIR "${CMAKE_INSTALL_PREFIX}/${TASK_RCDIR}" /* Localization */ #define PACKAGE_LANGUAGE ${PACKAGE_LANGUAGE} diff --git a/doc/man/task-color.5.in b/doc/man/task-color.5.in index 243f90945..3fef0f3ac 100644 --- a/doc/man/task-color.5.in +++ b/doc/man/task-color.5.in @@ -265,7 +265,7 @@ your .taskrc file (note that your installation may use a slightly different path from the example): .RS -include /usr/local/share/doc/task/rc/dark-256.theme +include ${CMAKE_INSTALL_PREFIX}/${TASK_RCDIR}/dark-256.theme .RE You can use any of the standard taskwarrior themes: diff --git a/doc/man/task-tutorial.5.in b/doc/man/task-tutorial.5.in index da28abef6..803476e6c 100644 --- a/doc/man/task-tutorial.5.in +++ b/doc/man/task-tutorial.5.in @@ -1286,19 +1286,19 @@ theme into the configuration file, you can see some striking effects. For a blue theme, add this line to your .taskrc file: .RS -include /usr/local/share/doc/task/rc/dark-blue-256.theme +include ${CMAKE_INSTALL_PREFIX}/${TASK_RCDIR}/dark-blue-256.theme .RE For a red theme: .RS -include /usr/local/share/doc/task/rc/dark-red-256.theme +include ${CMAKE_INSTALL_PREFIX}/${TASK_RCDIR}/dark-red-256.theme .RE For a general dark theme: .RS -include /usr/local/share/doc/task/rc/dark-256.theme +include ${CMAKE_INSTALL_PREFIX}/${TASK_RCDIR}/dark-256.theme .RE Here are two color rules that specify a dark blue background for all tasks that @@ -1497,7 +1497,7 @@ used most. You can create your own, or use one of the samples to show holidays on the calendar. Try adding this line to your ~/.taskrc file: .RS -include /usr/local/share/doc/task/rc/holidays.en-US.rc +include ${CMAKE_INSTALL_PREFIX}/${TASK_RCDIR}/holidays.en-US.rc .RE Then: diff --git a/doc/man/taskrc.5.in b/doc/man/taskrc.5.in index 60926e2c8..9b375e520 100644 --- a/doc/man/taskrc.5.in +++ b/doc/man/taskrc.5.in @@ -131,9 +131,9 @@ ones containing just the relevant configuration data like colors, etc. There are two excellent uses of includes in your .taskrc, shown here: .RS -include /usr/local/share/doc/task/rc/holidays.en-US.rc +include ${CMAKE_INSTALL_PREFIX}/${TASK_RCDIR}/holidays.en-US.rc .br -include /usr/local/share/doc/task/rc/dark-16.theme +include ${CMAKE_INSTALL_PREFIX}/${TASK_RCDIR}/dark-16.theme .RE This includes two standard files that are distributed with taskwarrior, which @@ -724,7 +724,7 @@ be included like this: .RS .RS .br -include /usr/local/share/doc/task/rc/holidays.en-US.rc +include ${CMAKE_INSTALL_PREFIX}/${TASK_RCDIR}/holidays.en-US.rc .RE .RE