From d9d4044525c7b76adc32218ee999fdfaa3b510da Mon Sep 17 00:00:00 2001 From: defanor Date: Mon, 13 Nov 2017 18:48:39 +0300 Subject: 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. --- Setup.hs | 20 ++++++++++++++++++++ pancake.1 | 18 ++++++++++++++++++ pancake.cabal | 7 ++++++- 3 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 Setup.hs create mode 100644 pancake.1 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 -- cgit v1.2.3