2011-06-30 18:55:03 +00:00
|
|
|
{- cabal setup file -}
|
|
|
|
|
|
|
|
import Distribution.Simple
|
2012-04-14 18:01:14 +00:00
|
|
|
import Distribution.Simple.LocalBuildInfo
|
|
|
|
import Distribution.Simple.Setup
|
2011-06-30 18:55:03 +00:00
|
|
|
import System.Cmd
|
2012-04-14 18:01:14 +00:00
|
|
|
import System.FilePath
|
2011-06-30 18:55:03 +00:00
|
|
|
|
2012-03-10 18:00:26 +00:00
|
|
|
import qualified Build.Configure as Configure
|
2011-06-30 18:55:03 +00:00
|
|
|
|
2012-04-14 18:01:14 +00:00
|
|
|
main = defaultMainWithHooks simpleUserHooks
|
|
|
|
{ preConf = configure
|
|
|
|
, instHook = install
|
|
|
|
}
|
2011-06-30 18:55:03 +00:00
|
|
|
|
2012-03-10 18:00:26 +00:00
|
|
|
configure _ _ = do
|
2012-03-23 16:24:40 +00:00
|
|
|
Configure.run Configure.tests
|
2012-03-10 18:00:26 +00:00
|
|
|
return (Nothing, [])
|
2012-04-14 18:01:14 +00:00
|
|
|
|
|
|
|
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)
|