diff options
author | defanor <defanor@uberspace.net> | 2017-12-28 05:03:26 +0300 |
---|---|---|
committer | defanor <defanor@uberspace.net> | 2017-12-28 06:39:17 +0300 |
commit | b11b05385b5615aaf08bd245af53e8df03a193b3 (patch) | |
tree | 99304984295784f70f8f4c3e3cbc8488bf16e0a6 /Setup.hs | |
parent | c27c14e866dfb4a3c6c85393ffd0522933c67651 (diff) |
Install and enable a few uncluttering XSLTs by default
Diffstat (limited to 'Setup.hs')
-rw-r--r-- | Setup.hs | 28 |
1 files changed, 17 insertions, 11 deletions
@@ -23,18 +23,24 @@ import Distribution.Simple.Setup import System.FilePath import System.Directory -main = defaultMainWithHooks simpleUserHooks { postCopy = installManPage } +main = defaultMainWithHooks simpleUserHooks { postCopy = installExtras } -- | Installs pancake.1. -installManPage :: Args - -> CopyFlags - -> PackageDescription - -> LocalBuildInfo - -> IO () -installManPage _ cf pd lbi = do +installExtras :: Args + -> CopyFlags + -> PackageDescription + -> LocalBuildInfo + -> IO () +installExtras _ cf pd lbi = do let dirs = absoluteInstallDirs pd lbi (fromFlag $ copyDest cf) - man1 = mandir dirs </> "man1" - fname = "pancake.1" - target = man1 </> fname + verbosity = fromFlag $ copyVerbosity cf + -- todo: use absoluteComponentInstallDirs once will switch to + -- cabal 2, e.g.: + -- absoluteComponentInstallDirs pd lbi (localUnitId lbi) + -- (fromFlag $ copyDest cf) + -- install man page + let man1 = mandir dirs </> "man1" + manFileName = "pancake.1" + manTarget = man1 </> manFileName createDirectoryIfMissing True man1 - installOrdinaryFile (fromFlag $ copyVerbosity cf) fname target + installOrdinaryFile verbosity manFileName manTarget |