summaryrefslogtreecommitdiff
path: root/Setup.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2016-05-24 01:00:06 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2016-05-24 01:28:07 -0400
commit387e3dc18fe2c82c0eefc5332f4f458f7f979c96 (patch)
tree8b8e892ed684d3ed06f5bbd4e1629b6fdde85372 /Setup.hs
parentbccfbd631f23933b52df8701ed1dda2ded728374 (diff)
Updated cabal file explictly lists source files.
The tarball on hackage will include only the files needed for cabal install; it is NOT the full git-annex source tree. While it's totally obnoxious that cabal files need every file listed out when basic wildcard support could avoid hundreds of lines, and have to be maintained when files are added, this does get the tarball size back down to 1 mb. This also stops stack from complaining that it found modules not listed in the cabal file. debian/changelog, debian/NEWS, debian/copyright: Converted to symlinks to CHANGELOG, NEWS, and COPYRIGHT, which used to symlink to these instead. This avoids needing to include debian/ in the hackage tarball. Setup.hs: Build man pages at install time using make and mdwn2man. If it fails, which it probably will on windows, just skip installing them.
Diffstat (limited to 'Setup.hs')
-rw-r--r--Setup.hs14
1 files changed, 5 insertions, 9 deletions
diff --git a/Setup.hs b/Setup.hs
index 3e6637fc6..47bef5e31 100644
--- a/Setup.hs
+++ b/Setup.hs
@@ -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