summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordefanor <defanor@uberspace.net>2017-11-13 18:48:39 +0300
committerdefanor <defanor@uberspace.net>2017-11-13 18:48:39 +0300
commitd9d4044525c7b76adc32218ee999fdfaa3b510da (patch)
tree76bbec9b50efc51b22b08b37a2286f7f4fb3794c
parent36f86bfe407e261c102eabfc65397fdf23661ee8 (diff)
Add a man page
A basic and static one for now, perhaps should be generated out of a single source with README and the help message later.
-rw-r--r--Setup.hs20
-rw-r--r--pancake.118
-rw-r--r--pancake.cabal7
3 files changed, 44 insertions, 1 deletions
diff --git a/Setup.hs b/Setup.hs
new file mode 100644
index 0000000..1af2e43
--- /dev/null
+++ b/Setup.hs
@@ -0,0 +1,20 @@
+import Distribution.Simple
+import Distribution.Simple.LocalBuildInfo
+import Distribution.Simple.Utils
+import Distribution.PackageDescription
+import Distribution.Simple.Setup
+import System.FilePath
+
+main = defaultMainWithHooks simpleUserHooks { postCopy = installManPage }
+
+installManPage :: Args
+ -> CopyFlags
+ -> PackageDescription
+ -> LocalBuildInfo
+ -> IO ()
+installManPage _ cf pd lbi =
+ let dirs = absoluteInstallDirs pd lbi (fromFlag $ copyDest cf)
+ man1 = mandir dirs </> "man1"
+ fname = "pancake.1"
+ target = man1 </> fname
+ in installOrdinaryFile (fromFlag $ copyVerbosity cf) fname target
diff --git a/pancake.1 b/pancake.1
new file mode 100644
index 0000000..84f4701
--- /dev/null
+++ b/pancake.1
@@ -0,0 +1,18 @@
+.TH pancake 1
+
+.SH NAME
+pancake - a CLI/Emacs web/gopher/file browser
+
+.SH SYNOPSIS
+pancake [\fIoption ...\fR]
+
+.SH OPTIONS
+.IP "\fB\-\-version\fR"
+Print version and exit.
+.IP "\fB\-\-embedded\fR"
+Run in the embedded mode.
+
+.SH SIGNALS
+.IP "\fBSIGINT\fR"
+Pass SIGINT to the child process, if it's active.
+
diff --git a/pancake.cabal b/pancake.cabal
index efa3c2e..47f7e02 100644
--- a/pancake.cabal
+++ b/pancake.cabal
@@ -14,14 +14,19 @@ maintainer: defanor@uberspace.net
homepage: https://defanor.uberspace.net/projects/pancake/
bug-reports: https://github.com/defanor/pancake/issues
category: Web
-build-type: Simple
+build-type: Custom
extra-source-files: ChangeLog.md
, README.org
, pancake.el
+ , pancake.1
cabal-version: >=1.10
source-repository head
type: git
location: git://github.com/defanor/pancake.git
+custom-setup
+ setup-depends: Cabal >= 1.24
+ , base >= 4.9 && < 5
+ , filepath >= 1.4.1.0 && < 2
executable pancake
main-is: Pancake.hs