cabal file now autodetects whether S3 support is available.

This commit is contained in:
Joey Hess 2012-04-14 14:22:33 -04:00
parent 1ca41044e8
commit 626697b459
5 changed files with 16 additions and 3 deletions

View file

@ -124,7 +124,7 @@ gitAnnexBadDir r = addTrailingPathSeparator $ gitAnnexDir r </> "bad"
gitAnnexBadLocation :: Key -> Git.Repo -> FilePath gitAnnexBadLocation :: Key -> Git.Repo -> FilePath
gitAnnexBadLocation key r = gitAnnexBadDir r </> keyFile key gitAnnexBadLocation key r = gitAnnexBadDir r </> keyFile key
{- .git/annex/*unused is used to number possibly unused keys -} {- .git/annex/foounused is used to number possibly unused keys -}
gitAnnexUnusedLog :: FilePath -> Git.Repo -> FilePath gitAnnexUnusedLog :: FilePath -> Git.Repo -> FilePath
gitAnnexUnusedLog prefix r = gitAnnexDir r </> (prefix ++ "unused") gitAnnexUnusedLog prefix r = gitAnnexDir r </> (prefix ++ "unused")

View file

@ -1,6 +1,6 @@
PREFIX=/usr PREFIX=/usr
IGNORE=-ignore-package monads-fd IGNORE=-ignore-package monads-fd
BASEFLAGS=-Wall $(IGNORE) -outputdir tmp -IUtility BASEFLAGS=-Wall $(IGNORE) -outputdir tmp -IUtility -cpp -DWITH_S3
GHCFLAGS=-O2 $(BASEFLAGS) GHCFLAGS=-O2 $(BASEFLAGS)
ifdef PROFILE ifdef PROFILE

View file

@ -18,7 +18,9 @@ import Config
import Remote.Helper.Hooks import Remote.Helper.Hooks
import qualified Remote.Git import qualified Remote.Git
#ifdef WITH_S3
import qualified Remote.S3 import qualified Remote.S3
#endif
import qualified Remote.Bup import qualified Remote.Bup
import qualified Remote.Directory import qualified Remote.Directory
import qualified Remote.Rsync import qualified Remote.Rsync
@ -28,7 +30,9 @@ import qualified Remote.Hook
remoteTypes :: [RemoteType] remoteTypes :: [RemoteType]
remoteTypes = remoteTypes =
[ Remote.Git.remote [ Remote.Git.remote
#ifdef WITH_S3
, Remote.S3.remote , Remote.S3.remote
#endif
, Remote.Bup.remote , Remote.Bup.remote
, Remote.Directory.remote , Remote.Directory.remote
, Remote.Rsync.remote , Remote.Rsync.remote

1
debian/changelog vendored
View file

@ -9,6 +9,7 @@ git-annex (3.20120407) UNRELEASED; urgency=low
dependency on the haskell edit-distance library. dependency on the haskell edit-distance library.
* Renamed diskfree.c to avoid OSX case insensativity bug. * Renamed diskfree.c to avoid OSX case insensativity bug.
* cabal now installs git-annex-shell as a symlink to git-annex. * cabal now installs git-annex-shell as a symlink to git-annex.
* cabal file now autodetects whether S3 support is available.
-- Joey Hess <joeyh@debian.org> Sun, 08 Apr 2012 12:23:42 -0400 -- Joey Hess <joeyh@debian.org> Sun, 08 Apr 2012 12:23:42 -0400

View file

@ -26,15 +26,23 @@ Description:
etc that are associated with annexed files but that benefit from full etc that are associated with annexed files but that benefit from full
revision control. revision control.
Flag S3
Description: Enable S3 support
Executable git-annex Executable git-annex
Main-Is: git-annex.hs Main-Is: git-annex.hs
Build-Depends: MissingH, hslogger, directory, filepath, Build-Depends: MissingH, hslogger, directory, filepath,
unix, containers, utf8-string, network, mtl, bytestring, old-locale, time, unix, containers, utf8-string, network, mtl, bytestring, old-locale, time,
pcre-light, extensible-exceptions, dataenc, SHA, process, hS3, json, HTTP, pcre-light, extensible-exceptions, dataenc, SHA, process, json, HTTP,
base >= 4.5, base < 5, monad-control, transformers-base, lifted-base, base >= 4.5, base < 5, monad-control, transformers-base, lifted-base,
IfElse, text, QuickCheck >= 2.1, bloomfilter, edit-distance IfElse, text, QuickCheck >= 2.1, bloomfilter, edit-distance
Other-Modules: Utility.Touch Other-Modules: Utility.Touch
C-Sources: Utility/libdiskfree.c C-Sources: Utility/libdiskfree.c
Extensions: CPP
if flag(S3)
Build-Depends: hS3
CPP-Options: -DWITH_S3
Test-Suite test Test-Suite test
Type: exitcode-stdio-1.0 Type: exitcode-stdio-1.0