git-annex/Setup.hs

28 lines
683 B
Haskell
Raw Normal View History

{- cabal setup file -}
import Distribution.Simple
import Distribution.Simple.LocalBuildInfo
import Distribution.Simple.Setup
import System.Cmd
import System.FilePath
import qualified Build.Configure as Configure
main = defaultMainWithHooks simpleUserHooks
{ preConf = configure
, instHook = install
}
configure _ _ = do
2012-03-23 16:24:40 +00:00
Configure.run Configure.tests
return (Nothing, [])
install pkg_descr lbi userhooks flags = do
r <- (instHook simpleUserHooks) pkg_descr lbi userhooks flags
_ <- rawSystem "ln" ["-sf", "git-annex",
bindir installDirs </> "git-annex-shell"]
return r
where
installDirs = absoluteInstallDirs pkg_descr lbi $
fromFlag (copyDest defaultCopyFlags)