diff options
Diffstat (limited to 'Setup.hs')
-rw-r--r-- | Setup.hs | 14 |
1 files changed, 5 insertions, 9 deletions
@@ -19,6 +19,7 @@ import qualified System.Info import qualified Build.DesktopFile as DesktopFile import qualified Build.Configure as Configure +import Utility.SafeCommand main :: IO () main = defaultMainWithHooks simpleUserHooks @@ -44,24 +45,19 @@ installGitAnnexShell copyDest verbosity pkg lbi = where dstBinDir = bindir $ absoluteInstallDirs pkg lbi copyDest -{- See http://www.haskell.org/haskellwiki/Cabal/Developer-FAQ#Installing_manpages - - - - Man pages are provided prebuilt in the tarball in cabal, - - but may not be available otherwise, in which case, skip installing them. - -} +{- See http://www.haskell.org/haskellwiki/Cabal/Developer-FAQ#Installing_manpages -} installManpages :: CopyDest -> Verbosity -> PackageDescription -> LocalBuildInfo -> IO () installManpages copyDest verbosity pkg lbi = installOrdinaryFiles verbosity dstManDir =<< srcManpages where dstManDir = mandir (absoluteInstallDirs pkg lbi copyDest) </> "man1" srcManpages = do - havemans <- doesDirectoryExist srcManDir + havemans <- boolSystem "make" [Param "mans"] if havemans - then zip (repeat srcManDir) + then zip (repeat "man") . filter (".1" `isSuffixOf`) - <$> getDirectoryContents srcManDir + <$> getDirectoryContents "man" else return [] - srcManDir = "man" installDesktopFile :: CopyDest -> Verbosity -> PackageDescription -> LocalBuildInfo -> IO () installDesktopFile copyDest _verbosity pkg lbi |