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 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Setup.hs (limited to 'Setup.hs') 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 -- cgit v1.2.3