From 166f704e580addc73eea0c74ee25b15550fb255a Mon Sep 17 00:00:00 2001
From: patrick96
Date: Sun, 2 Dec 2018 19:17:26 +0100
Subject: [PATCH] doc: Install rst based man pages
---
CMakeLists.txt | 1 -
doc/CMakeLists.txt | 5 +++-
man/.gitignore | 7 ------
man/CMakeLists.txt | 16 ------------
man/polybar.1.cmake | 60 ---------------------------------------------
5 files changed, 4 insertions(+), 85 deletions(-)
delete mode 100644 man/.gitignore
delete mode 100644 man/CMakeLists.txt
delete mode 100644 man/polybar.1.cmake
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a0470ed1..2ee8ee8f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -40,7 +40,6 @@ add_subdirectory(doc/bash)
add_subdirectory(doc/zsh)
add_subdirectory(include)
add_subdirectory(lib)
-add_subdirectory(man)
add_subdirectory(src bin)
# We need to enable testing in the root folder so that 'ctest' and 'make test'
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
index 37a53f09..b43a3ade 100644
--- a/doc/CMakeLists.txt
+++ b/doc/CMakeLists.txt
@@ -97,10 +97,13 @@ install(FILES config
add_custom_target(doc ALL
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/doc
- COMMAND make html)
+ COMMAND make html man)
install(DIRECTORY build/html/
DESTINATION share/doc/polybar
COMPONENT doc)
+install(FILES build/man/polybar.1
+ DESTINATION ${CMAKE_INSTALL_PREFIX}/share/man/man1
+ COMPONENT doc)
# }}}
diff --git a/man/.gitignore b/man/.gitignore
deleted file mode 100644
index 3ca51ada..00000000
--- a/man/.gitignore
+++ /dev/null
@@ -1,7 +0,0 @@
-*.gz
-*.ps
-*.pdf
-
-.*.swp
-*~
-
diff --git a/man/CMakeLists.txt b/man/CMakeLists.txt
deleted file mode 100644
index ed90ecab..00000000
--- a/man/CMakeLists.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-# Gets the date of the latest commit in the form YYYY-MM-DD
-# This date is used in the man page
-execute_process(COMMAND git log -1 --date=format:%Y-%m-%d --format=%cd
- WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
- OUTPUT_VARIABLE LAST_COMMIT_DATE
- OUTPUT_STRIP_TRAILING_WHITESPACE)
-
-set(MAN_PAGES_1 polybar.1)
-configure_file(
- ${CMAKE_CURRENT_LIST_DIR}/${MAN_PAGES_1}.cmake
- ${CMAKE_CURRENT_LIST_DIR}/${MAN_PAGES_1}
- ESCAPE_QUOTES @ONLY)
-
-INSTALL(FILES ${MAN_PAGES_1}
- DESTINATION ${CMAKE_INSTALL_PREFIX}/share/man/man1
- COMPONENT doc)
diff --git a/man/polybar.1.cmake b/man/polybar.1.cmake
deleted file mode 100644
index 618cca08..00000000
--- a/man/polybar.1.cmake
+++ /dev/null
@@ -1,60 +0,0 @@
-.TH polybar 1 @LAST_COMMIT_DATE@ "polybar @APP_VERSION@" "User Manual"
-.SH NAME
-polybar \- A fast and easy-to-use tool status bar
-.SH SYNOPSIS
-\fBpolybar\fR [\fIOPTION\fR]... \fIBAR\fR
-.SH DESCRIPTION
-Polybar aims to help users build beautiful and highly customizable status bars for their desktop environment, without the need of having a black belt in shell scripting.
-.TP
-\fB\-h\fR, \fB\-\-help\fR
-Display help text and exit
-.TP
-\fB\-v\fR, \fB\-\-version\fR
-Display build details and exit
-.TP
-\fB\-l\fR, \fB\-\-log\fR=\fILEVEL\fR
-Set the logging verbosity (default: \fBWARNING\fR)
-.br
-\fILEVEL\fR is one of: error, warning, info, trace
-.TP
-\fB\-q\fR, \fB\-\-quiet\fR
-Be quiet (will override -l)
-.TP
-\fB\-c\fR, \fB\-\-config\fR=\fIFILE\fR
-Specify the path to the configuration file. By default, the configuration file is loaded from:
-.RS 10
-.P
-\fB$XDG_CONFIG_HOME/polybar/config\fR
-.br
-\fB$HOME/.config/polybar/config\fR
-.P
-.RE
-.TP
-\fB\-r\fR, \fB\-\-reload\fR
-Reload the application when the config file has been modified
-.TP
-\fB\-d\fR, \fB\-\-dump\fR=\fIPARAM\fR
-Print the value of the specified parameter \fIPARAM\fR in bar section and exit
-.TP
-\fB\-m\fR, \fB\-\-list\-monitors\fR
-Print list of available monitors and exit
-.TP
-\fB\-w\fR, \fB\-\-print\-wmname\fR
-Print the generated \fIWM_NAME\fR and exit
-.TP
-\fB\-s\fR, \fB\-\-stdout\fR
-Output the data to stdout instead of drawing it to the X window
-.TP
-\fB\-p\fR, \fB\-\-png\fR=\fIFILE\fR
-Save png snapshot to \fIFILE\fR after running for 3 seconds
-.sp
-.SH AUTHOR
-Michael Carlberg
-.br
-Contributors can be listed on GitHub.
-.SH REPORTING BUGS
-Report issues on GitHub
-.SH SEE ALSO
-Full documentation at:
-.br
-Project wiki: